What I’m Trying to Do
I want to keep Pisound’s input sample rate at 96 kHz throughout the audio pipeline in PipeWire, regardless of the output device’s capabilities. My setup involves sending audio from Pisound analog input to a HomePod via RAOP (AirPlay).
pisound resampling.pdf (25.9 KB)
What I’ve Tried
-
Set PipeWire’s default sample rate to 96 kHz
pw-metadata -n settings 0 default.clock.rate 96000
- After reboot,
pactl list sources short
confirms that Pisound initially runs at 96 kHz.
- After reboot,
Before routing:
83 alsa_input.platform-soc_sound.stereo-fallback PipeWire s32le 2ch 96000Hz SUSPENDED
After routing to HomePod:
83 alsa_input.platform-soc_sound.stereo-fallback PipeWire s32le 2ch 48000Hz RUNNING
-
RAOP (AirPlay) expects 48/ 44.1 kHz
PipeWire is forcing the Pisound input to 48 kHz before resampling to 44.1 kHz, rather than allowing a direct 96 → 44.1 kHz conversion. -
Checked PipeWire’s internal resampling behavior
- Running
pw-cli list-objects Node | grep -i rate
shows that the resampling happens within PipeWire before it reaches RAOP. - I suspect PipeWire dynamically changes Pisound’s input sample rate to match the lowest common denominator in the audio graph.
- Running
My Question
How do I enforce Pisound to stay at 96 kHz, regardless of the output device’s sample rate?
- Is there a way to lock Pisound’s input node to 96 kHz while allowing PipeWire to handle resampling only at the RAOP output stage?
- Can I force PipeWire to always resample at the final step instead of adjusting the input sample rate dynamically?
- Would explicitly setting a filter node between Pisound and RAOP help, like:
pw-link alsa_input.platform-soc_sound.stereo-fallback ! audio.convert.rate=96000 ! raop_sink
Would love any insights from those who’ve tackled similar issues! Thanks in advance.