[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117-uvcdynctrl-v1-0-aed70eadf3d8@chromium.org>
Date: Mon, 17 Nov 2025 20:14:15 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hans de Goede <hansg@...nel.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, Ricardo Ribalda <ribalda@...omium.org>,
Manav Gautama <bandwidthcrunch@...il.com>,
Martin Rubli <martin_rubli@...itech.com>
Subject: [PATCH 0/4] media: uvcvideo: Map known XU controls
The UVC driver uses a custom ioctl `UVCIOC_CTRL_MAP` to map XU controls
into v4l2 controls. The most well know user of this feature is the
uvcdynctrl app.
This app has a set of XML files which contains the list of mappings.
Some of these mappings are standard and other ones are custom.
This series move the standard mappings to the kernel driver, so
userspace do not need to depend on external apps to use them.
While we are at it we realized that some of the mappings can be harmful
for the privacy of the user. This series introduce a mechanism to block
those mappings.
While we are at it, we complete the deprecation of the nodrop parameter.
Ideally, this patch should belong in a different series, but then we
will have conflicts... and who wants to works twice?
I have tried this series with a Logitech Webcam Pro 9000, that has been
donated by Hans de Goede (Thanks Hans!!!).
Without this patch and uvcdynctrl the device has 14 controls. (Ctrls A)
With this patch the device has 15 controls (Ctrls B):
Ctrls A
+
control 0x009a090a `Focus, Absolute' min 0 max 255 step 0 default 0 current 0
With uvcdynctrl and this patch the device has 17 controls (Ctrls C):
Ctrls B
+
control 0x0a046d71 `Disable video processing' min 0 max 1 step 1 default 0 current 0
control 0x0a046d72 `Raw bits per pixel' min 0 max 1 step 1 default 0 current 0
With uvcdynctrl and without this patch the device has 19 controls:
Ctrls C
+
control 0x0a046d05 `LED1 Mode' min 0 max 3 step 1 default 3 current 3
0: Off
1: On
2: Blinking
3: Auto (*)
control 0x0a046d06 `LED1 Frequency' min 0 max 255 step 1 default 0 current 0
BTW, Driver tested with virtme-ng. First time that I use it for uvc
development, and it works like a charm :).
virtme-run --kimg arch/x86/boot/bzImage --mods auto --show-command \
--show-boot-console --verbose --qemu-opts -usb -device qemu-xhci \
-device usb-host,hostbus=1,hostport=4
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
Ricardo Ribalda (4):
media: uvcvideo: Remove nodrop parameter
media: uvcvideo: Import standard controls from uvcdynctrl
media: uvcvideo: Announce deprecation intentions for UVCIOC_CTRL_MAP
media: uvcvideo: Introduce allow_privacy_override
.../userspace-api/media/drivers/uvcvideo.rst | 2 +
drivers/media/usb/uvc/uvc_ctrl.c | 161 +++++++++++++++++++++
drivers/media/usb/uvc/uvc_driver.c | 24 +--
drivers/media/usb/uvc/uvc_queue.c | 25 ----
drivers/media/usb/uvc/uvc_v4l2.c | 36 +++++
drivers/media/usb/uvc/uvcvideo.h | 2 +-
include/linux/usb/uvc.h | 10 ++
7 files changed, 215 insertions(+), 45 deletions(-)
---
base-commit: 1f2353f5a1af995efbf7bea44341aa0d03460b28
change-id: 20251117-uvcdynctrl-7b80f5bfbb41
Best regards,
--
Ricardo Ribalda <ribalda@...omium.org>
Powered by blists - more mailing lists