PW/WP not auto switching sample rates on USB DAC
Arch Linux Kernel: 5.18.14-arch1-1
[joltman@archlaptop sub0]$ pacman -Q | grep wire gst-plugin-pipewire 1:0.3.56-1 pipewire 1:0.3.56-1 pipewire-alsa 1:0.3.56-1 pipewire-docs 1:0.3.56-1 pipewire-jack 1:0.3.56-1 pipewire-pulse 1:0.3.56-1 wireplumber 0.4.11-2
I've got a Topping D90 USB DAC. It supports the following sample rates at 16bit/24bit/32bit:
44100,48000,88200,96000,176400,192000,352800,384000,768000
I have added these rates to /etc/pipewire/pipewire.conf in the following line:
default.clock.allowed-rates = [ 44100 48000 88200 96000 176400 192000 352800 384000 768000 ]
I have added a lua rule to /etc/wireplumber/main.lua.d/52-alsa-ToppingD90.lua. Here are the contents:
`rule_ToppingD90 = { matches = { { { "node.name", "equals", "alsa_output.usb-Topping_D90-00.iec958-stereo" }, }, }, apply_properties = { ["audio.allowed-rates"] = "44100,48000,88200,96000,176400,192000,352800,384000,768000", }, }
table.insert(alsa_monitor.rules,rule_ToppingD90)`
If I run Plexamp (or VLC) and play audio files of various rates, the USB DAC auto switches to the rate needed for the first play only. For example, I'm playing a 96kHz/24bit file, pw-top shows 96000 Rate for both the IEC958-stereo device (my DAC) as well as Plexamp.
If I got to a new song that's 44.1kHz, pw-top shows both the IEC958-stereo device and Plexamp at 96000 again. The DAC's display still shows 96kHz as well.
If I stop the song and close Plexamp and open it again to the same song (44.1kHz) and hit PLAY, pw-top shows 44100 for the rate on both devices and the DAC shows 44.1kHz on it's display.
This is not the behavior that I expect. Thank you for your help!