Revision 51e9f2e665bf2b6a01be275d64c336d942c59a66 authored by Takashi Iwai on 30 July 2008, 13:13:33 UTC, committed by Jaroslav Kysela on 25 August 2008, 07:57:38 UTC
Most hardwares have limited buffer-descriptor table length.  This
also restricts the max buffer size of the sound driver.
For example, snd-hda-intel has 1MB buffer size limit, and this is
because it can have at most 256 BDL entries.  For supporting larger
buffers, we need to allocate larger pages even for sg-buffers.

This patch changes the sgbuf allocation code to try to allocate
larger pages first.  At each head of the allocated pages, the
number of allocated pages is stored in the lowest bits of the
corresponding entry of the table addr field.  This change isn't
visible as long as the driver uses snd_sgbuf_get_addr() helper.

Also, the patch adds a new function, snd_pcm_sgbuf_get_chunk_size().
This returns the size of the chunk on continuous pages starting at
the given position offset.  If the chunk reaches to a non-continuous
page, it returns the size to the boundary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 4e184f8
History
File Mode Size
keys
selinux
smack
Kconfig -rw-r--r-- 4.0 KB
Makefile -rw-r--r-- 559 bytes
capability.c -rw-r--r-- 21.9 KB
commoncap.c -rw-r--r-- 17.6 KB
device_cgroup.c -rw-r--r-- 12.6 KB
inode.c -rw-r--r-- 9.0 KB
root_plug.c -rw-r--r-- 2.8 KB
security.c -rw-r--r-- 28.8 KB

back to top