From 0d0f661e2c6daa5cc26860d2fc54cfd5063e6676 Mon Sep 17 00:00:00 2001 From: Xzzz Date: Wed, 20 May 2026 12:09:47 +0200 Subject: [PATCH] fix(viewer): default x86 audio fallback to ALSA 'default' (honors .asoundrc) On x86, get_alsa_audio_device() previously returned 'sysdefault:CARD=HID' as the fallback, which corresponds to no real ALSA card on standard Intel/AMD/Nvidia HDA chipsets. The container's ~/.asoundrc bind mount was therefore bypassed, leaving operators unable to redirect audio output. The ARM64 branch a few lines above already returns 'default' for the same reason (heterogeneous SoCs, no portable card name), and relies on ~/.asoundrc for operator overrides. Apply the same approach to x86. --- src/anthias_viewer/media_player.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/anthias_viewer/media_player.py b/src/anthias_viewer/media_player.py index 8987522b5..dc8d02022 100644 --- a/src/anthias_viewer/media_player.py +++ b/src/anthias_viewer/media_player.py @@ -213,7 +213,13 @@ def get_alsa_audio_device() -> str: elif device_type in ['pi1', 'pi2', 'pi3']: return 'sysdefault:CARD=vc4hdmi' else: - return 'sysdefault:CARD=HID' + # x86 fallback: ALSA card names vary across Intel/AMD/Nvidia + # HDA chipsets, so there is no portable per-SoC name we can + # hard-code. Defer to ALSA's `default` device and let + # operators override via ~/.asoundrc (already bind-mounted + # into the viewer container — see docker-compose.yml.tmpl), + # mirroring the ARM64 path above. + return 'default' class MediaPlayer: