Avoid-resampling ignored by Pulseaudio 16
Summary
It looks like avoid-resampling = yes
is completely ignored by Pulseaudio 16.
The hardware will not play other sample rates than the ones specified in default-sample-rate
and alternate-sample-rate
.
Any other rate is resampled, in spite of the hardware supporting it natively.
Environment
Kernel: 6.1.0-arch1-1
Packages:
pulseaudio 16.1-3
pulseaudio-alsa 1:1.2.7.1-1
My USB DAC supports the following rates natively:
44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
Complete DAC params:
My Pulseaudio daemon config:
Basically everything is unset/default other than:
resample-method = soxr-vhq
avoid-resampling = yes
Steps to reproduce
- Play any audio file with the sample rate above 48Khz.
What is the current bug behavior?
- All inputs are resampled down to 44.1Khz or 48Khz. DAC confirms this with a physical light present on the unit.
-
pacmd list-sink-inputs
confirms that the input is resampled withsoxr-vhq
-
pacmd list-sinks
confirms the rate sampled down to.
pacmd list-sink-inputs
index: 3
driver: <protocol-native.c>
flags: START_CORKED
state: RUNNING
sink: 2 <alsa_output.usb-GuangZhou_FiiO_Electronics_Co._Ltd_FiiO_K7-00.analog-stereo>
volume: …
muted: no
current latency: 87.40 ms
requested latency: 60.00 ms
sample spec: s32le 2ch 192000Hz
channel map: front-left,front-right
Stereo
resample method: soxr-vhq
module: 13
client: 10 <mpv Media Player>
--------
pacmd list-sinks
* index: 2
name: <alsa_output.usb-GuangZhou_FiiO_Electronics_Co._Ltd_FiiO_K7-00.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9049
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 66.01 ms
max request: 20 KiB
max rewind: 20 KiB
monitor source: 3
sample spec: s32le 2ch 44100Hz
channel map: front-left,front-right
Stereo
What is the expected correct behavior?
- DAC should indicate that a high sample rate is played on the hardware without resampling. On my particular model this is confirmed by the changing lights on the front panel of the unit for inputs above 48Khz.
-
pacmd list-sink-inputs
should indicate no resampling happening. -
pacmd list-sinks
should match the sample rate from list-sink-inputs
Other comments
This bug was fixed in a previous release of Pulseaudio (I think v15) but it seems to have crept back somehow.