PipeWire: Configure Audio Channels

My computer is a dual-boot Fedora 36/Windows 10 system with a Intel Corporation 100 Series/C230 Series Chipset Family HD Audio Controller [8086:a170] onboard sound card supporting up to 7.1 surround sound. Connected to it is a Creative Labs Inspire 5300 5.1 speaker system.

When following the color coding on the backpanel, I get normal sound in Linux on all 5 boxes (plus sub-woofer). However, in Windows the drivers are a bit stubborn and the only way to successfully configure the 5.1 surround sound appears to be to use the blue Line-In port (instead of the black rear speaker port), which then asks to be configured to be the side speakers (since 5.1 technically does not have rear speakers).

In order to not wildly plug my 3.5mm jacks every time I change between Windows and Linux, I wonder how one could assign these ports freely in Fedora.

When running pw-cli dump I noted two lines on the intended sound card:

audio.channels = 6
audio.position = FL,FR,RL,RR,FC,LFE

I am, however, unsure on how to “shuffle” the order and or change “RL,RR” to “SL,SR”.
Trying to look for config examples I found very little and with even less documentation. There are a few files in /usr/share/pipewire, but I was not able to properly decipher what they are doing and how.

Does anyone have a bit more experience and can lend me a hand, please?

Of course, if someone knows this card & drivers (which seems to be RealTek on the backend) and knows how to bend Windows to behave, would also be nice. Though I understand that this would be the wrong forum for that. :smiley:

If it works properly in fedora good for you.

If it then fails in windows this is certainly the wrong forum. The software is not open source and users here (and the forum) normally focus on linux, not windows.

Your answer is counter-productive as my question circles around how I can configure the speaker set in PipeWire in Linux to make the physical configuration change I have to do in Windows to work in Linux as well.

The last paragraph was to be understood more humorously (hence the smiley). How sad that I had to explain that.

For a good and proper audio configuration in Linux, I use EasyEffects, the successor to PulseEffects, based on Pipewire.

I don’t know much about audio stuff and I could be wrong but this looks close to what you want since you mentioned audio.position

1 Like

EasyEffects once installed correctly automatically creates a sink for you.

1 Like

You can do this with wireplumber by modifying the alsa configuration.
reference is here, ALSA configuration — WirePlumber 0.4.11 documentation

Default configuration is at, /usr/share/wireplumber/main.lua.d/50-alsa-config.lua
if you want to do this system wide you’ll want to copy this to /etc/wireplumber/main.lua.d
For the user configuration copy this to ~/.config/wireplumber/main.lua.d/

To figure this out I’d recommend utilizing the user configuration primarily because it will be easier to modify and would only break sound for that user.

You’ll want to get your device information:
wpctl status
Look for the sink you want to modify
wpctl inspect <sink number>

You’ll want to get the node name and add a matches rule to the 50-alsa-config.lua to modify the audio.position.

For example, I use this to change the audio priority on my HDMI

{
    matches = {
      {
        -- Match my hdmi.
        { "node.name", "matches", "alsa_output.pci-0000_03_00.1.hdmi-stereo-extra1" },
      },
    },
    apply_properties = {
      ["priority.driver"]        = 1009,
      ["priority.session"]       = 1009,
    },
2 Likes

How sad that you seem to think that having windows use the ports improperly and different than the motherboard is designed for means you want to take that as the ironclad config and have to modify the output from linux which is proper to start with and make it like the screwed up config from windows. :person_shrugging:

I don’t use windows for sound so would never even consider to look at their config.

As initially stated, I use a dual-boot system. There Windows acts as gaming platform. For the rest I use Linux. The drivers under Windows are a story for themselves, but inflexible enough to use the blue Line-in port as configurable side speakers. Using the black rear speakers as ordinarily designed does not seem in RealTek’s concept to be used on a 7.1-capable sound card if one only has 5.1 speakers.

Since I cannot convince Windows to do it right, I try to apply the change on a more flexible platform. So, as sad as it may sound to you (as well as it sounds to me), but to avoid physically replugging the rear speakers to satisfy the system I want to start, I rather want to have a software change in the interim. This is, until I either can find a way to convince the Windows drivers of the folly of their way or get another sound card, which behaves properly.

Since you state yourself that you do not use Windows for sound, it would be more useful for you to assist people on topics you have experience with rather than putting off people on topics where you have less (or no) experience. This is, as stated counter-productive as it costs your time and energy which can more properly been used on other topics available in this forum, and it also costs my time and energy to bring the topic back on track.

1 Like

@wayland-x12 Following the instructions of the link you provided seems to do something, but I haven’t had the luck of remapping the physical port. So far I got the GUI to show the side speakers instead of the rear using a custom sink following their “Coupled Streams” topic, but the physical speakers still need to be plugged in to the black audio jack for audio to come through. Still testing, but thanks for the link! A really good find.

1 Like