Skip to content

V4L2: pause while the receiver reports no signal; CLI, packaging and docs follow-ups - #20

Merged
Hans5849 merged 5 commits into
masterfrom
claude/rk3588-no-signal-wait
Nov 15, 2026
Merged

Hans5849 merged 5 commits into
masterfrom
claude/rk3588-no-signal-wait

Conversation

@Hans5849

Copy link
Copy Markdown
Owner

Ports the Nov 9 follow-up work (previously on claude/great-heisenberg-bgp44k, never merged) onto current master, reconciled with #2. Addresses #19. Contributes to #8, #11, #18.

Changes

  • No-signal wait ([P1][Reliability] Restore prompt HDMI reconnect detection while capture is in retry backoff #19): when the receiver reports no input (power_present=0, or QUERY_DV_TIMINGS ENOLINK/ENOLCK/ERANGE), capture is not started. Buffers are released, and a separate non-streaming fd stays open with its own V4L2_EVENT_SOURCE_CHANGE subscription. It is re-probed every 2 s and immediately on an event, so signal return no longer waits for a backoff of up to 30 s. Devices exposing neither interface (UVC/USB) keep the existing path. No driver names are used. stop() cancels the wait and closes its fd and notifier.
  • Log categories: no signal:, timeout:, initialization failed:, streaming failed: and source changed:, each once per outage.
  • CLI: flags no longer trigger QCommandLineParser: option not expecting values. Conflicting --silent/--verbose/--debug now exits 1.
  • Packaging: the default .deb declares Version: 24.0.0~beta.0 instead of 24.0.0, so prereleases sort before the release.
  • Discovery: M2M (codec/RGA) nodes are rejected explicitly. A legacy <card> (videoN) setting saved before renumbering resolves by card name when exactly one device matches, including to Harden mainline HDMI receiver discovery, acquisition and buffer layout #2's v4l2:driver@bus identity. Saved identities keep Harden mainline HDMI receiver discovery, acquisition and buffer layout #2's strict wait-for-this-receiver rule.
  • CI: CLI parser test and version-mapping test in CaptureTests. dpkg-deb metadata check on every Debian/Ubuntu package. Package install plus CLI/daemon smoke test on native trixie amd64 and arm64.
  • Docs: validation guide rebuilt around the 2026-11-09 board results (Armbian 26.11.0, /dev/video1). Keeps Harden mainline HDMI receiver discovery, acquisition and buffer layout #2's identity selection and loopback evidence. Stale /dev/video2 and "no ARM64 package" statements corrected.

Reconciling with #2

Testing

  • Local: tests/v4l2 24 groups pass under ASan/UBSan with -Wall -Wextra -Werror. Mutation checks confirmed the M2M and power_present tests fail when the logic is removed. The Debian version test passes. A real CPack build reproduced Version: 24.0.0 before the fix and 24.0.0~beta.0 after.
  • The same changes, before the port, passed the full matrix in run 42680657091, including install and smoke on native arm64. This PR's push run re-verifies them on the Harden mainline HDMI receiver discovery, acquisition and buffer layout #2 base.

Not verified


Generated by Claude Code

Parser::parse() called QCommandLineParser::value() for every registered
option to run validators. For flags (no valueName) Qt warns "option not
expecting values" once per flag, which is the list seen on every
hyperhdr --version. Flags now pass an empty value to validate().

Conflicting --silent/--verbose/--debug now exits 1 instead of 0.

tests/cli: unit test of the real parser with main()'s registrations that
fails on any Qt warning, and a smoke script for an installed binary
covering exit codes, stdout/stderr and that informational commands do
not start the daemon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Esaro9yXeEbjMr2pZhsu1J
Receivers exposing V4L2_CID_DV_RX_POWER_PRESENT or QUERY_DV_TIMINGS are
no longer streamed when they report no input (power_present=0, ENOLINK,
ENOLCK, ERANGE). Buffers are released and one non-streaming handle is
re-probed every 2 s and on source-change events; capture starts when a
signal appears. Devices exposing neither (UVC/USB) keep the previous
stream/timeout/backoff path. No driver names are used.

Logs now separate no signal, timeout, initialization, streaming and
source-change failures, each once per outage.

Discovery: memory-to-memory nodes are rejected explicitly, node
classification and current-timing modes move into testable helpers,
and a saved "<card> (videoN)" device is re-found by card name after
renumbering when exactly one match exists.

Tests simulate the Orange Pi node set to cover node reordering,
codec/RGA nodes, MPLANE, one/multi-plane formats, discovery without a
signal, renumbering and signal-state mapping.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Esaro9yXeEbjMr2pZhsu1J
Default builds were named HyperHDR-24.0.0-beta.0-...deb but declared
Version: 24.0.0, equal to the final release, so betas could not be
ordered or upgraded. The control Version is now the Debian form of the
application version (24.0.0~beta.0, sorting before 24.0.0). CI's
standard naming already encoded it and is unchanged.

tests/packaging: cmake -P unit test of the mapping with dpkg ordering,
and check-deb.sh, which reads a generated .deb with dpkg-deb.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Esaro9yXeEbjMr2pZhsu1J
CaptureTests also builds the command-line parser test and the Debian
version mapping test. Every Debian/Ubuntu Linux job checks its .deb
with check-deb.sh. Trixie amd64 and arm64 install the package in their
build image and run the CLI smoke test, including a short daemon run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Esaro9yXeEbjMr2pZhsu1J
The validation guide now reflects the confirmed board: mainline
snps_hdmirx, dynamic /dev/videoN, MPLANE, BGR3, one plane, read-only
power_present, native Debian 13 arm64 build with GCC 14 and Qt 6.8.2,
local .deb install and hyperhdr@ryan. It documents the paused no-signal
wait, log categories and the one-time --allow-downgrades for the
corrected package version. Instructions no longer assume /dev/video0,
rk_hdmirx or the deleted feature branch. Frame capture, image
correctness and WLED output remain explicitly unvalidated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Esaro9yXeEbjMr2pZhsu1J
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants