Fedora 19: Swap left and right pulseaudio channels
Why would anyone want to swap left and right pulseaudio channels? After some web searching I found that I am hardly alone. The classic problem is that your computer is on one side or the other, the audio-in cable goes to one speaker or the other, and the audio cable is too short. But this is linux, after all, so most things if not all things are possible, right?
The first fix I came across was simple enough except sadly it didn't work.
This called for editing /etc/pulse/deamon.conf and uncommenting the lines
; default-sample-channels = 2
; default-channel-map = front-left,front-right
to appear as
default-sample-channels = 2
default-channel-map = front-right,front-left
and then restarting pulseaudio with
pulseaudio -k
Seemed very clean and elegant except that it didn't work. :(
The next answer from here and this worked great.
The steps (reproduced here) are:
The first fix I came across was simple enough except sadly it didn't work.
This called for editing /etc/pulse/deamon.conf and uncommenting the lines
; default-sample-channels = 2
; default-channel-map = front-left,front-right
to appear as
default-sample-channels = 2
default-channel-map = front-right,front-left
and then restarting pulseaudio with
pulseaudio -k
Seemed very clean and elegant except that it didn't work. :(
The next answer from here and this worked great.
The steps (reproduced here) are:
- cat /proc/asound/cards and use the name string for the device you wish to use (the one in square brackets)
- Edit /etc/pulse/default.pa and comment out module-hal-detect and module-detect lines.
- Search for the commented-out line that starts "#load-module module-alsa-sink", uncomment it and change it to
load-module module-alsa-sink device=hw:[answer from step 0] channel_map=right,left
- Restart the pulseaudio deamon by running
pulseaudio -k; pulseaudio -D
The results of the cat operation for me were:
0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xf77f8000 irq 62
1 [HDMI ]: HDA-Intel - HDA ATI HDMI
HDA ATI HDMI at 0xf78fc000 irq 63
The lines that of /etc/pulse/default.pa that I commented out (just slightly different then what is written above) were:### Automatically load driver modules depending on the hardware available#.ifexists module-udev-detect.so#load-module module-udev-detect#.else### Use the static hardware detection module (for systems that lack udev support)#load-module module-detect#.endifand the line that I uncommented out and modified now looks likeload-module module-alsa-sink device=hw:"MID" channel_map=right,leftOne can apparently use a numbering scheme to refer to a hardware device like "device=hw:1,0" or "device=hw:0,0" but I did not have to resort to that, and preferred to refer to the device by it's string based designation as seen here.This method worked perfectly - now when I go to Gnome settings and "Sound" I can "test speakers" and have the expected results. Instead of presenting me a list of named audio devices like "analog" and "HDMI" I simply get "Built in audio" as my choice but I'm fine with that. :)
Comments