PipeWire Multiple Devices HowTo

Hi - I had hopes that I would find this thread on the Interwebs - no success, so I ask humbly to create it.

We have Virtual devices · Wiki · PipeWire / pipewire · GitLab - but how does a valid / usable / fine-tuned / optimal configuration look for Ardour that makes it possible to use two multi-channel hardware devices?

I´d like to use an USB mixer plus a Hammerfall - two good devices, but I always have to decide in Ardour, which workflow to follow… so sad. It would be a great step for the setup if Ardour could just use both - can I do that with PipeWire?

If anybody has working setups - please make a video / blogpost / whatever - show it to the world! THANKS!

Have nice day!

I don’t know about pipewire, but Ardour/ALSA can use multiple devices. Except Ardour’s Engine Dialog only allows to configure separate input/output devices with the GUI.

At this point in time you have to set the environment variable ARDOUR_ALSA_EXT. e.g. to use the first two sound-cards found on a system start Ardour like this:

ARDOUR_ALSA_EXT="hw:1" Ardour6

and then pick Audio System: ALSA, Input+Output device: hw:0 in Ardour’s Engine dialog.

In this case “hw:0” will act as main device and provide clock, while adaptive resampling is used for the additional device.


PS. you can also specify more devices, semicolon separated, and provide additional parameters as well. e.g.

ARDOUR_ALSA_EXT="hw:2@48000/512*3;hw:3@44100"

This adds hw:2 running at 48kHz sample-rate, 512 samples/cycle and 3 cycle-periods, and hw:3 using 44.1kHz sample-rate (and same buffer-size as the main device).
run aplay -l to list devices.

Thanks, I will try, but would like to learn more - BTW searching for ARDOUR_ALSA_EXT in the Ardour manual does show me only results that do not contain that string at all! It should say “no results” instead.

The source has only one place with ARDOUR_ALSA_EXT:
ardour/alsa_audiobackend.cc at bf43c8d2d485755483e603568de635372a152178 · Ardour/ardour · GitHub

Is there some more information about how to use this facility?

Thanks again and mucho love for the quickness!

No, there isn’t. Except it is discussed every now and then on IRC.

PS. Which additional information do you need?

I use my USB interface and pipe it into the HDMI out of my TV/monitor (I really need to get some dedicated studio monitors). The inputs and outputs both show up in the routing graph with Pipewire, so i had to do absolutely nothing.

What OS are you running? Do you have pipewire-jack-dropin installed?

this just came out and maybe is helpful!

1 Like

Apply Betteridge’s law of headlines :slight_smile:

3 Likes

though he is kind of surprised that the answer could be yes… ? :slight_smile: :slight_smile:

And when I looked up “Betteridge’s Law of Headlines”, I was amused by the second paragraph of the Wikipedia article: “The maxim has been cited by other names since 1991, when a published compilation of Murphy’s law variants called it “Davis’s law”, a name that also appears online without any explanation of who Davis was.” Paul’s Law of Linux audio headlines? :grin:

3 Likes

Yes, pipewire will see all of your devices and allow you to use as many as you want. Check out the video by UNFA to see how it works.

Just chippin’ in to say I’ve installed pipewire (for a totally different reason) using this guide:
How to Enable PipeWire Audio Service to Replace PulseAudio in Ubuntu 21.10 & 21.04
And whilst I haven’t tried to properly record, nor lower the latency yet, I was mind blown by having everything showing up in carla straight away. I could start a JACK Ardour session without starting JACK and whilst having a video playing in the browser, then grab the output of firefox and feed it into an audio track input and record it. Then plugged my external USB interface which appeared immediately, ready to go, without restarting anything. And it looks like I could even output the whole thing to my screen’s tiny speakers!

So well, not saying it was impossible to do this kind of stuff before, but personally, I’d never managed it. It’s pretty much how I always thought JACK “should” work in theory (and kept telling every non-linux users that’s how it “did” work in practice, just to show off).

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.