• Domi@lemmy.secnd.me
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    Check out qpwgraph: https://flathub.org/en/apps/org.rncbc.qpwgraph

    It’s like Helvum but it can save patchbays and restore them on boot.

    The easiest solution is to create a virtual audio device through your Pipewire config and then use qpwgraph to link them up to your physical device on boot.

    I can copy my Pipewire virtual device config if you need it.

    I have used this setup to separate game audio from voice audio when streaming for years.

    • buddascrayon@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      5 days ago

      Yeah, if you could post your setup that would be great. I think it would give me a better idea of how things work. Though, my goal is to consolidate sources to multiple outputs not to separate them.

      • Domi@lemmy.secnd.me
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        5 days ago

        my goal is to consolidate sources to multiple outputs not to separate them.

        Works the same way, just in reverse.

        Put the following in ~/.config/pipewire/pipewire.conf.d/10-virtual.conf

        context.objects = [
            {   factory = adapter
                args = {
                    factory.name     = support.null-audio-sink
                    node.name        = "Virtual-Sink-1"
                    node.description = "Virtual Sink 1"
                    media.class      = "Audio/Sink"
                    audio.position   = "FL,FR"
                }
            }
        ]
        

        If you need more than stereo, you can adjust it in audio.position. If you need multiple devices, just copy/paste the block between the {} multiple times and rename the device.

        After that restart your system, you should now have a new audio device called Virtual Sink 1, select it as default device.

        Start qpwgraph and connect the Virtual sink(s) to your output device(s) by dragging the monitor nodes to the playback nodes:

        You can now try if everything sounds correctly. If it does, hit Ctrl + S in qpwgraph to save your patchbay somewhere. It will save all the connections you just made and establish them on start and on the fly if new devices are added.

        Next up, add an autostart entry for qpwgraph. This depends on your desktop environment, add the --minimized flag so you don’t see the qpwgraph window every boot. You can also select “Start minimized to system tray” in “Graph” -> “Options”.

        If you only need certain applications to go to both devices, you can also achieve this without the virtual device by just dragging your application node directly to your bluetooth device in qpwgraph and saving the patchbay, it will route the audio automatically every time the application starts.