http://www.tux.org/~tbr/sound-debian/
Like many of my colleagues, I'm making the switch to Debian and finding I have to unlearn a few habits. I love the package management, and I'm learning that less is more: start with the very minimum and then add stuff as I need it. It's certainly true that, when you configure the system directly, rather than trusting a tool to do it, you learn a whole lot more about how it all works.
Setting up a soundcard is a good example. I've always wondered what it is that RedHat's sndconfig really does. Now I think I know. Of course, I also learned a bit about how Debian organizes and manages configuration files.
It's difficult to get straightforward, simple, and up-to-date guidance on how to configure a sound card in Debian; indeed the most likely sources, the Sound HOWTO and the files in /usr/src/linux/Documentation/sound, seem to give conflicting messages.
This document captures what I've learned, with some great help from my colleagues in several LUGS on both coasts of the US. Although it's necessarily oriented around my particular card, I've tried to describe the underlying principles that apply generally, in hopes of helping others (and myself when I need to configure a different card!)
Platform Debian 2.2r2 (Potato) from the 3-CD set, default stable archive, on Intel architecture (AMD Athlon 650)
Sound Card Soundblaster AWE64 ISA PNP. The machine dual boots an inferior (though sound-supporting ;-) operating system, from which I can determine the parameters: io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
In general, GNU/Linux supports sound by loading kernel modules. You need to:
Determine exactly what sound card you have, or what chipset it uses. Note that most "Soundblaster compatibles" aren't. Sources of information:
If your card, like mine, is an ISA Plug-n-Play model, you need to set up the PNP configuration before the system can even detect it. I understand you can set any parameters the card will allow but, in multi-boot situations, it's a bad idea to set different parameters for the different operating systems.
Configure PNP by tailoring /etc/isapnp.conf as described in various docs under /usr/src/linux/Documentation/sound/, in my case the AWE32 document:
Armed with a clear idea of what soundcard/chipset you have, study the docs under /usr/src/linux/Documentation/sound/, including the introduction, the READMEs, and anything that seems remotely related to your card. Some things aren't obvious, for example, it seems most sound cards need the opl3 module. Most modules require options (not an oxymoron! the option is which value to set, not whether to set one). The docs should supply the correct names and, in many cases, the values.
For my Soundblaster AWE64 card, I need:
Module Options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 awe_wave (none) opl3 io=0x388
loaded in that order.
If you're using an out-of-the-box kernel, it almost certainly has support already compiled in for all likely modules, including sound, so you don't need to do any further configuration. On the other hand, if you're building a new kernel, you'll need to include support for the sound modules.
/usr/src/linux/Documentation/sound/README.OSS will tell you everything you need to know.
The quick-and-dirty way is to load the modules directly, using modprobe, for example:
modprobe sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 modprobe awe_wave modprobe opl3 io=0x388
The cleaner way is to use the modules.conf arrangement (actually several configuration files that get automatically integrated into /etc/modules.conf):
For each module that requires options, make a file of that name under /etc/modutils with a line for the options, for example:
/etc/modutils/sb: options sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330 /etc/modutils/opl3: options opl3 io=0x388
An easy way to accomplish all this is to use the modconf program, which is the same tool that runs during the installation. For an ISA PNP card, be sure to set up the PNP configuration first.