I recently got sound to come out of my speakers using the alsa drivers, and I thought it might be useful to share my experiences and lessons learned.
This is not a step by step account. Mostly it focuses on key missteps or problem areas, in hopes that it will help others. I had the following documents at hand to guide me: *Alsa-sound-mini-howto (which is not so mini) *ALSA Tutorial by Timmy (members.home.com/tdouglas/alsa.html) *Linux Sound How To (which is NOT oriented to ALSA) *Sound Blaster AWE 32 How To and various SB AWE docs (which I eventually decided refer to the OSS light, not ALSA, way) *Debian docs on building the kernel package And I'm not going to try to duplicate the info there. I have a Sound Blaster AWE64. Although it's ISA PNP, I (think) I disabled the PNP. I put it in awhile ago. I have it set to some non-standard settings to avoid conflicts elsewhere. My system is Debian Potato with Helix-Gnome, which means I have a bit of woody too. Problem #1: What packages to get. Well, I never really figured this out. There are packages with "driver" and with "modules" which seem to be doing the same thing (maybe the driver is an older set of names). There are utilities, and lots of libraries. The ALSA Tutorial by Timmy says you should get esound-alsa and libesd-alsa0, but then adds that the latter conflicts with libesd, and many packages depend on libesd. alsa-modules exist, and look like the right idea. But they only exist for kernel versions way before the stock potato kernel. Perhaps the stock kernels in potato didn't have the right sound support options? Or each flavor needed its own set of drivers and this wasn't feasible? While doing this potato moved to 2.2.18pre21 kernel. Oddly, there was a package for this kernel, but only in woody! I tried using it, without luck. Problem #2: You have to build from source. So I broke down and got the kernel source and kernel package tools, and built my own kernel. Trick #3: For Linux 2.2, ALSA requires that you enable the general sound support, but NONE of the specific sound drivers. Trick #4: To use sound, you must be in the audio group. I went straight to the alsa site to get the latest source. I figured as long as I had to build anyway, I might as well get the latest. I think woody actually has a packaged source, which is probably a better way to go. It is not immediately obvious which files one should get from the alsa site (I went down into the drivers section. I used the packages for alsaconf and alsa-utils). My final build of ./configure --with-isapnp=yes --with-debug=full --with-kernel=/usr/local/src/kernel-2.2.18pre21 --with-oss=yes --with-cards=sbawe ./configure -help is well worth study. Also note that, if you're ambitious, you can try to integrate the modules build with the kernel build. It's possible some of my false starts were the result of building against a kernel which I then replaced. You probably don't want --with-debug, but I was getting desperate. I then followed the steps for building and installing the modules. Discovery #5: I was trying to load the module with insmod. modprobe is the right choice to take care of dependencies. I kept staring at the unresolved symbols messages from insmod and checking the files and modules.dep. The errors didn't come from problems with either the files or the dependencies. The needed modules just weren't in memory. Trap #6: With #5 out of the way, I saw that everything was loading up until sbawe itself. For some reason alsaconf had set snd_index to 1. I changed it to 0, and finally the driver loaded. This might be a bug in alsa conf. Trap #7: As the ALSA mini-howto warns, the sound is off unless you turn it on. They suggest "amixer set PCM 100 unmute". I found I needed "amixer set Master 100" also. I have not yet been able to get the sound on when the machine starts. I edited /etc/modules to load sound, but find I need to start the gnome mixer to have it on. alsactrl looks as if it's designed to keep the state at start up, but I haven't been able to get that to work. Or it's working, but something later (e.g., gnome sessions) turns it off. Trick #8: The ./snddevices script does not put everything (maybe not anything) in the audio group. You need to chgrp appropriately so non-root users in audio can hear. Discovery #9: ALSA scripts may update modules.conf, accounting for messages I and others received about modules.dep being out of date with respect to modules.conf. /etc/init.d/alsa calls update_modules_conf, which is defined in /usr/lib/alsa-base/snd-dev-utils to run /sbin/update-modules sometimes.