Pipewire interface of VLC always resampling
I am trying to get VLC to output via the pipewire interface the exact sample rate and format supported by my hardware. I don't know if this is an issue with pipewire/wireplumber or with the VLC pipewire interface module.
I have a USB DAC that supports the standard sample rates up to 768KHz. I edited the pipewire.conf (default.clock.allowed-rates) and 50-alsa-config.lua (["audio.allowed-rates"]) and set the allowed rates to the complete list supported by my hardware. I left the pipewire default.clock.rate and ["audio.rate"] fields in both files commented out.
The issue I have is that when playing hi-res files > 48KHz it seems that the pipewire interface in VLC always resamples to 48KHz as seen in pw-top. I do have resampling disabled in VLC so it should be outputting the native files sample rate.
When I use the ALSA interface in VLC instead of the pipewire interface it works without issue and will output the native sample rate as verified in /proc/asound/..hw_parms for the USB DAC. But with this, there is a delay in starting the output for each music track of around 1 second or so.
If I set the default.clock.rate and ["audio.rate"] fields to 96Khz or some rate higher than 48Khz, then pipewire will set the interface to that rate but again, not to the native rate of the file. This is true even when playing a file with a sample rate below what the default.clock.rate and ["audio.rate"] fields are set to. I do not understand why the
So it seems that this issue only occurs when using the pipewire interface in VLC. If I use Deadbeef the sample rate when using the pipewire plugin work as expected which leads me to believe that it is most likely an issue with the VLC pipewire interface module.
Lastly I can not get pipewire to output 32 bit float to ALSA as it is always changes it to S32LE even though I have the field ["audio.format"] = "FLOAT_LE" in 50-alsa-config.lua. I do not see an equivalent field in pipewire.conf. This is not a big issue as pipewire does output 32 bit so just trying to understand why it is converting. The list of supported formats per aplay is: U8 S16_LE S24_LE S32_LE FLOAT_LE S24_3LE S24_3BE
Any additional information on how to correct this would be appreciated.
Thanks, Dan