The PulseAudio way (tested on Ubuntu 10.04, should work on 9.04):
Copy /etc/pulse/default.pa
to ~/.pulse/default.pa
, and add the following two lines to the end:
load-module module-remap-sink sink_name=reverse-stereo master=0 channels=2 master_channel_map=front-right,front-left channel_map=front-left,front-right
set-default-sink reverse-stereo
Restart PulseAudio by running pactl exit
at the command line.
Leave out the second line if you don't want to use the reversed stereo by default. You can switch between reversed and normal stereo output in the "Output" tab in Sound Preferences. If you do have root and want this system wide, you can just add the lines to /etc/pulse/default.pa
instead of making a user-specific configuration.
This configuration makes a few basic assumptions: that the card you're reversing the channels of is card 0; that you only have to deal with 2 channels; and that those channels are called front-left
and front-right
.
If you have a videocard with HDMI out, it is likely the analog out of your motherboard will be card 1, not 0; so master=1. (Front Panel headphones are likely on this analog channel)
For more information, see the PulseAudio documentation for module-remap-sink.
1Swap the speakers? – user1686 – 2009-10-23T16:56:01.963
4I have to have my speakers swapped. That's why I wanted to reswap the stereo channels :D – Auron – 2009-10-26T16:18:58.740