Fedora 34 and sample rate?

Hi Ardour,

I just made a 30 quid donation btw, this thing is great.

Anyway, moved to Fedora 34 today, and fired up Ardour … weirdness … I always started Qtjackctrl, set up my session, then fired up Ardour. Now, I can seemingly start Ardour without Qtjackctrl, so I think I am in Pipewire land, but no idea how to control it.

My session is set to 32 bit float, 48000 … I can see the WAV files in it are 48000 according to Gnome file properties. I gather from t’internet search 48000 is the default for Pipewire?

Anyway, good news … I seemingly have names for all the connections on my Focusrite card now, that’s nice. Bad news, the “pitch” has gone out of my recordings somehow, which suggests sample rate?

How can I work out what’s gone off?

1 Like

Yes, Fedora 34 switched to Pipewire by default. There are separate sub-packages for ALSA plugin and JACK plugin for Pipewire (i.e. Pipewire emulates those interfaces for applications, it still uses ALSA on the back side to communicate to the audio hardware).
I just updated to Fedora 34 a couple of days ago, I have not yet found the appropriate configuration tool to change backend sample rate, period size, etc.
I also have not found if there is a way to switch out the Pipewire JACK implementation for traditional jackd, and just use Pipewire for desktop sounds, but use jackd for audio production. Unfortunately more questions than answers at this point, but I’ll be poking around over the next few days to see what I can find (and to see if the Fedora documentation has been updated yet; possibly not since Pipewire is still somewhat of a work in progress, even though it is working pretty well currently).

I see. I really should have thought of this before upgrading :slight_smile:

Worst case, you could disable pipewire and use Ardour/ALSA (no JACK) instead. That’s generally preferable over JACK anyway.

see also the God Save Pipewire thread.

Using the “–allowerasing” option with dnf will allow installing jack-audio-connection-kit and jack-audio-connection-kit-dbus packages while erasing pipewire-jack-audio-connection-kit. That should have allowed jackd to run in parallel with pipewire, but I was not able to get it to run properly. There were two sessions logged in, my son had a session running with a USB connected headset, previously with pulseaudio I was able to start jackd and take over my USB connected external interface and use that with Ardour. When starting jackd the console output indicates that it is using the expected USB interface, but I get no audio.
I will have to try again after my son has logged out of the other session to see if perhaps pipewire is just not handling switching between multiple desktop sessions as well as pulseaudio did.

Well… If you want to change sample rate and/or buffer period you can start ardour using:

pw-jack -p 256 -s 44100 ardour6, for example.

Do you wanna know which sample rate Ardour started?

Try PIPEWIRE_DEBUG=3 pw-jack -p 256 -s 44100 ardour6

ps: If “ardour6” didn’t work then you have to point the path like this “/opt/Ardour-6.5.0/bin/ardour6

You can manage graphically all connections using Qjackctl if you wish.

Nice, thanks for those tips!

This looks like a clue? …

[I][000114150.153316][pipewire-jack.c:1097 check_sample_rate()] jack-client 0x560639766bc0: sample_rate 48000
[I][000114150.153366][pipewire-jack.c:3340 jack_get_buffer_size()] buffer_frames: 256
[I][000114150.153392][pipewire-jack.c:3317 jack_get_sample_rate()] sample_rate: 44100
[I][000114150.153404][pipewire-jack.c:2748 jack_client_close()] jack-client 0x560639766bc0: close

Turns out I forgot I had changed the configuration on my analog mixer from playback to recording configuration, which did not have the sound interface routed to my monitors.
After correcting that I was able to connect to the interface using the Ardour ALSA back end, at which point I could not get output from other system software through my USB interface, which I think indicates that pipewire honors the exclusive device access request from Ardour just like pulseaudio did on previous releases.
I was also able to switch the system sounds to a different device and start jackd and access my USB interface with Ardour using jackd.

So I think that pipewire in Fedora 34 is actually working relatively well, but I don’t find it as obvious where to find things like sample rate configuration.

Yes, I think that indicates on your system that pipewire is running at 44100 even though you had requested 48000. I have not yet found the correct place to change that on the fly.
You can edit /etc/pipewire/pipewire.conf to change the default, so if you always work at 48000 that would probably be the simplest solution. If you switch back and forth, then I am not sure if the jack_control application will connect to pipewire and change that for you or not, but it would be worth a try to check. I currently have the pipewire-jack implementation removed and the traditional jackd installed, so I cannot check myself at the moment.

I ended up just rerecording my tracks, thankfully they were just rough versions. Not sure what this will mean for other older finished sessions …

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