mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: uvcvideo: Fix power line control for a Chicony camera
@ 2023-08-17 12:38 Ricardo Ribalda
  2023-08-18  6:59 ` Ricardo Ribalda
  2023-08-18  8:15 ` Laurent Pinchart
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Ribalda @ 2023-08-17 12:38 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab
  Cc: linux-media, linux-kernel, Ricardo Ribalda

The device does not implement the control properly.

Fixes vl2-compliance error:

info: checking control 'Power Line Frequency' (0x00980918)
fail: v4l2-test-controls.cpp(552): could not set valid menu item 3

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
This camera, like other Chicony devices, do not implement properly the
Power Line Frequency control.

This time, I do not have direct access to the device, just to the
report, but since other devices from the same family are showing the
same error, it is safe to assume that the same fix will work here.
---
 drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 08fcd2ffa727..db2556e95b72 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2592,6 +2592,15 @@ static const struct usb_device_id uvc_ids[] = {
 	  .bInterfaceSubClass	= 1,
 	  .bInterfaceProtocol	= 0,
 	  .driver_info		= (kernel_ulong_t)&uvc_ctrl_power_line_limited },
+	/* Chicony Electronics Co., Ltd */
+	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
+				| USB_DEVICE_ID_MATCH_INT_INFO,
+	  .idVendor		= 0x04f2,
+	  .idProduct		= 0xb67c,
+	  .bInterfaceClass	= USB_CLASS_VIDEO,
+	  .bInterfaceSubClass	= 1,
+	  .bInterfaceProtocol	= 0,
+	  .driver_info		= (kernel_ulong_t)&uvc_ctrl_power_line_limited },
 	/* Chicony EasyCamera */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,

---
base-commit: 4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6
change-id: 20230817-chicony-9c35f2046c6f

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-18  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-17 12:38 [PATCH] media: uvcvideo: Fix power line control for a Chicony camera Ricardo Ribalda
2023-08-18  6:59 ` Ricardo Ribalda
2023-08-18  8:15 ` Laurent Pinchart
2023-08-18  8:16   ` Laurent Pinchart
2023-08-18  8:18   ` Ricardo Ribalda

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®