The Solution
Via pavucontrol
(PulseAudio Volume Control), I set the sound card to work as a 4.1 output. That way, the front
and rear
jacks get enabled fully, and one channel of the center-subwoofer
jack. Exactly as I need it. If I wanted to connect more than 3 devices, I could also use 7.1 output to enable all 4 jacks.
I added a custom pulsaudio configuration file ~/.config/pulse/default.pa
:
# load the system defaults
.include /etc/pulse/default.pa
# create a stereo sink, duplicating to front, and rear jack,
# as well as mixing into the right channel of
# center-subwoofer jack (i.e. the subwoofer channel)
load-module module-remap-sink sink_name=duplicate sink_properties="device.description='duplicate to front, rear, and subwoofer'" master=alsa_output.pci-0000_00_1b.0.analog-surround-41 channels=6 master_channel_map=front-left,front-right,rear-left,rear-right,lfe,lfe channel_map=front-left,front-right,front-left,front-right,front-left,front-right remix=no
set-default-sink duplicate
The master=
parameter specifies the name of the 4.1 output I found via pacmd list-sinks
, which also shows the names of all available channels for master_channel_map=
. lfe
stands for "low frequency emitter", i.e. the subwoofer.
3 sink(s) available.
index: 0
name: <alsa_output.pci-0000_00_1b.0.analog-surround-41>
driver: <module-alsa-card.c>
…
channel map: front-left,front-right,rear-left,rear-right,lfe
Surround 4.1
…
After forcing a restart of PulseAudio with pulseaudio -k
, I can select the newly created virtual output and sound plays on all three jacks as desired.
Parameter Details
The virtual sink's name set with sink_name=
can be any name that is not already in use by another sink. The description in sink_properties=
is optional and can be anything.
master_channel_map=
specifies the original sink's channels that I want to map to. I specified lfe
twice, because I want to map both left and right channel to it. channels=
specifies the number of channels in master_channel_map=
.
channel_map=
specifies which channels the newly created virtual sink shall have, and to which channel of the original sink they are mapped to. There have to be exactly as many entries as in master_channel_map=
.
remix=no
disables needless remixing between channels, as recommeded in the PulseAudio documentation.