Skip to content

fix: hide ALSA plugin/virtual noise from Linux output device list - #112

Merged
noFAYZ merged 3 commits into
mainfrom
fix/linux-fake-output-devices
Aug 26, 2026
Merged

noFAYZ merged 3 commits into
mainfrom
fix/linux-fake-output-devices

Conversation

@noFAYZ

@noFAYZ noFAYZ commented Aug 26, 2026

Copy link
Copy Markdown
Owner

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")), keeping default, pulse/pipewire, and each card's sysdefault:/hw:/plughw:/hdmi:. Windows/macOS enumeration is untouched.

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).
@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zuno Ready Ready Preview Aug 26, 2026 8:34am

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.
@noFAYZ
noFAYZ merged commit d425697 into main Aug 26, 2026
10 checks passed

This branch was successfully deployed

1 active deployment
Preview — a8621570 Deployed Aug 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant