Topic: LInux Pipewire set default system audio channels

Hello.

How can i set default OS audio channels permanently?
I need to change the 1-2 pair to 9-10 for all apps.

Fireface 800
Ubuntu Studio 24.04
Pipewire 1.0.7

2 (edited by waedi 2024-08-01 07:30:04)

Re: LInux Pipewire set default system audio channels

In Totalmix do the routing from software playback channels 1/2 to the hardware output channels 9/10
'Flash current mixer state'
Use this feature of Totalmix to save the routing into the device.
otherwise you have to force all app developers changing their app for using channels 9/10 instead of 1/2.
Most apps are fix using channels 1/2 no matter what the system channels are set to.

M1-Tahoe, Madiface Pro, Digiface USB, Babyface silver and blue

Re: LInux Pipewire set default system audio channels

waedi wrote:

In Totalmix do the routing from software playback channels 1/2 to the hardware output channels 9/10
'Flash current mixer state'
Use this feature of Totalmix to save the routing into the device.
otherwise you have to force all app developers changing their app for using channels 9/10 instead of 1/2.
Most apps are fix using channels 1/2 no matter what the system channels are set to.

My flash is already set correctly (as you mention) in Windows.
Linux system apps play audio through ch 1-2 and FFADO mixer re-route them to 9-10.

This is not the solution, because i often need to record long audio takes while Interner Browser play video in the background (i mute Reaper output while recording). So right now i have ALL audio from system is printed to my Reaper recording takes. That's not what i want to.

4 (edited by waedi 2024-08-01 15:15:31)

Re: LInux Pipewire set default system audio channels

Different apps like browser etc. all use playback channles 1/2, all is mixed together and recorded at once.
There is no way to separate the audio as these apps has no option to select different audio outputs.

M1-Tahoe, Madiface Pro, Digiface USB, Babyface silver and blue

Re: LInux Pipewire set default system audio channels

waedi wrote:

Different apps like browser etc. all use playback channles 1/2, all is mixed together and recorded at once.
There is no way to separate the audio as these apps has no option to select different audio outputs.

Are we talking about Linux right now? Just want to make sure.

6 (edited by waedi 2024-08-01 16:43:24)

Re: LInux Pipewire set default system audio channels

No, about software in general.
Audio-multichannel compatibility is usually not available in free software.
Media players, internet-browsers, video conference tools, etc.

M1-Tahoe, Madiface Pro, Digiface USB, Babyface silver and blue

Re: LInux Pipewire set default system audio channels

waedi wrote:

No, about software in general.
Audio-multichannel compatibility is usually not available in free software.
Media players, internet-browsers, video conference tools, etc.

Pipewire.

8 (edited by waedi 2024-08-01 17:55:56)

Re: LInux Pipewire set default system audio channels

But the internet browser not.
And Pipewire can't divide the different sources of audio when those come ahead on the same channel.
Beside the browser what are those different sound sources ?

M1-Tahoe, Madiface Pro, Digiface USB, Babyface silver and blue

Re: LInux Pipewire set default system audio channels

And Pipewire can't divide the different sources of audio when those come ahead on the same channel.

If i understood MFS90 right, he does not want divide sth etc...
He just wants to route the default "system stereo" to other outs than 1/2 on his FF800.


I am not using linux (Pipewire/Pulseaudio) every day. And no FFADO (FF802 via USB here).
But if you do not want to hassle with seperate profile files copying and editing - as described here:
https://wiki.archlinux.org/title/PipeWire

Maybe qpwgraph is a quite easy gui+click option for you?
https://gitlab.freedesktop.org/rncbc/qpwgraph
I use it sometimes for quick reroutings - works fine for me.

“Do It For Her”
My Gear: Bontempi Magic light Keyboard

Re: LInux Pipewire set default system audio channels

The desire is unclear, I was referring to post 3 where audio recording contains video background from browser...

M1-Tahoe, Madiface Pro, Digiface USB, Babyface silver and blue

Re: LInux Pipewire set default system audio channels

In my opinion its clear...

How can i set default OS audio channels permanently?

Linux != Mac. Pulseaudio != CoreAudio.

And regarding Macs - at least Safari follows the default Outs, defined in AMS.
You can check this in AMS: Speaker configuration... -> select Multichannel. No matter if Stereo, 5.1, or whatever configuration is selected... Just make sure that (main) Left and Right channels are mapped to AES L and AES R for example. Open safari, play a youtube video and you will see in TM, that playbacks are on the AES now...

“Do It For Her”
My Gear: Bontempi Magic light Keyboard

12 (edited by sandroid 2025-10-22 10:02:06)

Re: LInux Pipewire set default system audio channels

