Surround and headphones

I bought a sound card with surround output. I don't really use any surround sound, but I often switch between speakers and headphones. I found a way to exploit the surround output. I connected the front stereo output to the speakers and connected my headphones to the surround output. I had to prepare a configuration file (I found examples in the Internet) that is saved in the "~/.asoundrc" file:

pcm.ch40dup {
    type route
    slave.pcm surround40
    slave.channels 4
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1

pcm.!default {
        type plug
        slave.pcm "ch40dup"

pcm.dsp0 {
        type plug
        slave.pcm "ch40dup"

This ALSA configuration file routes duplicated output to front and surround out. Now I can use mixer to adjust volume for front (speakers) and surround (headphones) independently.

To make my life even easier I wrote a small script that switches between two sound profiles: speakers with music and headphones with microphone. I'm not publishing the script because it uses soundcard-specific control names. The script also turns the music player on and off. I created two icons on the system tray and linked them to the script.


Author: automatthias

You won't believe what a skeptic I am.