request: route VP9/AV1/H.264 to daedalus_v4l2 on Pi 5 mixed deploy #6
Reference in New Issue
Block a user
Delete Branch "claude-noether/libva-v4l2-request-fourier:noether/libva-1-per-codec-dispatch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LIBVA-1 — per-codec dispatch when rpi-hevc-dec + daedalus_v4l2 both present.
Finishes the Pi 5 mixed-decoder story so HEVC goes to rpi-hevc-dec (existing p override) and VP9 / AV1 / H.264 go to the daedalus daemon (new d kind).
Problem: known_decoder_drivers[] orders rpi-hevc-dec before daedalus_v4l2, so find_codec_device() on a Pi 5 with both modules loaded picked rpi-hevc-dec as primary and alt_driver = NULL. daedalus_v4l2 never opened → VP9/AV1/H.264 frames hit rpi-hevc-dec S_FMT and failed.
Changes:
Build: meson + ninja clean on boltzmann (only pre-existing GStreamer H265 parser warnings). Behaviour on RK3399/3588 boxes unchanged — new branches are gated by HAVE_DAEDALUS_V4L2 and video_fd_daedalus >= 0, both false in those deployments.
Companion changes: daedalus-v4l2 upstream pin 481279c (Phase 8.13 systemd unit landed); marfrit-packages branch noether/daedalus-v4l2-kernel-6.18-compat carries the package-side systemd integration.
Test plan (LIBVA-2, follow-up): On higgs (Pi CM5, kernel 6.18.29, rpi-hevc-dec + daedalus_v4l2 both loaded): ffmpeg -hwaccel vaapi -i h264_small.mp4 lands frames in the daedalus daemon log; ffmpeg -hwaccel vaapi -i hevc_small.mp4 lands frames on rpi-hevc-dec (daemon log stays silent for HEVC). Both produce a valid first frame.
🤖 Generated with Claude Code
LIBVA-1 — when both rpi-hevc-dec and daedalus_v4l2 are loaded, finish the per-codec dispatch so HEVC goes to rpi-hevc-dec (existing 'p' override) and VP9 / AV1 / H.264 go to the daedalus daemon ('d'). Before this change the multi-device-probe accepted only ONE driver plus a fixed alt slot (rkvdec↔hantro-vpu); on a Pi 5 with both decoders the find_codec_device() walk preferred rpi-hevc-dec by known_decoder_ drivers[] order and never opened daedalus_v4l2, so VP9/AV1/H.264 frames hit rpi-hevc-dec's S_FMT and failed. Changes: - request.c multi-device-probe: when primary = rpi-hevc-dec, alt = daedalus_v4l2 (when HAVE_DAEDALUS_V4L2 is on); symmetric handling in the daedalus_v4l2 primary branch so alt = rpi-hevc-dec. This preserves the iter40 fallback (no daedalus → alt = NULL) when the build option is off. - request.c alt-driver opening block: generalized from the iter38 rkvdec/hantro pair to also dispatch into video_fd_rpi_hevc_dec and video_fd_daedalus slots. Defensive close on unknown alt-driver name (shouldn't happen — primary_driver branches gate the choices — but keeps the slot tally clean if a future driver name is added above without wiring up the dispatch here). - request_switch_device_for_profile: added 'd' kind handler + profile override block. When daedalus is open, VP9 / AV1 / H.264* route to it. HEVC stays on rpi-hevc-dec via the existing 'p' override. AV1 'a' kind (RK3588 vpu981) wins ONLY if vpu981 was probed, so the override only fires on hosts where vpu981 stayed -1 (i.e. Pi 5). - RequestTerminate: close the daedalus_v4l2 fd pair on teardown (was leaking — caught while reviewing the alt-driver expansion). Build: meson + ninja clean on boltzmann (only pre-existing GStreamer H265 parser noise). Behaviour on RK3399/3588 boxes unchanged — the new branches are gated by HAVE_DAEDALUS_V4L2 *and* video_fd_daedalus ≥ 0, both of which stay false in those deployments. Companion to daedalus-v4l2 481279c (Phase 8.13 systemd unit) and marfrit-packages noether/daedalus-v4l2-kernel-6.18-compat branch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>