Linux has mostly used PulseAudio for general applications and JACK for pro audio in recent times.
PipeWire is a new audio/video system that can replace both PulseAudio and JACK. I have just tried jammr with PipeWire for the first time and wanted to share what I found so far.
The advantages of PipeWire include:
- Unified audio system eliminates the split between general applications and pro audio.
- No need to start/stop JACK daemon.
- Compatible with PulseAudio and JACK applications (qjackctl, virtual instruments, DAWs, etc).
- Unlike JACK, it's compatible with Flatpak.
I tried pipewire 0.3.26 on Fedora 34 with Focusrite Scarlett Solo and Focusrite Scarlett 2i4 sound cards.
The first gotcha is that pavucontrol's PulseAudio device configuration affects PipeWire. If you turn off a sound card in pavucontrol then it will not be available in PipeWire or JACK applications either! Make sure to set the device to the “Pro audio” configuration.
jammr can be launched as normal. There is also a pw-jack wrapper utility but it's not necessary if you have PipeWire installed with JACK support and the old jackd is not installed.
Instead of seeing the usual JACK “System” input and output devices, the actual sound cards are displayed. This will surprise you if you're a long-time JACK user
. Selecting the appropriate input/output devices creates an audio connection from jammr to those sound devices.
The out-of-the box sample rate and buffer size is 48 kHz and 1024 frames (~21.3 milliseconds latency). Selecting a lower Latency value in jammr's sound settings does not seem to affect latency! The minimum buffer size can be set in the /etc/pipewire/ configuration files. Hopefully the defaults will be lowered so that it's not necessary to tweak the minimum buffer size.
Instead of editing configuration files I found the following environment variable affects the minimum buffer size:
$ PIPEWIRE_LATENCY=64/48000 jammr
This allowed jammr's Latency sound setting to take effect and it felt responsive again.
Next I tried running the Flatpak version of jammr. The JACK audio system did not show up in jammr's sound settings. It is probably necessary to pass the JACK socket to the application using a flatpak-run(1) option. I haven't investigated this yet but once it's solved I'll update the jammr Flatpak so it works automatically for all users.
Summary:
PipeWire can already be used with jammr. There are still a few gotchas but hopefully they will be eliminated as PipeWire matures. In the meantime you can use ALSA if you do not need to route audio between applications.