fix: use BufferSize::Default for PipeWire ALSA devices on Linux - #2142
Open
nightwatch92 wants to merge 1 commit into
Open
fix: use BufferSize::Default for PipeWire ALSA devices on Linux#2142nightwatch92 wants to merge 1 commit into
nightwatch92 wants to merge 1 commit into
Conversation
cpal's BufferSize::Fixed calls snd_pcm_hw_params_set_buffer_size (exact), which pipewire-alsa rejects unless the frame count matches its current quantum. Fall back to BufferSize::Default (uses _near) for default/pulse/ pipewire device names on Linux. Also emit a targeted error when pactl is not installed instead of the generic 'no monitor input found' message — the previous message sent users chasing ALSA config when the real fix is installing pulseaudio-utils. Fixes CapSoftware#2131.
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.
cpal's BufferSize::Fixed calls snd_pcm_hw_params_set_buffer_size (exact),
which pipewire-alsa rejects unless the frame count matches its current
quantum. Fall back to BufferSize::Default (uses _near) for default/pulse/
pipewire device names on Linux.
Also emit a targeted error when pactl is not installed instead of the
generic 'no monitor input found' message — the previous message sent
users chasing ALSA config when the real fix is installing pulseaudio-utils.
Fixes #2131.
Greptile Summary
This PR improves Linux audio capture compatibility and diagnostics.
default,pulse, orpipewire.pactlonPATH.Confidence Score: 5/5
The PR appears safe to merge, with no concrete changed-code defect identified.
The buffer-selection change is Linux-scoped and narrowly targets the device aliases described by the fix, while the new diagnostic preserves successful monitor selection and only changes the terminal error path.
Important Files Changed
BufferSize::Defaultfor recognized Linux PulseAudio/PipeWire ALSA device names while preserving fixed latency buffers elsewhere.pactldiagnostic after existing CPAL and pactl monitor-source discovery attempts fail.Reviews (1): Last reviewed commit: "fix: use BufferSize::Default for PipeWir..." | Re-trigger Greptile