I’ve run into the crackling problem recently as well. I think the ALSA module is improperly requesting a very low quant value causing applications to have a tiny audio buffer which they fail to keep filled, resulting in crackling.
To see if this is what’s happening, try running pw-top and see if the quant column is a small number (~200). This is a very short audio buffer, it’ll be low latency but if the source application can’t keep the buffer filled then you will get the crackling effect. You can increase this value by setting a global minimum with:
pw-metadata -n settings 0 clock.min-quantum 2048
It will set the audio buffer to 1024/48000 seconds (or .0434s, 43.4ms). It will introduce a bit of latency (you can decrease the quant to 512 for ~20ms if you need lower latency).
This will not persist past a reboot, you’d have to edit a config file for that (pipewire.conf, maybe?).
I’ve run into the crackling problem recently as well. I think the ALSA module is improperly requesting a very low quant value causing applications to have a tiny audio buffer which they fail to keep filled, resulting in crackling.
To see if this is what’s happening, try running pw-top and see if the quant column is a small number (~200). This is a very short audio buffer, it’ll be low latency but if the source application can’t keep the buffer filled then you will get the crackling effect. You can increase this value by setting a global minimum with:
It will set the audio buffer to 1024/48000 seconds (or .0434s, 43.4ms). It will introduce a bit of latency (you can decrease the quant to 512 for ~20ms if you need lower latency).
This will not persist past a reboot, you’d have to edit a config file for that (pipewire.conf, maybe?).