Sunday, 1 October 2006

Steps to get Audio to work in Debian Etch

Debian Etch is a very good Linux distribution. It has all the latest versions of software - even more recent than those found in Ubuntu Dapper (though that is bound to change once Ubuntu releases its next version) and also a pretty GUI installer. Recently when I downloaded and installed the latest version of Debian Etch Beta 3, every thing went quite smoothly - Etch correctly detected all the hardware in my machine and I was booted into Linux in no time.

But... I ran into a problem. I have on-board sound on my Intel motherboard as I found out running the following command :
#lspci|grep Multimedia
00:1f.5 Multimedia audio controller: Intel Corporation 82801BA/BAM AC'97 Audio (rev 05)
And the correct driver module 'snd_intel8x0' for this on-board sound was already loaded as was seen by running lsmod.
#lsmod
Module Size Used by
snd_intel8x0 29436 0
snd_ac97_codec 82784 1 snd_intel8x0
snd_ac97_bus 2048 1 snd_ac97_codec
snd_pcm_oss 43520 0
snd_mixer_oss 15584 1 snd_pcm_oss
snd_pcm 74408 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer 20292 1 snd_pcm
snd 46080 6 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore 8672 1 snd
snd_page_alloc 9800 2 snd_intel8x0,snd_pcm
...
Then I checked the volume control and I found it to be turned to full volume - so no problem there either. It seems, Debian requires the package libesd-alsa0 which was missing on my machine. This may be because I had installed a standard system install and then later downloaded and installed the desired packages thus avoiding unnecessary bloat. And I might have missed installing some of the necessary packages.

Anyway, once I downloaded the libesd-alsa0 package and installed it, I ran the alsaconf script which automatically removed the loaded sound drivers, detected the sound card, reloaded the relevant drivers and finally, reconfigured the sound to work correctly. And shortly after that, I started relishing the heavenly tunes emanating from the speaker.

So here is the deal to get sound working correctly in Debian Etch. That is, regardless of the version of the kernel, you need to have alsa-base, alsa-utils and libesd-alsa0 packages installed. You will also have to use the alsaconf command to configure and load the necessary sound modules.

While configuring, alsaconf will ask whether to modify the following two files:
/etc/modprobe.d/sound & /etc/modprobe.conf - if they are present. These files are used to tweak the settings of the sound card by passing additional parameters. Usually you won't have them on the system.

After the sound card is configured, it will load the ALSA sound driver and use amixer to raise the default volumes. It is also possible to change the volume later via a mixer program such as alsamixer or gamix.

Considering the number of hoops I had to loop in getting sound to work in Linux a couple of years back, this process is a piece of cake. In fact, I believe, if I had installed a default Desktop Environment, I wouldn't even have had to go through the above process. Anyway, it is nice to know what to do when things go wrong.

No comments:

Post a Comment