Repository navigation
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no actionable new issue was established. SummaryLets PipeWire choose among 44.1, 48, 88.2, and 96 kHz.
Reviews (4) · Last reviewed commit: "Let PipeWire follow the source's sample ..." · Reviewed by Greptile |
Ship a PipeWire drop-in that allows 44.1, 48, 88.2 and 96 kHz, so a stream starting on an idle device plays at its own rate instead of being resampled to 48 kHz. Rates the hardware can't do still resample, as today. The migration installs the drop-in for existing users and applies the same list to the running graph through pw-metadata, so it takes effect without restarting PipeWire. Anyone who already set allowed-rates is left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
manuaudio
force-pushed
the
feat/pipewire-follow-sample-rate-v2
branch
from
November 13, 2026 06:14
e25787a to
8851c53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
PipeWire's
clock.allowed-ratesis[ 48000 ]on a stock install, so every 44.1 kHz track and every 88.2/96 kHz recording is resampled on its way to the device. On macOS, CoreAudio follows the source's rate.config/pipewire/pipewire.conf.d/10-sample-rates.confsetsdefault.clock.allowed-rates = [ 44100 48000 88200 96000 ]. When a stream starts on an idle device, PipeWire switches the device to the stream's rate if the hardware supports it; otherwise it resamples as today. 48 kHz sources are unaffected.${XDG_CONFIG_HOME:-$HOME/.config}and sets the same list on the running graph withpw-metadata, since PipeWire readsconf.donly at startup. Nothing restarts and playback isn't interrupted. Anyone who already setallowed-ratesin a user or/etc/pipewireconfig is left alone.The list is the one PipeWire ships, disabled, as
/usr/share/pipewire/pipewire.conf.avail/10-rates.conf. Its docs say it is off by default "because of various kernel and Bluetooth issues", and #10534 lists pops on a rate switch with some Bluetooth, HDMI and cheap USB devices as the reason to keep it opt-in. I haven't hit that on the output below, but it is the only one I've tested. Screen recordings keep their fixed 48 kHz from #11092.Refs #10534 (the rate half; the soft-mixer half is separate). Step one of #13832, rebuilt from the closed #13834.
Verification
On Omarchy 4.0.4, PipeWire 1.6.8, Intel HDA HDMI output, I played a 44.1 kHz file with
pw-playbefore and after the migration and readpw-top:The device itself switched to 44100, so the stream is no longer resampled.
pw-config --name pipewire.conf merge context.propertiesreported the drop-in's list, so it holds after a restart.The migration, run with
bash -euo pipefailagainst a scratchHOMEandPIPEWIRE_CONFIG_DIRwithpw-metadatastubbed: installs and sets the rates on a fresh home and under a customXDG_CONFIG_HOME; does nothing on a second run, or when the rates are already set in~/.config/pipewireor/etc/pipewire; still installs when the only setting is commented out; exits 0 when PipeWire isn't running.shellcheckis clean. No test added: config values and migrations don't get one.Not checked: USB DACs, Bluetooth outputs, and hardware that can't do 44.1 kHz.
Screenshots
No visible change: this only changes PipeWire's sample-rate selection.
🤖 Generated with Claude Code