Files
Anthias/tools
Viktor Petersson 66ed89cc21 fix(viewer): run PulseAudio so Qt 6 video plays with audio (#3001)
Debian's Qt 6 Multimedia is compiled with PulseAudio as its only
audio backend (libQt6Multimedia.so.6 links libpulse and contains no
ALSA code), so without a running PulseAudio server QMediaDevices
enumerates zero audio outputs, QAudioOutput keeps a null device, and
every video on a Qt 6 board (pi4-64, pi5, x86, arm64) plays silent.
The pre-QtMultimedia mpv path talked ALSA directly and needed no
sound server, which is why audio regressed with the migration.

- ship pulseaudio (+ pulseaudio-utils for field debugging) in the
  Qt 6 viewer images
- start a minimal per-container daemon as the viewer user from
  start_viewer.sh; the generated config loads one module-alsa-card
  per /proc/asound/cards entry with name=<alsa card id>, so the
  pulse sink names embed the ALSA card name and the existing
  CARD=<name> matching in VideoView::resolveAlsaDevice (HDMI-port
  auto-detection, hdmi/local audio_output setting) keeps working
  unchanged on top of pulse
- module-udev-detect finds nothing in a container without udevd,
  which is why the stock default.pa is not used
- update the arm64 audio log message: the 'default' device now
  resolves to the PulseAudio default sink, not ALSA's ~/.asoundrc

Validated on a physical Pi 4 (pi4-64 image): vc4hdmi0 PCM reaches
RUNNING with 48 kHz IEC958 samples flowing during video playback,
and the AnthiasViewer stream attaches to
alsa_output.vc4hdmi0.hdmi-stereo.

Fixes #3000

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-06 22:13:48 +02:00
..