Fix ALSA device name translation and Auto mode device selection
ALSA Device Name Translation: - Added missing patterns: front:CARD=, surround*:CARD=, iec958:CARD= - Now shows "Cambridge Audio USB Front Output" instead of "front CS201 Output 0" - Updated CARD_NAMES: CS201 → "Cambridge Audio USB", C20 → "Cambridge Audio" - Surround patterns: 40→4.0, 41→4.1, 50→5.0, 51→5.1, 71→7.1 - S/PDIF (iec958) pattern added Auto Mode Device Selection Fix (CRITICAL): - Auto mode now only allows "System Default" (no specific device selection) - Fixes device mismatch issue where PipeWire device names fail in ALSA - Previous behavior caused: * User selects DAC in Auto mode (PipeWire device name) * Player uses legacy ALSA path * Device not found → falls back to default * 18+ second delay before playback starts - Auto mode is now truly automatic - always uses System Default This prevents cross-backend device name incompatibility. If user wants to select specific device, they must choose PipeWire, ALSA Direct, or PulseAudio backend explicitly.
This commit is contained in:
1 parent
b008f333b0
commit
97fb8d332a
2 files changed
+32
-26
No files matched your search
@@ -789,24 +789,10 @@
|
||||
}
|
||||
} else {
|
||||
selectedBackend = 'Auto';
|
||||
// Auto mode: load devices from first available backend
|
||||
// This allows showing proper device names with translation
|
||||
if (availableBackends.length > 0) {
|
||||
const firstBackend = availableBackends.find(b => b.is_available);
|
||||
if (firstBackend) {
|
||||
await loadBackendDevices(firstBackend.backend_type);
|
||||
|
||||
// Set selected device from backend devices
|
||||
if (settings.output_device) {
|
||||
const device = backendDevices.find(d => d.id === settings.output_device);
|
||||
if (device) {
|
||||
outputDevice = needsTranslation(device.name) ? getDevicePrettyName(device.name) : device.name;
|
||||
} else {
|
||||
outputDevice = 'System Default';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Auto mode: always use System Default (no device selection)
|
||||
// Device names from one backend (e.g., PipeWire) don't work in another (e.g., ALSA)
|
||||
backendDevices = [];
|
||||
outputDevice = 'System Default';
|
||||
}
|
||||
|
||||
if (settings.alsa_plugin) {
|
||||
@@ -925,13 +911,9 @@
|
||||
if (backendType) {
|
||||
await loadBackendDevices(backendType);
|
||||
} else {
|
||||
// Auto mode: load devices from first available backend for device selection
|
||||
if (availableBackends.length > 0) {
|
||||
const firstBackend = availableBackends.find(b => b.is_available);
|
||||
if (firstBackend) {
|
||||
await loadBackendDevices(firstBackend.backend_type);
|
||||
}
|
||||
}
|
||||
// Auto mode: no device selection (System Default only)
|
||||
// Device IDs from different backends are incompatible
|
||||
backendDevices = [];
|
||||
}
|
||||
|
||||
// Reset to default device when switching backends (always)
|
||||
|
||||
Reference in new issue
Block a user