I'm running CachyOS (k6.17.4-4-cachyos).
Found a wireplumber solution that works for me so i'm adding it here for future reference.

In a terminal run: wpctl status

  • This should produce a list of Pipewire clients, audio and video devices.

  • Find your device and remember the number infront of it.

  • In my case i have a Digiface USB and it had the number "54".

https://i.imgur.com/3eHlmzc.png


Next run the following command: wpctl inspect {ID} | grep "device.bus-id"

  • Replace {ID} with the number of your device

  • Copy or note down the bus-id of the device

https://i.imgur.com/vpT1u3M.png

Now create a configuration for wireplumber. In my case i created a file in:

/etc/wireplumber/wireplumber.conf.d/10-map-stereo-channels.conf

with the following content:

monitor.alsa.rules = [
  {
    matches = [
      {
        node.name = "~alsa_output.{YOUR-BUS-ID}.*"
      }
    ]
    actions = {
      update-props = {
        audio.position = "AUX0,AUX1,AUX2,AUX3,AUX4,AUX5,AUX6,AUX7,AUX8,AUX9,AUX10,AUX11,AUX12,AUX13,AUX14,AUX15,AUX16,AUX17,AUX18,AUX19,AUX20,AUX21,AUX22,AUX23,AUX24,AUX25,AUX26,AUX27,AUX28,AUX29,AUX30,AUX31,FL,FR"
      }
    }
  }
]

You have to change two things here:

  • Replace {YOUR-BUS-ID} with the bus-id of your device

  • Change the content of audio.position to reflect the output channels on your device.

  • In the example above, FL and FR are actually AUX32 and AUX33. Which is the headphone jack on the Digiface USB (Channels 33/34). This is where i want my audio to play from.

  • If you want to play your audio through Channel 5/6, you would replace AUX4 and AUX5, with FL and FR

Save the file and restart and all desktop audio should now play through your designated channels.

13 (edited by Outdoor Miner 2025-10-22 11:32:32)

Re: LInux Pipewire set default system audio channels

Just wanted to say thanks for taking the time to write all that up!

I actually gave up on moving to Linux for the time being after much time and effort - mostly due to general audio instability with Pipewire that nothing seemed to help (despite everything looking OK in pw-top) but my channels being mapped completely wrongly and that also being very difficult to solve was another factor. The closest I could get it still had my ADAT channels be completely useless because they were just mirrors of the main channels.

Maybe if I'd seen this I could've at least got that part working.

14 (edited by sandroid 2025-10-22 18:45:50)

Re: LInux Pipewire set default system audio channels

You are most welcome - even if i‘m late to the party.

I just moved to Linux over the weekend. Everything was smooth sailing until i tried to get my RME Digiface USB to behave normally. It took me essentially 3 days to get it to behave in an acceptible manner, so that i can do atleast basic audio things without much trouble.

It‘s fine for me now, since the all-day move to CachyOS was mostly for software development.
I still dual boot to Windows 11 for anything audio related that needs to be taken serious.

So yeah, i totally understand you.
I left it here mostly so that anyone that runs into the same issue in the future (may even be myself at some point again), will find the info if they ever need it.

15 (edited by AutoStatic 2025-10-23 14:44:45)

Re: LInux Pipewire set default system audio channels

For WirePlumber < 0.5.0 (like Ubuntu 24.04) this can be done as follows:

Create ~/.config/wireplumber/main.lua.d:

mkdir -p ~/.config/wireplumber/main.lua.d/

Add a LUA script in that directory called 99-map-stereo-channels.lua with the following content:

rule = {
  matches = {
    {
      { "node.name", "matches", "<NODE_NAME_OF_RME_DIGIFACE_USB>" },
    },
  },
  apply_properties = {
    ["audio.position"] = "AUX0,AUX1,AUX2,AUX3,AUX4,AUX5,AUX6,AUX7,AUX8,AUX9,AUX10,AUX11,AUX12,AUX13,AUX14,AUX15,AUX16,AUX17,AUX18,AUX19,AUX20,AUX21,AUX22,AUX23,AUX24,AUX25,AUX26,AUX27,AUX28,AUX29,AUX30,AUX31,FL,FR"
  },
}

table.insert(alsa_monitor.rules,rule)

Restart PipeWire and WirePlumber:

systemctl --user restart pipewire wireplumber

16 (edited by rmeusername 2025-10-27 12:25:45)

Re: LInux Pipewire set default system audio channels

Thanks alot for this write-up, this actually helped me with my problem of rewiring the main outs.
Which is now fixed smile

sandroid wrote:

I'm running CachyOS (k6.17.4-4-cachyos).
Found a wireplumber solution that works for me so i'm adding it here for future reference.

In a terminal run: wpctl status
......................
.