Steps to get Audio to work in Debian Etch

October 02, 2006
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.

11 comments:

  • Problem with alsaconf is that it kills off other soundcards and enables only one which you choose as default.

    So instead of using alsaconf it's relatively easy to modify /etc/modprobe.d/sound file to give fixed order audio cards. So if you have onboard audio and want to use other card to play as default you should give index=0 to one which should be default. This way you can play music with speakers and plug headset to onboard audio to use for skype. For example my /etc/modprobe.d/sound file is as follows:

    alias snd-card-0 snd-emu10k1
    alias snd-card-1 snd-ens1371
    alias snd-card-2 snd-cmipci
    alias snd-card-3 snd-usb-audio
    alias snd-card-4 snd-bt-sco
    options snd-emu10k1 index=0
    options snd-ens1371 index=1
    options snd-cmipci index=2
    options snd-usb-audio index=3
    options snd-bt-sco index=4

  • chattr

    Many thanks for the step-by-step howto, which solved sound problems here.

  • Many congrats to the author of the article. I was missing libesd-alsa0 and i didn't know what to look for next to get sound working. This article saved me from a lot of googling and doc-reading.

    Thanks!

  • I was also missing libesd-alsa0 and hadn't run alsaconf...

    Thanks
    Jim

  • Thanx for the guide, it works, but every time i have to reboot i must do the same thing again? how i can repare this?

  • Ravi

    @pedro
    After you get sound working in Debian etch, you may use the command:

    # alsactl store

    and also include the following lines in your /etc/rc.d/rc.local file:

    alsactl restore

    I think this might do the trick. But really, It works without the above steps for me. So I am not sure why you have the problem.

  • Fabulous tip. Still a relative nervous newbie in Debian and found piece easy to follow. Listening to Dylan right now as I type.

    k1w1

  • After a 'base system' installation of Debian Etch, I followed the steps outlined in the article and now sound works.

    Could not get sound to work in Ubuntu Feisty on this hardware.

  • Nice post!!

    I've got the exactly same problem with my Debian Etch (even the same sound card ... lol). In fact I alredy had noticed that some alsa related packages were missing from the basic instalation.

    Would be nice if the debian's manteiners fix this little issue on the future releases.

    Thanks a lot man, your blog rulez :)

    ~Tony

  • jeanphe

    Thanks,
    Worked to install alsa but at boot time alsa said none loaded (driver).
    This fixed it for me:

    added (driver modules name)line to /etc/modules, ex: snd_sb16

    made symlink from /etc/init.d/alsa.sh to /etc/rcS.d/

    rename symlink to S41alsa.sh

    reboot.

  • thanks! i encounter the same problem and solve it by your article