fix(viewer): default x86 audio fallback to ALSA 'default'#2927
Conversation
…oundrc) 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.
|
|
Validated against an x86 testbed (Intel HDA PCH + a USB Audio+HID dongle) — change is structurally correct, but the PR ships a failing unit test. Validation
Blocker — CI will fail
def test_hdmi_on_x86_falls_back_to_hid(alsa_settings: Any) -> None:
...
assert get_alsa_audio_device() == 'sysdefault:CARD=HID'Running it against this branch: Please rename to Nice-to-have (non-blocking)The ARM64 branch logs the chosen ALSA card once per process via RiskLow. For devices without an |



On x86,
get_alsa_audio_device()returnssysdefault:CARD=HIDas the fallback, which matches no real ALSA card on Intel/AMD/Nvidia HDA chipsets. This bypasses the container's~/.asoundrcbind mount and leaves operators with no way to route audio.The ARM64 branch a few lines above already returns
'default'for the same reason — heterogeneous SoCs, no portable card name — and lets operators override via~/.asoundrc. This PR mirrors that approach for x86.Reproduction
PCHcard with HDMI output to a TV)--audio-device=alsa/sysdefault:CARD=HID→ no audio/proc/asound/cardsshows only card 0 (HDA Intel PCH); noHIDcard existsVerification
After this patch,
~/.asoundrc(e.g. routingdefaulttohw:0,3for the HDMI sink) is honored, and audio plays correctly on the TV.