fix(viewer): default x86 audio fallback to ALSA 'default'#3038
Merged
Conversation
On x86, get_alsa_audio_device() previously returned 'sysdefault:CARD=HID' as the fallback, which matches no real ALSA card on standard Intel/AMD/Nvidia HDA chipsets, leaving operators with no working audio. Defer to the `default` device instead. On x86 (a Qt 6 board) VideoView::resolveAlsaDevice resolves `default` to the PulseAudio default sink, since Debian's Qt 6 Multimedia only has a PulseAudio backend. This mirrors the ARM64 branch above, which already returns 'default' for the same reason. Update the corresponding test to assert the new fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
Pull request overview
Adjusts the viewer’s x86 ALSA fallback device selection so audio works out-of-the-box on common Intel/AMD/Nvidia HDA setups, aligning x86 behavior with the existing ARM64 approach.
Changes:
- Update
get_alsa_audio_device()to returndefault(instead ofsysdefault:CARD=HID) for the x86 HDMI fallback path. - Update/rename the corresponding unit test to assert the new x86 fallback (
default) and document the PulseAudio resolution behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/anthias_viewer/media_player.py |
Switch x86 HDMI fallback ALSA device from a non-portable hardcoded card name to default. |
tests/test_media_player.py |
Rename/update x86 HDMI fallback test to expect default and clarify rationale in comments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Supersedes #2927 (original work by @Xzzz, attribution preserved in the commit), rebased onto current
masterand fixed up to pass CI.Problem
On x86,
get_alsa_audio_device()returnedsysdefault:CARD=HIDas the fallback, which matches no real ALSA card on standard Intel/AMD/Nvidia HDA chipsets, leaving operators with no working audio.Fix
Defer to the
defaultdevice instead. This mirrors the ARM64 branch directly above, which already returns'default'for the same reason (heterogeneous SoCs, no portable per-SoC card name).On x86 — a Qt 6 board —
VideoView::resolveAlsaDeviceresolvesdefaultto the PulseAudio default sink, since Debian's Qt 6 Multimedia only has a PulseAudio backend and the daemon is started bystart_viewer.sh. (This is why the rationale differs from the original PR, which predated the PulseAudio migration in #3001 and described raw~/.asoundrcrouting.)Changes vs the original PR
~/.asoundrc.test_hdmi_on_x86_falls_back_to_hid→test_hdmi_on_x86_uses_alsa_default, asserting'default'. The original PR touched onlymedia_player.py, so it would have failed this test (added later in Fix HDMI audio detection on Pi4 with dual HDMI ports #2811).Verification
uv run ruff check+ruff format --check: cleanuv run pytest tests/test_media_player.py -m "not integration": 79 passed🤖 Generated with Claude Code