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.

Advertisements

6 Responses to “ALSA Stereo Channel Swap?”


  1. 1 Chris May 20, 2005 at 7:35 am

    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 May 21, 2005 at 7:43 am

    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 April 21, 2006 at 10:24 am

    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 April 21, 2006 at 10:30 am

    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 April 21, 2006 at 10:31 am

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

  6. 6 Mark April 22, 2006 at 2:08 am

    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!


Comments are currently closed.




%d bloggers like this: