From: Ricardo Ribalda <ribalda@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org,
Ricardo Ribalda <ribalda@chromium.org>,
Manav Gautama <bandwidthcrunch@gmail.com>,
Martin Rubli <martin_rubli@logitech.com>
Subject: [PATCH 0/4] media: uvcvideo: Map known XU controls
Date: Mon, 17 Nov 2025 20:14:15 +0000 [thread overview]
Message-ID: <20251117-uvcdynctrl-v1-0-aed70eadf3d8@chromium.org> (raw)
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@chromium.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@chromium.org>
next reply other threads:[~2025-11-17 20:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 20:14 Ricardo Ribalda [this message]
2025-11-17 20:14 ` [PATCH 1/4] media: uvcvideo: Remove nodrop parameter Ricardo Ribalda
2025-11-19 4:20 ` Laurent Pinchart
2025-11-17 20:14 ` [PATCH 2/4] media: uvcvideo: Import standard controls from uvcdynctrl Ricardo Ribalda
2025-11-19 4:21 ` Laurent Pinchart
2025-11-17 20:14 ` [PATCH 3/4] media: uvcvideo: Announce deprecation intentions for UVCIOC_CTRL_MAP Ricardo Ribalda
2025-11-19 4:21 ` Laurent Pinchart
2025-11-17 20:14 ` [PATCH 4/4] media: uvcvideo: Introduce allow_privacy_override Ricardo Ribalda
2025-11-17 21:10 ` Gergo Koteles
2025-11-18 6:21 ` Ricardo Ribalda
2025-11-18 8:48 ` Gergo Koteles
2025-11-18 9:25 ` Ricardo Ribalda
2025-11-18 11:14 ` Gergo Koteles
2025-11-18 14:26 ` Hans de Goede
2025-11-18 15:36 ` Gergo Koteles
2025-11-18 18:30 ` Ricardo Ribalda
2025-11-19 21:34 ` Gergo Koteles
2025-11-19 4:19 ` Laurent Pinchart
2025-11-18 11:14 ` Greg Kroah-Hartman
2025-11-18 14:09 ` Mauro Carvalho Chehab
2025-11-18 16:01 ` Michal Pecio
2025-11-18 18:28 ` Ricardo Ribalda
2025-11-19 4:19 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251117-uvcdynctrl-v1-0-aed70eadf3d8@chromium.org \
--to=ribalda@chromium.org \
--cc=bandwidthcrunch@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=martin_rubli@logitech.com \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®