From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E14053947A3 for ; Mon, 16 Mar 2026 13:34:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773668089; cv=none; b=HsRjRDBmtWHVB3DObR4/0VVX5PN7spOOEjk7Az8MBZx9hhkNFPKBiXOXBNXVOgAbh0bxytvG1kcc6Gv8bWTwISZ+pDBe7qZT+fb8+H2VBjl18WW5ZNdkf1j2m5y3+Jhca+2oVfBGJ5b2aQ0Q/MOA71hDw7yKnNaEDpTdTQuzM24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773668089; c=relaxed/simple; bh=jpEYOCyVZpkW297dEVR+a4nlIxn5JZTHOg6mU7Iiuvs=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=o2SiX2kfrk4fgU+2rNCzZaqlZJiTq/0UJXfyrIPUPJ3kuthOWN83K4Az/VI5ZG5L5qvOyUEVczkwWwwSslAYjbQ1G6/mwX7G9/IJi6PKrRxJwElcLlrxOLn1bK3f+AUc/tjzYKI51zZ6DWhZ+57r+0IOsb7HVqp2Zk0hSjRrAWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=BljOqsBV; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="BljOqsBV" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-5a13f6bcbf4so6495587e87.1 for ; Mon, 16 Mar 2026 06:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1773668086; x=1774272886; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=mJa+HjH4HZH7VGwUSdmdofNOBcUA6x1otGkbczV0UXQ=; b=BljOqsBVJmyg1t7LoD6c9497ZIR/WwuqqqAmTjghkUBO9UK6bjAnwbSbwcSkTQZ0mI CGcqj52ACDANyfQ+fynND5vtpNfoh9iNeUkYN19wmV6PFveEVObyqK/aasukYMU7JxiI xPylPcgdvDTppq5/9nxUsvy6JNvUJGzhBx6Yk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773668086; x=1774272886; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mJa+HjH4HZH7VGwUSdmdofNOBcUA6x1otGkbczV0UXQ=; b=QkDI0HVg2MfTZqkKu1XbHd3e5k+vwMOKd6mMQJDNHbhgBqTJpqnWc0PVOldVIUHb9J 6BAvqLyHDM3UyS3PQWDkns8GE6aE7OCEo1aTjGvONYeBR+FdEfgMd8OQNx95VA/aX5EB xwzhamGvO5///CB3ZhM7Mh19nazWiVmG30lWJJDODR7p3YgwRWv83YEVHSQ/pU3zURXm Bqd770m4fgA1hib05PnReD9W5bqJpO2BR3TNrnMZm+76D35JfHV42OKDfQbtpt61FT8d NUSEE9WW+CT/z+3//Et2KtsoGFjj7YAvoNumF/eQXGpKdHyv6ZszgAcTHQW8vUsCk0TW bxSQ== X-Forwarded-Encrypted: i=1; AJvYcCUITAdbU9yaEBlakfONdCZKutYlwOW6lvGMUYV/md7s48KjZy+kINRypZgpN3apfEfU3iq9wVSOZKWkOxY=@vger.kernel.org X-Gm-Message-State: AOJu0YwHC3fFseEdRDN790GtYrKqrng+iqM7kf+Ga6T4LQuOs7y9I9gZ F6UeO3NBskTWct8VETMBko/sn14t8L+Bx3WCzSvUz9t2F74oHNwUp+jBRRMIDxPRJw== X-Gm-Gg: ATEYQzzWP0SoC4gzHL3mXa6It3KSAiDhYTQPShyBtJL48b1fxh2i/7opjDt2aX4ROaA +QRtEmVIj50kSFk2YizSnsr6sLtRVAz0VB0xlgRoBRkPUsVoNqbCsmtIkAGKDfwvM+3oo/wWSt6 sMKgKJlXMTlfDxQCgeiE0uTryREAiylilcM2qGjYgBggjQtb+/oQiVCBeQjHYXBtjum22ah3J3D TA4tyDdYvhfimyQBVelHq506NdLZ7o07xu5fq2GFZjaNAxH8CHOaVnkuWMpTQptdw0QzG2wBOHK bE/zUbZfwsEvdxPpdIL6PTwGCSq/a+xv+Vifo+tBI+GUnwS2uodyUFvr3FZEvplK+kw+eCQpIo+ OynpD1/dzSDlpcT5bwnJURrFkIMr4bHCXVo/cMTgPAYLQd8U6EJdUX0S9Zd8IN6p00o4hWJSI8W 4Faz+/lmPiZweARj/rkbf4sUSdSkHbBNSz4kxjGWRYS8DtQUgCzvs11yrsDHiVj6eo/QroryHrV g== X-Received: by 2002:a05:6512:70c:b0:5a1:33b6:2b6d with SMTP id 2adb3069b0e04-5a162705caemr3372921e87.14.1773668086104; Mon, 16 Mar 2026 06:34:46 -0700 (PDT) Received: from ribalda.c.googlers.com (27.69.88.34.bc.googleusercontent.com. [34.88.69.27]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a156366a7fsm3481473e87.76.2026.03.16.06.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2026 06:34:45 -0700 (PDT) From: Ricardo Ribalda Subject: [PATCH v3 0/4] media: uvcvideo: Map known XU controls Date: Mon, 16 Mar 2026 13:34:43 +0000 Message-Id: <20260316-uvcdynctrl-v3-0-19cd4657e1f3@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPMGuGkC/23MQQ6CMBCF4auYWVvTFgnUlfcwLmg7hUmEmhYaC eHuFlZqXL6XfP8CEQNhhMthgYCJIvkhj+J4ANM1Q4uMbN4guSyFEBWbkrHzYMbwYJWuuSu10/o sIINnQEevPXa7591RHH2Y93YS2/s3kwTjrEFbcWysK2x9NV3wPU39yYcWtlKSn1p9aZk1L0rln Fa1Ufij13V9A4uKLnnlAAAA X-Change-ID: 20251117-uvcdynctrl-7b80f5bfbb41 To: Laurent Pinchart , Hans de Goede , Mauro Carvalho Chehab , Greg Kroah-Hartman Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Ricardo Ribalda , Manav Gautama , Martin Rubli X-Mailer: b4 0.14.3 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 --- Changes in v3: - s/param/module parameter/ (Thanks HdG) - Rebase to lastest media-committers/next and remove merged patches. - Link to v2: https://lore.kernel.org/r/20251119-uvcdynctrl-v2-0-0359ffb98c9e@chromium.org Changes in v2: - Document how to get GUIDs - Show clear deprecation intentions to the user. - Add new patch for the Kconfig approach (Thanks Mauro). - Remove duplicated control in commit message, provide background and add documentation. (Thanks Laurent) - Block also uvc_query_ctrl for privacy controls (Thanks Gergo Koteles) - Link to v1: https://lore.kernel.org/r/20251117-uvcdynctrl-v1-0-aed70eadf3d8@chromium.org --- Ricardo Ribalda (4): media: uvcvideo: Import standard controls from uvcdynctrl media: uvcvideo: Announce deprecation intentions for UVCIOC_CTRL_MAP media: uvcvideo: Introduce allow_privacy_override module parameter media: uvcvideo: RFC: Convert allow_privacy_override into Kconfig .../userspace-api/media/drivers/uvcvideo.rst | 2 + drivers/media/usb/uvc/Kconfig | 11 ++ drivers/media/usb/uvc/uvc_ctrl.c | 212 +++++++++++++++++++++ drivers/media/usb/uvc/uvc_v4l2.c | 11 ++ drivers/media/usb/uvc/uvcvideo.h | 1 + include/linux/usb/uvc.h | 10 + 6 files changed, 247 insertions(+) --- base-commit: f6390408a846aacc2171c17d88b062e202d84e86 change-id: 20251117-uvcdynctrl-7b80f5bfbb41 Best regards, -- Ricardo Ribalda