diff --git a/src/lib/components/AudioOutputBadges.svelte b/src/lib/components/AudioOutputBadges.svelte index c6579768f..14d918da5 100644 --- a/src/lib/components/AudioOutputBadges.svelte +++ b/src/lib/components/AudioOutputBadges.svelte @@ -8,6 +8,8 @@ exclusive_mode: boolean; dac_passthrough: boolean; preferred_sample_rate: number | null; + backend_type: 'PipeWire' | 'Alsa' | 'Pulse' | null; + alsa_plugin: 'Hw' | 'PlugHw' | 'Pcm' | null; } interface AudioOutputStatus { @@ -67,6 +69,11 @@ const isExternal = $derived(currentDevice ? isExternalDevice(currentDevice) : false); + // ALSA Direct mode detection (bit-perfect hardware access) + const isAlsaDirect = $derived( + settings?.backend_type === 'Alsa' && settings?.alsa_plugin === 'Hw' + ); + // DAC badge state logic - 3 states: green, yellow, gray const dacBadgeState = $derived.by(() => { if (!settings?.dac_passthrough) { @@ -120,7 +127,7 @@ // Whether to show badges at all (only if at least one setting is enabled or device is external) const shouldShowBadges = $derived( - settings?.dac_passthrough || settings?.exclusive_mode || isExternal + settings?.dac_passthrough || settings?.exclusive_mode || isExternal || isAlsaDirect ); async function loadStatus() { @@ -166,15 +173,23 @@ onmouseenter={() => { isHovering = true; loadStatus(); }} onmouseleave={() => isHovering = false} > - -