Using ALSA

Introduction:

Example scenario: you set up ALSA per the instructions for your sound card, or your favorite Linux distribution comes with it already set up for you. You may be in KDE, or in a different window manager, and you have configured system notification sounds. Then you decide to play some mp3's or some music, only to find that kde and your music player are fighting over use of the sound card. This can be frustrating, as it can lead to either your music player being interrupted while it is playing a playlist, or to all the system sounds waiting for your music to stop before being all played in order.

Not all people will have these problems, but some of us are using onboard devices, such as my Intel 82801DB sound (AC97 codec). Mine does not have hardware mixing, and ALSA digital mixing isn't reliable enough to be used to duplex the sound, so I have written this in order to help teach people how to use a sound daemon, either artsd or esd, to duplex their sound.  For those of you using KDE or Gnome, this will be automatic but others, like those using XFCE or Fluxbox, will need to be shown how to run these daemons.

NOTE: This page used to be needed, but mostly now it is not.  Still, if you are having sound conflicts, this may be able to help you.

KDE Users:

KDE Control Panel:

In the KDE Control Panel, you must tell the audio system to auto-suspend when idle, and not to run with the highest priority possible.  Click on any of these icons to get the full image:

xterm

Then you must tell it to use ALSA. Some cards may need you to specify a custom bitrate, so see your sound card's ALSA documentation for more information about your specific sound card.  Be sure to specify plug:dmix to use ALSA's dmix.

xterm

Audacious:

You can set up Audacious to use ALSA dmix:

Audacious

How to configure Pidgin:

Pidgin can also be configured to use ALSA DMIX:

Pidgin

Conclusion

Linux ALSA is a good sound daemon, and when you use it properly, it can be a wonderful thing. Not all hardware was meant to be used the same, and some sound hardware is of a higher quality than others.  However, this should help you configure your applications to play fair when using ALSA output.

Many thanks to those out on irc.freenode.net in channels #alsa and #xmms, specifically tapas and mattam, who helped me learn how to do all this stuff. These instructions are partially theirs, and I am very grateful to them.

Credits

Valid HTML 4.01 Strict