[PATCH] media: uvcvideo: Force UVC version to 1.0a for 0408:4033

Ricardo Ribalda posted 1 patch 2 months ago
drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++
1 file changed, 11 insertions(+)
[PATCH] media: uvcvideo: Force UVC version to 1.0a for 0408:4033
Posted by Ricardo Ribalda 2 months ago
The Quanta ACER HD User Facing camera reports a UVC 1.50 version, but
implements UVC 1.0a as shown by the UVC probe control being 26 bytes
long. Force the UVC version for that device.

Reported-by: Giuliano Lotta <giuliano.lotta@gmail.com>
Closes: https://lore.kernel.org/linux-media/fce4f906-d69b-417d-9f13-bf69fe5c81e3@koyu.space/
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index f0febdc08c2d..cc62bdf77c08 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2431,6 +2431,17 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
  */
 static const struct usb_device_id uvc_ids[] = {
 	/* Quanta ACER HD User Facing */
+	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
+				| USB_DEVICE_ID_MATCH_INT_INFO,
+	  .idVendor		= 0x0408,
+	  .idProduct		= 0x4033,
+	  .bInterfaceClass	= USB_CLASS_VIDEO,
+	  .bInterfaceSubClass	= 1,
+	  .bInterfaceProtocol	= UVC_PC_PROTOCOL_15,
+	  .driver_info		= (kernel_ulong_t)&(const struct uvc_device_info){
+		.uvc_version = 0x010a,
+	  } },
+	/* Quanta ACER HD User Facing */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,
 	  .idVendor		= 0x0408,

---
base-commit: abf2050f51fdca0fd146388f83cddd95a57a008d
change-id: 20240924-uvc-quanta-52a120a277fe

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>
Re: [PATCH] media: uvcvideo: Force UVC version to 1.0a for 0408:4033
Posted by Leonie Ain 2 months ago
> The Quanta ACER HD User Facing camera reports a UVC 1.50 version, but implements UVC 1.0a as shown by the UVC probe control being 26 bytes long. Force the UVC version for that device.

I tested this patch and can confirm it working ~Leonie

Reported-by: Giuliano Lotta<giuliano.lotta@gmail.com>
Closes:https://lore.kernel.org/linux-media/fce4f906-d69b-417d-9f13-bf69fe5c81e3@koyu.space/
Signed-off-by: Ricardo Ribalda<ribalda@chromium.org>
Reviewed-by: Laurent Pinchart<laurent.pinchart@ideasonboard.com>
Tested-by: Leonie Ain <me@koyu.space>
---
  drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++
  1 file changed, 11 insertions(+)


---
base-commit: abf2050f51fdca0fd146388f83cddd95a57a008d
change-id: 20240924-uvc-quanta-52a120a277fe

Best regards,

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index f0febdc08c2d..cc62bdf77c08 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2431,6 +2431,17 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
   */
  static const struct usb_device_id uvc_ids[] = {
  	/* Quanta ACER HD User Facing */
+	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
+				| USB_DEVICE_ID_MATCH_INT_INFO,
+	  .idVendor		= 0x0408,
+	  .idProduct		= 0x4033,
+	  .bInterfaceClass	= USB_CLASS_VIDEO,
+	  .bInterfaceSubClass	= 1,
+	  .bInterfaceProtocol	= UVC_PC_PROTOCOL_15,
+	  .driver_info		= (kernel_ulong_t)&(const struct uvc_device_info){
+		.uvc_version = 0x010a,
+	  } },
+	/* Quanta ACER HD User Facing */
  	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
  				| USB_DEVICE_ID_MATCH_INT_INFO,
  	  .idVendor		= 0x0408,
Re: [PATCH] media: uvcvideo: Force UVC version to 1.0a for 0408:4033
Posted by Laurent Pinchart 2 months ago
Hi Ricardo,

Thank you for the patch.

On Tue, Sep 24, 2024 at 01:33:29PM +0000, Ricardo Ribalda wrote:
> The Quanta ACER HD User Facing camera reports a UVC 1.50 version, but
> implements UVC 1.0a as shown by the UVC probe control being 26 bytes
> long. Force the UVC version for that device.
> 
> Reported-by: Giuliano Lotta <giuliano.lotta@gmail.com>
> Closes: https://lore.kernel.org/linux-media/fce4f906-d69b-417d-9f13-bf69fe5c81e3@koyu.space/
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/media/usb/uvc/uvc_driver.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index f0febdc08c2d..cc62bdf77c08 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2431,6 +2431,17 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
>   */
>  static const struct usb_device_id uvc_ids[] = {
>  	/* Quanta ACER HD User Facing */
> +	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
> +				| USB_DEVICE_ID_MATCH_INT_INFO,
> +	  .idVendor		= 0x0408,
> +	  .idProduct		= 0x4033,
> +	  .bInterfaceClass	= USB_CLASS_VIDEO,
> +	  .bInterfaceSubClass	= 1,
> +	  .bInterfaceProtocol	= UVC_PC_PROTOCOL_15,
> +	  .driver_info		= (kernel_ulong_t)&(const struct uvc_device_info){
> +		.uvc_version = 0x010a,
> +	  } },
> +	/* Quanta ACER HD User Facing */
>  	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
>  				| USB_DEVICE_ID_MATCH_INT_INFO,
>  	  .idVendor		= 0x0408,
> 
> ---
> base-commit: abf2050f51fdca0fd146388f83cddd95a57a008d
> change-id: 20240924-uvc-quanta-52a120a277fe

-- 
Regards,

Laurent Pinchart