* [PATCH v2] media: uvcvideo: Fix power line control for a Chicony camera
@ 2023-09-05 15:29 Ricardo Ribalda
2023-09-06 13:44 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Ribalda @ 2023-09-05 15:29 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 v4l2-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>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
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.
---
Changes in v2:
- Fix IntefaceProtocol, the camera is uvc1.5
- I managed to write 0 to the control, so the proper quirk is uvc11 not
limited
- Changes by Laurent:
- Rename device
- s/v4l/v4l2
- Link to v1: https://lore.kernel.org/r/20230817-chicony-v1-1-76bde4d6ff6b@chromium.org
---
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..4b5ea3501753 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 Integrated Camera */
+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
+ | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x04f2,
+ .idProduct = 0xb67c,
+ .bInterfaceClass = USB_CLASS_VIDEO,
+ .bInterfaceSubClass = 1,
+ .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
+ .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 },
/* 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] 3+ messages in thread* Re: [PATCH v2] media: uvcvideo: Fix power line control for a Chicony camera
2023-09-05 15:29 [PATCH v2] media: uvcvideo: Fix power line control for a Chicony camera Ricardo Ribalda
@ 2023-09-06 13:44 ` Laurent Pinchart
2023-09-06 21:00 ` Ricardo Ribalda
0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2023-09-06 13:44 UTC (permalink / raw)
To: Ricardo Ribalda; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
Hi Ricardo,
On Tue, Sep 05, 2023 at 03:29:52PM +0000, Ricardo Ribalda wrote:
> The device does not implement the control properly.
>
> Fixes v4l2-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>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This still applies :-)
I've taken the patch in my tree and will push it for v6.7.
> ---
> 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.
> ---
> Changes in v2:
> - Fix IntefaceProtocol, the camera is uvc1.5
> - I managed to write 0 to the control, so the proper quirk is uvc11 not
> limited
> - Changes by Laurent:
> - Rename device
> - s/v4l/v4l2
> - Link to v1: https://lore.kernel.org/r/20230817-chicony-v1-1-76bde4d6ff6b@chromium.org
> ---
> 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..4b5ea3501753 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 Integrated Camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x04f2,
> + .idProduct = 0xb67c,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 },
> /* Chicony EasyCamera */
> { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> | USB_DEVICE_ID_MATCH_INT_INFO,
>
> ---
> base-commit: 4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6
> change-id: 20230817-chicony-9c35f2046c6f
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] media: uvcvideo: Fix power line control for a Chicony camera
2023-09-06 13:44 ` Laurent Pinchart
@ 2023-09-06 21:00 ` Ricardo Ribalda
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Ribalda @ 2023-09-06 21:00 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
Hi Laurent
On Wed, 6 Sept 2023 at 15:44, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Ricardo,
>
> On Tue, Sep 05, 2023 at 03:29:52PM +0000, Ricardo Ribalda wrote:
> > The device does not implement the control properly.
> >
> > Fixes v4l2-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>
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> This still applies :-)
>
> I've taken the patch in my tree and will push it for v6.7.
Thanks!
>
> > ---
> > 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.
> > ---
> > Changes in v2:
> > - Fix IntefaceProtocol, the camera is uvc1.5
> > - I managed to write 0 to the control, so the proper quirk is uvc11 not
> > limited
> > - Changes by Laurent:
> > - Rename device
> > - s/v4l/v4l2
> > - Link to v1: https://lore.kernel.org/r/20230817-chicony-v1-1-76bde4d6ff6b@chromium.org
> > ---
> > 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..4b5ea3501753 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 Integrated Camera */
> > + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > + | USB_DEVICE_ID_MATCH_INT_INFO,
> > + .idVendor = 0x04f2,
> > + .idProduct = 0xb67c,
> > + .bInterfaceClass = USB_CLASS_VIDEO,
> > + .bInterfaceSubClass = 1,
> > + .bInterfaceProtocol = UVC_PC_PROTOCOL_15,
> > + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 },
> > /* Chicony EasyCamera */
> > { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> > | USB_DEVICE_ID_MATCH_INT_INFO,
> >
> > ---
> > base-commit: 4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6
> > change-id: 20230817-chicony-9c35f2046c6f
>
> --
> Regards,
>
> Laurent Pinchart
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-06 21:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05 15:29 [PATCH v2] media: uvcvideo: Fix power line control for a Chicony camera Ricardo Ribalda
2023-09-06 13:44 ` Laurent Pinchart
2023-09-06 21:00 ` 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®