From 8b825856d203ddd50a8b395518bbadd4d1443f20 Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Mon, 19 Jan 2026 08:35:15 -0600 Subject: [PATCH] UX improvements for ALSA Direct settings 1. Change hardware volume to visible help text (like Offline settings) - More critical info should be always visible - Clearer explanation of experimental nature 2. Add blue HW badge for ALSA Direct mode - Replaces DAC badge (mutually exclusive) - Blue color simulates audio equipment LED - Shows 'Hardware Direct: Bit-perfect ALSA' in tooltip - Displays device name and sample rate - Only visible when: ALSA Direct + hw plugin 3. Gapless logic already correct - Only restricts gapless with DAC Passthrough (PipeWire) - ALSA Direct can do gapless (same sample rate) - Note: Different sample rates need investigation --- src/lib/components/AudioOutputBadges.svelte | 62 ++++++++++++++++---- src/lib/components/views/SettingsView.svelte | 4 +- 2 files changed, 52 insertions(+), 14 deletions(-) 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} > - -