When playing music using Spotify, I get some minor distortion every few minutes or so. It’s not obnoxious, lasts probably just a few milliseconds, but it’s noticeable.
Spotify always plays at 44.1 kHz, and my sound output only accepts 48kHz, so there has to be a sample rate conversion.
I haven’t noticed any issues playing from other applications, like Chrome and Firefox, (but it’s harder to notice in videos than music, so can’t be sure).
I’m using HDMI output through a TV, then optical SPDIF from the TV to an amplifier (I will try to get a dedicated sound card with SPDIF, but I don’t have any such output at the moment). It is a virtual machine on a host with a quite old server CPU, VGA passthrough. It’s had no issues on pulseaudio based distros and on a Windows VM.
I’ve installed a PCIe sound card (with passthrough to the VM), so I can use 44.1kHz directly to the DAC now. I also had to enable the sample rate in the pipewire config. It seems like a significant improvement, but there’s still some xruns, happening only about once every 5 mins.
There ERR counter in pw-top increases on the app-side, in bursts of 1 to 4 units. I see that it’s negotiated a 8k QUANT for the music player, which is good - no latency requirement there.
S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
S 28 0 0 --- --- --- --- 0 Dummy-Driver
S 29 0 0 --- --- --- --- 0 Freewheel-Driver
S 40 0 0 --- --- --- --- 0 Midi-Bridge
S 45 0 0 --- --- --- --- 0 alsa_output.pci-0000_00_09.0.hdmi-stereo
R 46 1024 44100 333.5us 24.6us 0.01 0.00 0 S32LE 2 44100 alsa_output.pci-0000_00_0a.0.iec958-stereo
R 59 8192 44100 154.4us 43.0us 0.01 0.00 4 F32LE 2 44100 + spotify
S 47 0 0 --- --- --- --- 0 alsa_input.pci-0000_00_0a.0.analog-stereo
I think it’s a different issue. For me the problem was primarily cause by two things:
Pipewire had to do sample rate conversion because I only had output of 48kHz over HDMI. I was trying to play 44kHz audio. Youtube on the other hand will usually use 48kHz.
The latency of the system is high and unpredictable because of how it was a VM.
Once I fixed the first problem by using a different sound card, the problem was much less bad.
Alex you could have the opposite issue, which is also the same issue. You can try to run pw-top and check the FORMAT column. If it says 44100 next to alsa_output....., but 48000 next to the browser, then your pipewire may be stuck at 44100 kHz output and has to do sample rate conversion.
I used Windows on the VM for a while, but after adding other loads to the server, even that had distortions every few minutes. The good news is that I tried Fedora again and it works much better than Windows did. Very minimal sound distortions now! This is fantastic, I can finally enjoy music again and not be annoyed when watching youtube videos.