A preferred way of module
configuration: Aliases.

Instead of setting parameters with modprobe or insmod, you can use /etc/modules.conf (in most cases you can also use /etc/conf.modules)

Advantages:

Extract from /etc/conf.modules

alias sound sb
alias midi awe_wave
options sound dmabuf=1
options sb io=0x220 irq=5 dma=1
dma16=5 mpu_io=0x330
options gus io=0x240 irq=11
dma=3 gus16=1 no_wave_dma
post-install awe_wave /usr/bin/sfxload
/usr/share/awe/synthgm.sbk
alias parport_lowlevel parport_pc
options parport_pc io=0x378
irq=7

Keywords:

options - standard module options
post-install - what should run after the module is installed (e.g. loading sound fonts)
alias - substitute module, e.g. 'alias sound sb' means that
'modprobe sound' is implemented as 'modprobe sb'

Options:

io, irq - IO address and IRQ number
dma dma16 - 8 and 16bit DMA addresses
mpu_io - io address for MPU-401 compatible MIDI port

dmabuf=1 - use persistent dma buffers. Normally buffers are allocated / deallocated during open/close device. For an ISA card a DMAbuffer should be located below
16MB, and can be unavailable. With dma=1 the buffers are allocated / deallocated
during module load/unload, therefore there is more chance to get it.

dmabuf = 1 is NOT needed:
when total memory size is 16 MB or less
with a PCI souind card

Extract from /etc/rc.d/rc.sysinit (RedHat)

# load sound modules
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
            if grep -s "alias midi" /etc/conf.modules > /dev/null ; then
                modprobe midi
            fi
        fi
    fi
fi

if [ -x /sbin/kerneld -a -n "$USEMODULES" ]; then
    if [ -f /proc/sys/kernel/modprobe ]; then
        # /proc/sys/kernel/modprobe indicates built-in kmod instead
        echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
    else
        /sbin/kerneld
        KERNELD=yes
    fi
fi

Back Next