Pulseaudio Nightmares - Pure ALSA to the Rescue

In the latest stable Ubuntu (9.04), pulseaudio still does not work reliably on my hardware (intel HDA with digital SPDIF out). I upgraded to 9.10 and had even more problems. Sound always worked on boot, but often broke down after a while. And I could not find easy ways to make it work other than rebooting… Killing/restarting pulseaudio, looking at the processes using snd did not work.

One thing works wonderfully, pure ALSA. To have multilple apps sharing ALSA, I just use dmix. As I use digital out, there is no mixer, but ALSA can provide one through softvol. It works really well. ALSA is already not that simple to configure/setup properly, but with pulseaudio on top, welcome to your worst configuration nightmares.

Here is the .asoundrc I use:

pcm.amix {
type dmix
ipc_key 50557
slave {
pcm “hw:0,1”
period_time 0
period_size 1024
buffer_size 8192
bindings {
0 0
1 1

pcm.softvol {
type softvol
slave {
pcm “amix” #redirect the output to dmix (instead of “hw:0,0”)
control {
name “PCM” #override the PCM slider to set the softvol volume level globally
card 0

pcm.!default {
type plug
slave.pcm “softvol” #make use of softvol

comments powered by Disqus
Tweet Submit to reddit
© 2006-16 Fabien Creative Commons License This work is licensed under a Creative Commons Attribution 4.0 International License.