Re-enable ALSA Direct backend for testing
- Remove filter from backend selector dropdown - Remove auto-switch logic from ALSA Direct to Auto - Allow user to test if CPAL can actually open hw: devices - If this works, we can skip alsa-rs implementation - If it fails, we'll need to implement direct alsa-rs approach
This commit is contained in:
1 parent
9c76792741
commit
dddae17d63
1 file changed
+16
-26
@@ -214,8 +214,8 @@
|
||||
let isLoadingDevices = $state(false);
|
||||
|
||||
// Backend selector options (derived)
|
||||
// TEMPORARILY hide ALSA Direct until hw: device support is implemented with alsa-rs
|
||||
let backendOptions = $derived(['Auto', ...availableBackends.filter(b => b.is_available && b.name !== 'ALSA Direct').map(b => b.name)]);
|
||||
// TEST: Re-enable ALSA Direct to verify if CPAL can actually open hw: devices
|
||||
let backendOptions = $derived(['Auto', ...availableBackends.filter(b => b.is_available).map(b => b.name)]);
|
||||
|
||||
// Helper to check if a device name looks like raw ALSA (needs translation)
|
||||
function needsTranslation(name: string): boolean {
|
||||
@@ -816,31 +816,21 @@
|
||||
const backend = availableBackends.find(b => b.backend_type === settings.backend_type);
|
||||
const backendName = backend?.name ?? 'Auto';
|
||||
|
||||
// TEMPORARILY: If user had ALSA Direct selected, switch to Auto
|
||||
// (ALSA Direct is temporarily disabled until hw: device support is implemented with alsa-rs)
|
||||
if (backendName === 'ALSA Direct') {
|
||||
selectedBackend = 'Auto';
|
||||
// Switch backend to Auto in backend
|
||||
await invoke('set_audio_backend_type', { backendType: null });
|
||||
console.log('[Audio] Switched from ALSA Direct to Auto (ALSA Direct temporarily disabled)');
|
||||
// Don't load devices for ALSA backend
|
||||
backendDevices = [];
|
||||
} else {
|
||||
selectedBackend = backendName;
|
||||
// Load devices for selected backend
|
||||
await loadBackendDevices(settings.backend_type);
|
||||
// TEST: Allow ALSA Direct to load for testing
|
||||
selectedBackend = backendName;
|
||||
// Load devices for selected backend
|
||||
await loadBackendDevices(settings.backend_type);
|
||||
|
||||
// Set selected device from backend devices
|
||||
if (settings.output_device) {
|
||||
const device = backendDevices.find(d => d.id === settings.output_device);
|
||||
if (device) {
|
||||
// Use description from aplay -L if available (ALSA), otherwise translate
|
||||
outputDevice = (device.description && settings.backend_type === 'Alsa')
|
||||
? device.description
|
||||
: (needsTranslation(device.name) ? getDevicePrettyName(device.name) : device.name);
|
||||
} else {
|
||||
outputDevice = 'System Default';
|
||||
}
|
||||
// Set selected device from backend devices
|
||||
if (settings.output_device) {
|
||||
const device = backendDevices.find(d => d.id === settings.output_device);
|
||||
if (device) {
|
||||
// Use description from aplay -L if available (ALSA), otherwise translate
|
||||
outputDevice = (device.description && settings.backend_type === 'Alsa')
|
||||
? device.description
|
||||
: (needsTranslation(device.name) ? getDevicePrettyName(device.name) : device.name);
|
||||
} else {
|
||||
outputDevice = 'System Default';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user