69a62a922f
libva-v4l2-request sets V4L2_CID_STATELESS_H264_DECODE_MODE and
V4L2_CID_STATELESS_H264_START_CODE on the device fd at context init
(see libva-v4l2-request-fourier src/context.c:577 — best-effort call,
result is (void)cast). Our ctrl_handler did not advertise either
control, so v4l2-core returned EINVAL on validate; userspace logged
the noisy
v4l2-request: Unable to set control(s): Invalid argument
(error_idx=2/2 ioctl-level)
at every Firefox/ffmpeg context creation, despite decode itself
succeeding (the daemon already operates as FRAME_BASED + ANNEX_B and
the per-request SPS/PPS/SCALING_MATRIX/DECODE_PARAMS batch lands
fine).
Register the two as v4l2_ctrl_new_std_menu with the only value each
the daemon actually supports — FRAME_BASED for DECODE_MODE,
ANNEX_B for START_CODE — and mask out the unsupported alternates
(SLICE_BASED, NONE). Pattern matches rkvdec / hantro. Update the
handler-init capacity hint to ARRAY_SIZE(daedalus_stateless_ctrls)
+ 2 to cover the additions.
Verified: builds clean on 6.18.29+rpt-rpi-2712 (Pi CM5) DKMS source
tree.
kernel/ — daedalus-v4l2 Linux kernel module
Out-of-tree kernel module providing a V4L2 stateless decoder device that forwards work to a userspace daemon.
Status
Scaffold only. Phase 8.1 not yet started.
Build (when implemented)
make -C /lib/modules/$(uname -r)/build M=$(pwd)
sudo insmod daedalus_v4l2.ko
v4l2-ctl --list-devices # confirm /dev/videoNN appears
Layout (planned)
Makefile— kbuild stubdaedalus_v4l2_main.c— module init + V4L2 device registrationdaedalus_v4l2_chardev.c—/dev/daedalus-v4l2chardev for daemon communicationdaedalus_v4l2_v4l2.c— V4L2 ioctl dispatch (stateless controls)
License
GPLv2. Required for kernel module symbol compatibility.
Phase 8.1 starting point
Minimal example: register a /dev/videoNN that returns -ENOSYS on every ioctl. Validates that the kernel build works and v4l2-ctl can see the device.