Messages in this thread Patch in this message | | | Date | Wed, 30 Jun 1999 18:45:20 +0300 | From | Constantine Gavrilov <> | Subject | Re: Sound error: Couldn't allocate DMA buffer |
| |
Y should be a FAQ by now... From the kernel 2.2.x sound documentation: ----------------------------------------------------------------------------- Persistent DMA Buffers:
The sound modules normally allocate DMA buffers during open() and deallocate them during close(). Linux can often have problems allocating DMA buffers for ISA cards on machines with more than 16MB RAM. This is because ISA DMA buffers must exist below the 16MB boundry and it is quite possible that we can't find a large enough free block in this region after the machine has been running for any amount of time. The way to avoid this problem is to allocate the DMA buffers during module load and deallocate them when the module is unloaded. For this to be effective we need to load the sound modules right after the kernel boots, either manually or by an init script, and keep them around until we shut down. This is a little wasteful of RAM, but it guarantees that sound always works.
To make the sound driver use persistent DMA buffers we need to pass the sound.o module a "dmabuf=1" command-line argument. This is normally done in /etc/conf.modules (or the more proper /etc/modules.conf) like so:
options sound dmabuf=1 --------------------------------------------------------------------------- This information is also true for kernel-2.0.36 rpm packages provided by RedHat. However adding this line has the following problem:
If in your /etc/conf.modules you have something like:
alias sound sb which is typical for RedHat administration, you will not be able to execute
modporbe sound
since the option "dmabuf=1" would be passed to sb module instead of the sound module! You need to do `modprobe sb' instead. Since pesistant DMA buffers make sense only when you insert the sound module at boot time, I suggest you make the following change to /etc/rc.d/rc.sysinit: change the line modprobe sound to modprobe `grep -s "alias sound" /etc/conf.modules | awk '{print $3}'`
This is what I did and it works fine.
If you prefer it in a patch form, here it is: #################################################### --- rc.sysinit.org Wed Jun 30 18:16:29 1999 +++ rc.sysinit Wed Jun 30 18:17:03 1999 @@ -139,7 +139,7 @@ if ! grep -i nomodules /proc/cmdline >/dev/null ; then if [ -n "$USEMODULES" ]; then if grep -s "alias sound" /etc/conf.modules > /dev/null ; then - modprobe sound + modprobe `grep -s "alias sound" /etc/conf.modules | awk '{print $3}'` if grep -s "alias midi" /etc/conf.modules > /dev/null ; then modprobe midi fi -- ---------------------------------------- Constantine Gavrilov Unix System Administrator and Programmer Orbotech Yavne 81102, Israel Phone: (972-8)-942-3064 Fax: (972-8)-942-3800 ---------------------------------------- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |