Building a modular sound driver ================================ The following information is current as of linux-2.1.85. Check the other readme files, especially Readme.cards, for information not specific to making sound modular. First, configure your kernel. This is an idea of what you should be setting in the sound section: Sound card support 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support I have SoundBlaster. Select your card from the list. Generic OPL2/OPL3 FM synthesizer support FM synthesizer (YM3812/OPL-3) support If you don't set these, you will probably find you can play .wav files but not .midi. As the help for them says, set them unless you know your card does not use one of these chips for FM support. Once you are configured, make zlilo, modules, modules_install; reboot. Note that it is no longer necessary or possible to configure sound in the drivers/sound dir. Now one simply configures and makes one's kernel and modules in the usual way. Then, add to your /etc/modules.conf or /etc/conf.modules something like: alias char-major-14 sb post-install sb modprobe "-k" "adlib_card" options sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 options adlib_card io=0x388 # FM synthetiser The effect of this is that the sound driver and all necessary bits and pieces autoload on demand, assuming you use kerneld (a sound choice) and autoclean when not in use. Also, options for the device drivers are set. They will not work without them. Change as appropriate for your card. If you are not yet using the very cool kerneld, you will have to "modprobe -k sb" yourself to get things going. Eventually things may be fixed so that this kludgery is not necessary; for the time being, it seems to work well. Replace 'sb' with the driver for your card, and give it the right options. To find the filename of the driver, look in /lib/modules//misc. Mine looks like: adlib_card.o # This is the generic OPLx driver opl3.o # The OPL3 driver sb.o # <> sound.o # The sound driver uart401.o # Used by sb, maybe other cards Whichever card you have, try feeding it the options that would be the default if you were making the driver wired, not as modules. You can look at the init_module() code for the card to see what args are expected. Note that at present there is no way to configure the io, irq and other parameters for the modular drivers as one does for the wired drivers.. One needs to pass the modules the necessary parameters as arguments, either with /etc/modules.conf or with command-line args to modprobe, e.g. modprobe -k sb io=0x220 irq=7 dma=1 dma16=5 mpu_io=0x330 modprobe -k adlib_card io=0x388 recommend using /etc/modules.conf. I'm afraid I know nothing about anything but my setup, being more of a text-mode guy anyway. If you have options for other cards or other helpful hints, send them to me, Jim Bray, jb@as220.org, http://as220.org/jb.