From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Ricardo Ribalda <ribalda@chromium.org>,
Yunke Cao <yunkec@chromium.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 2/7] media: uvcvideo: Fix power line control for SunplusIT camera
Date: Wed, 22 Jul 2026 09:54:52 -0400 [thread overview]
Message-ID: <20260722135457.1366301-2-sashal@kernel.org> (raw)
In-Reply-To: <20260722135457.1366301-1-sashal@kernel.org>
From: Ricardo Ribalda <ribalda@chromium.org>
[ Upstream commit 6180056b0e0c097dad5d1569dcd661eaf509ea43 ]
The device does not implement the power line frequency control
correctly. It is a UVC 1.5 device, but implements the control as a UVC
1.1 device.
Add the corresponding control mapping override.
Bus 003 Device 002: ID 2b7e:b752 SunplusIT Inc HD Camera
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x2b7e
idProduct 0xb752
bcdDevice 0.04
iManufacturer 1 SunplusIT Inc
iProduct 2 HD Camera
iSerial 3 01.00.00
bNumConfigurations 1
Cc: Yunke Cao <yunkec@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Stable-dep-of: f078966ca1fb ("media: uvcvideo: Fix sequence number when no EOF")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/media/usb/uvc/uvc_ctrl.c | 2 +-
drivers/media/usb/uvc/uvc_driver.c | 16 ++++++++++++++++
drivers/media/usb/uvc/uvcvideo.h | 1 +
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 466f947ef440d8..fa1f8303fa3d98 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -737,7 +737,7 @@ const struct uvc_control_mapping uvc_ctrl_power_line_mapping_limited = {
V4L2_CID_POWER_LINE_FREQUENCY_50HZ),
};
-static const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11 = {
+const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11 = {
.id = V4L2_CID_POWER_LINE_FREQUENCY,
.entity = UVC_GUID_UVC_PROCESSING,
.selector = UVC_PU_POWER_LINE_FREQUENCY_CONTROL,
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index a1c6ae97a2b930..c93a292e041975 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2454,6 +2454,13 @@ static const struct uvc_device_info uvc_ctrl_power_line_limited = {
},
};
+static const struct uvc_device_info uvc_ctrl_power_line_uvc11 = {
+ .mappings = (const struct uvc_control_mapping *[]) {
+ &uvc_ctrl_power_line_mapping_uvc11,
+ NULL, /* Sentinel */
+ },
+};
+
static const struct uvc_device_info uvc_quirk_probe_minmax = {
.quirks = UVC_QUIRK_PROBE_MINMAX,
};
@@ -3062,6 +3069,15 @@ static const struct usb_device_id uvc_ids[] = {
.bInterfaceSubClass = 1,
.bInterfaceProtocol = 0,
.driver_info = UVC_INFO_QUIRK(UVC_QUIRK_FORCE_BPP) },
+ /* SunplusIT Inc HD Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x2b7e,
+ .idProduct = 0xb752,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 },
/* Sonix Technology USB 2.0 Camera */
{ .match_flags = USB_DEVICE_ID_MATCH_DEVICE
| USB_DEVICE_ID_MATCH_INT_INFO,
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index a7182305390b44..9eb749961bbd65 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -737,6 +737,7 @@ void uvc_status_stop(struct uvc_device *dev);
/* Controls */
extern const struct uvc_control_mapping uvc_ctrl_power_line_mapping_limited;
+extern const struct uvc_control_mapping uvc_ctrl_power_line_mapping_uvc11;
extern const struct v4l2_subscribed_event_ops uvc_ctrl_sub_ev_ops;
int uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
--
2.53.0
next prev parent reply other threads:[~2026-07-22 13:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 9:51 FAILED: patch "[PATCH] media: uvcvideo: Fix sequence number when no EOF" failed to apply to 6.1-stable tree gregkh
2026-07-22 13:54 ` [PATCH 6.1.y 1/7] media: Add common header file with JPEG marker definitions Sasha Levin
2026-07-22 13:54 ` Sasha Levin [this message]
2026-07-22 13:54 ` [PATCH 6.1.y 3/7] media: uvcvideo: Add quirk for Logitech Rally Bar Sasha Levin
2026-07-22 13:54 ` [PATCH 6.1.y 4/7] media: uvcvideo: Disable autosuspend for Insta360 Link Sasha Levin
2026-07-22 13:54 ` [PATCH 6.1.y 5/7] media: uvcvideo: Quirk for invalid dev_sof in Logitech C922 Sasha Levin
2026-07-22 13:54 ` [PATCH 6.1.y 6/7] media: uvcvideo: Implement dual stream quirk to fix loss of usb packets Sasha Levin
2026-07-22 13:54 ` [PATCH 6.1.y 7/7] media: uvcvideo: Fix sequence number when no EOF Sasha Levin
2026-07-31 10:52 ` [PATCH 6.1.y 1/2] media: uvcvideo: Implement dual stream quirk to fix loss of usb packets Ricardo Ribalda
2026-07-31 10:52 ` [PATCH 6.1.y 2/2] media: uvcvideo: Fix sequence number when no EOF Ricardo Ribalda
2026-08-01 1:40 ` [PATCH 6.1.y 1/2] media: uvcvideo: Implement dual stream quirk to fix loss of usb packets Sasha Levin
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=20260722135457.1366301-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=stable@vger.kernel.org \
--cc=yunkec@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.