Distorted capture in pipewire-jack when number of connections increases (Ardour session)
- PipeWire version (
pipewire --version
): 0.3.65 - Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Fedora Linux 37 (Xfce) - Desktop Environment: XFCE
- Kernel version (
uname -r
): 6.1.9-200.fc37.x86_64
Description of Problem:
I can use pipewire-jack normally with small usage. I have an external pedalboard (POD X3 Live) which is seen as an external soundcard, and for a while I've been using it to process my guitar before I record it in my laptop using JACK. If I connect its output to the pipewire playback node, everything works fine until I open an Ardour session: then it starts deteriotating more and more. I suspect it may be due to the number of connections (I use a template with many MIDI tracks), but I'm not sure, since playback works just fine even with a lot of tracks, it's just the audio capture that gets garbled. Looking at existing issues, I wonder if it may be related to #2889 (closed), but I'm not sure, since in my case after I shut down Ardour, the audio capture goes smoothly again.
I made a few recordings to showcase the problem in different contexts. This is with node.latency = 512/48000
in jack.conf
:
It's not only garbled/distorted, but the pitch felt wrong too. Initially I suspected it was because of the configured latency, since with native JACK I remember I had to set 256 when using my POD as the capture device or JACK wouldn't start at all, so I set node.latency = 256/48000
in jack.conf
insteat and restarted pipewire. It sounded slightly better, but the problem was still there. This is an example of audio playing fine initially, and then progressively getting worse as I started Ardour in the meanwhile:
This other audio file, which I recorded shortly after that, is a simple ascending Em scale, but what I hear is apparently the same wrong-pitch-and-garbled audio from before setting 256 in jack.conf
:
This doesn't happen with native JACK, so it's not a driver problem or faulty hardware.
Additional Info (as attachments):
I wasn't sure what made sense from a debugging perspective, so I captured the output of pw-top
before launching Ardour:
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
I 28 0 0 0.0us 0.0us 0.00 0.00 0 Dummy-Driver
S 29 0 0 --- --- --- --- 0 Freewheel-Driver
I 38 0 0 0.0us 0.0us 0.00 0.00 0 Midi-Bridge
S 44 0 0 --- --- --- --- 0 v4l2_input.pci-0000_00_14.0-usb-0_11_1.0
S 51 0 0 --- --- --- --- 0 alsa_input.pci-0000_00_1f.3.analog-stereo
S 54 0 0 --- --- --- --- 0 alsa_output.usb-Line_6_POD_X3_Live-00.stereo-fallback
R 56 256 48000 58.0us 0.2us 0.01 0.00 9 S24LE 8 48000 alsa_input.usb-Line_6_POD_X3_Live-00.multichannel-input
R 50 0 0 0.0us 12.9us 0.00 0.00 9 S32LE 2 48000 + alsa_output.pci-0000_00_1f.3.analog-stereo
R 69 256 48000 40.8us 0.2us 0.01 0.00 9 + qjackctl
and after:
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
I 28 0 0 0.0us 0.0us 0.00 0.00 0 Dummy-Driver
S 29 0 0 --- --- --- --- 0 Freewheel-Driver
S 44 0 0 --- --- --- --- 0 v4l2_input.pci-0000_00_14.0-usb-0_11_1.0
R 51 256 48000 1.2ms 0.2us 0.22 0.00 65 S32LE 2 48000 alsa_input.pci-0000_00_1f.3.analog-stereo
R 38 0 0 39.8us 2.6us 0.01 0.00 65 + Midi-Bridge
R 50 0 0 6.6us 23.4us 0.00 0.00 65 S32LE 2 48000 + alsa_output.pci-0000_00_1f.3.analog-stereo
R 56 0 0 1.3us 38.3us 0.00 0.01 65 S24LE 8 48000 + alsa_input.usb-Line_6_POD_X3_Live-00.multichannel-input
R 69 256 48000 6.1us 0.1us 0.00 0.00 65 + qjackctl
R 73 256 48000 41.4us 1.1ms 0.01 0.20 65 + ardour
S 54 0 0 --- --- --- --- 0 alsa_output.usb-Line_6_POD_X3_Live-00.stereo-fallback
I also did a capture of pw-dump
when the problem was there, which I'm attaching here:
Please do let me know if there's any information I can provide to help debug the problem.