Wireplumber version 0.5 no longer supports Lua configuration scripts (see Migrating configuration from 0.4 — WirePlumber 0.5.7 documentation), therefore it will ignore this type of script.
For newer versions, add a /usr/share/wireplumber/wireplumber.conf.d/51-fix-crackle.conf
file (or /etc/wireplumber/wireplumber.conf.d/51-fix-crackle.conf
to keep it out of /usr/
as @John_Flatness suggests) with the following:
monitor.alsa.rules = [
{
matches = [
{
node.name = "alsa_output.pci-0000_00_1f.3.analog-stereo"
}
]
actions = {
update-props = {
audio.format = "S16LE",
}
}
}
]
Also, instead of restarting the computer, you can just restart PipeWire and Wireplumber:
systemctl --user restart pipewire.socket wireplumber.service
TIP: you can see debug information about PipeWire & Wireplumber with:
systemctl --user status pipewire{,-pulse} wireplumber
Other tip, to see the format of current playing audio:
cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 32768