media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5
authorRicardo Ribalda <ribalda@chromium.org>
Mon, 7 Jul 2025 18:34:04 +0000 (18:34 +0000)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 11 Jul 2025 17:27:30 +0000 (19:27 +0200)
commit2ab4019aa34dc2aec4a0824fbf1e49300884fbbf
tree8df50340abf986d1854bf48ffc93200e8fb54b78
parent0bb51c8897395de5bd5f571874130aec214ef534
media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5

The UVC driver provides two metadata types V4L2_META_FMT_UVC, and
V4L2_META_FMT_D4XX. The only difference between the two of them is that
V4L2_META_FMT_UVC only copies PTS, SCR, size and flags, and
V4L2_META_FMT_D4XX copies the whole metadata section.

Now we only enable V4L2_META_FMT_D4XX for the Intel D4xx family of
devices, but it is useful to have the whole metadata payload for any
device where vendors include other metadata, such as the one described by
Microsoft:
https://learn.microsoft.com/en-us/windows-hardware/drivers/stream/mf-capture-metadata

This patch introduces a new format V4L2_META_FMT_UVC_MSXU_1_5, that is
identical to V4L2_META_FMT_D4XX.

Let the user enable this format with a quirk for now. This way they can
test if their devices provide useful metadata without rebuilding the
kernel. They can later contribute patches to auto-quirk their devices.
We will also work in methods to auto-detect devices compatible with this
new metadata format.

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20250707-uvc-meta-v8-4-ed17f8b1218b@chromium.org
Signed-off-by: Hans de Goede <hansg@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Documentation/userspace-api/media/v4l/meta-formats.rst
Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst [new file with mode: 0644]
MAINTAINERS
drivers/media/usb/uvc/uvc_metadata.c
drivers/media/usb/uvc/uvcvideo.h
drivers/media/v4l2-core/v4l2-ioctl.c
include/uapi/linux/videodev2.h