StokeBloke.com

Alsa Surround Sound with only stereo speakers

I use Gentoo linux for my home desktop and I have had a problem with the alsa sound settings since I moved from my old PC to my new 64bit PC.

The problem was that I only had stereo speakers connected to the front channel and I had to keep opening alsamixer to set the volumes for this channnel.

If I changed the volume in any applications it only updated the PCM channel, which didn’t affect the front channel and didn’t affect the speakers connected to it.

I finally decided to fix this today.

After a little searching I found this HOWTO Surround Sound document, via the gentoo forums, on the gentoo wiki.

After reading it and giving a few failed tries, I used the following for my .asoundrc settings.

# cat ~/.asoundrc
pcm.!dmix {
        type plug
        slave {
                pcm surround51
                channels 6
        }
}
pcm.!default {
        type plug
        slave.pcm "dmix"
        slave.channels 6
        route_policy duplicate
}

I then rebooted. In Alsamixer I set the front channel at 100, and pcm at 50. I then fired up mplayer, when I changed the volume the pcm channel was affected and it did affect my stereo speakers plugged into the front channel.

Additional info

# lspci | grep Audio
00:0f.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)
# cat /proc/asound/card0/id 
NVidia
# cat /proc/asound/card0/codec#0 | grep Codec
Codec: Realtek ALC885

Leave a Reply