Use aplay -L for real ALSA device descriptions instead of hardcoding
ALSA Backend Changes: - Parse aplay -L output to get real hardware descriptions - Description from hardware: "Cambridge Audio Cambridge Audio USB Audio 2.0, USB Audio" - No more hardcoded CARD_NAMES for specific hardware - Still uses CPAL to verify device exists and get max sample rate - Blacklist filtering preserved (null, lavrate, samplerate, etc.) Frontend Changes: - Prefer device.description (from aplay -L) when available - Falls back to getDevicePrettyName() translation only if no description - ALSA Direct shows: "Cambridge Audio ... USB Audio, Front output / input" - Not: "Cambridge Audio USB Front Output" (hardcoded translation) Removed Hardcoding: - Removed CS201 → "Cambridge Audio USB" (was specific to user's DAC) - Removed C20 → "Cambridge Audio" - Generic CARD_NAMES remain (NVidia, Intel HD Audio, etc.) This makes device names work for ANY hardware, not just known cards. Each backend should use native tools: - ALSA: aplay -L - PipeWire: pw-cli/pactl (future) - PulseAudio: pactl (future)
This commit is contained in:
1 parent
97fb8d332a
commit
c871f6becd
3 files changed
+110
-59
No files matched your search
@@ -6,8 +6,6 @@
|
||||
const CARD_NAMES: Record<string, string> = {
|
||||
'sofhdadsp': 'Intel HD Audio',
|
||||
'NVidia': 'NVIDIA GPU',
|
||||
'CS201': 'Cambridge Audio USB',
|
||||
'C20': 'Cambridge Audio',
|
||||
'Generic': 'Generic Audio',
|
||||
'PCH': 'Onboard Audio',
|
||||
'HDMI': 'HDMI Audio',
|
||||
|
||||
Reference in new issue
Block a user