Repository navigation
fix: hide ALSA plugin/virtual noise from Linux output device list - #112
Merged
Merged
Conversation
cpal's ALSA hint enumeration surfaces every globally-registered pcm type (null, surround*, iec958, dmix, jack, oss, ...) regardless of what hardware exists. Filter those out on Linux, keep default, pulse/pipewire, and each card's sysdefault:/hw:/plughw:/hdmi:. Windows/macOS enumeration is untouched (cfg-gated).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cpal's physical-device probe adds hw:/plughw: for every card on top of the friendly sysdefault:/hdmi: hints already covering the same hardware, so each real port was listed up to 3x.
list_output_devices now reads pactl's sink list when a sound server is running (it already knows what's actually connected), instead of raw ALSA per-card enumeration which can't tell a live port from an empty one. Falls back to the ALSA path when pactl is unavailable. Selecting a pipewire-sink: id opens the default cpal stream (the only way in) then moves it to the chosen sink via `pactl move-sink-input`, matching our own client by process name.
This branch was successfully deployed
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.
list_output_devices()did zero filtering — cpal's ALSA hint enumeration surfaces every globally-registered pcm type (null, surround*, iec958, dmix, jack, oss, ...) regardless of what hardware actually exists, so the playback settings dropdown showed 20+ entries for 2 real devices.Filters those out on Linux only (
cfg(target_os = "linux")), keepingdefault,pulse/pipewire, and each card'ssysdefault:/hw:/plughw:/hdmi:. Windows/macOS enumeration is untouched.