Alsa Sound on Debian

UPDATE

This works for kernel-source-2.4.22. In kernel 2.6 alsa sound is integrated and should(!!!) be much easier to configure.

Step 0: When compiling your kernel, select in Sound Sound Card Support and your soundcard (in my case SBLive!). I don’t quite know what to do when it is not supported.

Step 1: apt-get install alsa-source alsa-utils This leaves you with a tar ball of the alsa sources in /usr/src Unpack this archiv exactly there.

Step 2: in /usr/src/linux make-kpkg modules-image Compiles all modules under /usr/src/modules where your sources should be

(a) /usr/src/modules/alsa-drivers/configure –with-cards=emu10k1 –with-sequencer=yes;make;make install
(b) chmod a+rw /dev/dsp /dev/mixer /dev/sequencer /dev/midi
(c) modprobe snd-emu10k1;modprobe snd-pcm-oss;modprobe snd-mixer-oss;modprobe snd-seq-oss

I am not sure wether any of the steps (a) to (c) are needed but if something doesn’t work try these.

Add file /etc/modutils/alsa with the following lines:


# ALSA portion
alias char-major-116 snd
alias snd-card-0 snd-emu10k1
# module options should go here

# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0

# card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss

Then type update-modules and you’ll find your configuration in /etc/modules.conf

Step 3: dpkg -i alsa-modulesXYZ.deb, this installs the modules and starts up alsa sound, take care to quit all apps and applets that might be using sound right now. (Yes the mixer applet!)

<!–Step 4: Copy and edit config files.
ln -s /etc/modutils/alsa /etc/alsa/modutils/0.9
cp /usr/share/doc/alsa-source/examples/alsa-source.conf /etc/alsa/

Edit alsa-source.conf: “startosslayer=true”
Edit /etc/modutils/alsa: “cards_limit=1” and “alias snd-card-0 snd-dummy”

Instead of snd-dummy you have to put the fitting module for your soundcard which you should have selected while installing the sources. In my case snd-cmpci for example. You can find out more about your installed soundcard with lspci

Step 5: adduser user audio This only works after a complete logout and new login!

Step 6: /etc/init.d/alsa start This loads a whole bunch of kernel-modules (and btw I configured soundcore as a module!)
–>

I could not find the page where I first found this howto so I reconstructed it here for those who might need it. Install xmms and go. [The comments on this page – view invisible data – contain some of the old howto for an old version of alsa and a 2.4.20 kernel]

Important Links:
Alsa Project Documentation
SBLive! Documentation