ALSA Stereo Channel Swap?

I’ve got the left and right channels reversed on my computer speakers. Moving the actual speakers is too much of a pain. If anyone knows how to instruct ALSA to swap the channels, I’d love to hear about it.

6 Responses to “ALSA Stereo Channel Swap?”


  1. 1 Chris

    You need to setup some mappings in your ~/.asoundrc or /etc/alsa.conf

    http://www.alsa-project.org/alsa-doc/doc-php/asoundrc.php?module=Generic

    -Chris

  2. 2 Administrator

    I tried this. It doesn’t work.

    pcm.reverse {
    type route
    slave.pcm “hw:0″
    ttable.0.1 1
    ttable.1.0 1
    }

  3. 3 QuinoX

    The trick is to make the settings apply to your normal settings. If you name the device pcm.reverse you have set up programs to use that specific device.

    If you don’t want to do that with every program, you should apply the settings to the !default device:

    quinox@pos ~ $ cat .asoundrc
    pcm.!default {
    type route;
    slave.pcm dmix;
    ttable.0.1 1;
    ttable.1.0 1;
    }

    This will use dmix as slave device (the software stream mixer), so different programs can use the sound card. For my setup this is needed because my sound card can’t do hardware mixing.

    (sorry for replying to such an old post, but since google places this site quite high it might benefit other people.)

  4. 4 QuinoX

    I have the same setup, and this works for me:

    ~ $ cat ~/.asoundrc
    pcm.!default {
    type route;
    slave.pcm dmix;
    ttable.0.1 1;
    ttable.1.0 1;
    }

    This will make the settings apply to the default pcm device, so it works with every alsa program without having to specify what device they have to use (with your earlier posted config you need to tell programs to use your “reverse” device to make it work)

    The DMix slave is there to do software mixing so different programs can use the soundcard at the same time. For me this is needed since my card cannot do hardware mixing (Damn you sound card manufacturers !)

  5. 5 QuinoX

    D’oh, my apologies for the double post - After submitting my first one, nothing happened so I thought it was lost.

  6. 6 Mark

    QuinoX,

    The channels do indeed reverse this way. It’s funny, however, that panning in XMMS is still backwards. Panning fully to the left still makes the right speaker louder, and vice versa.

    However, the channels are definitely coming out of the correct speakers now. Thanks!

Leave a Reply




Creative Commons Attribution-NonCommercial 3.0 United States
Creative Commons Attribution-NonCommercial 3.0 United States