You are not logged in.

#1 2021-08-28 14:10:20

uberben
Member
Registered: 2010-08-18
Posts: 78

How to remap speakers of a 5.1 setup?

I recently moved my computer setup and, due to a weird proprietary cable, my right channel speaker needs to be at the left of my desk and the left channel at the right. I would like to swap these in software. These speakers are part of a 5.1 surround setup. Up until this point I have been using them as 2.1 speakers, but in this new location I'll likely try to get the rear speakers wired up again at some point.

I found in the PulseAudio portion of the wiki a description for swapping left and right channels (https://wiki.archlinux.org/title/PulseA … t_channels), which technically worked for me, but it turned my audio config into a basic stereo output. It also removed the additional settings found in the Gnome sound settings panel (in particular, I like to turn down the subwoofer volume as my sub is very bassy at low volumes).

I also attempted the `pulseeffects` method of swapping channels but couldn't quite get that working. It kind of looks like it might be another stereo only option anyway.

Is anyone aware of any other ways to swap the left and right channels of a 5.1 speaker setup? (If there isn't a great software option, I'm not ruling out making a 3.5mm adapter that swaps the wires in hardware, but that will be a last resort).

Offline

#2 2021-08-28 16:19:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: How to remap speakers of a 5.1 setup?

This can readily be done with alsa, though I don't know how well it would play with pulseaudio if the latter is running.  For also you just need to add ttable mappings to your relevant config block, e.g., to just swap left and right and leave everything else alone:

pcm.myNewPcm {
   type route
   slave.pcm myOldPcm
   ttable.0.1 1
   ttable.1.0 1
}

You may also need to add identity mappings for all the other channels (e.g, `ttable.3.3 1`).

A real example of ttable use here:
https://wiki.archlinux.org/title/Advanc … n_examples

Last edited by Trilby (2021-08-28 16:25:14)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2021-08-29 03:21:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,951

Re: How to remap speakers of a 5.1 setup?

That link on the pulse page is weird and will break normal card set up. (.... I really need to sit down and fix the pulse and ALSA articles at some point)

Pulse has a remap sink module

.nofail
load-module module-remap-sink sink_name=SwappedSurround sink_properties="device.description='Speakers'" remix=no master=alsa_output.pci-0000_00_1f.3.analog-stereo channels=6 master_channel_map=front-left,front-right,rear-left,rear-right,front-center,lfe channel_map=front-right,front-left,rear-left,rear-right,front-center,lfe

add that to the end of your /etc/pulse/default.pa replace the master= line with whatever name is applicable for your normal 5.1 sink as listed in pacmd list-sinks. Not sure whether you want the remix=no or yes depends on whether you are upmixing 2-channel sources.

Last edited by V1del (2021-08-29 03:42:01)

Offline

Board footer

Powered by FluxBB