Re: [PATCH] uvc: Intel PID enabling UVC Metadata attributes

From: Laurent Pinchart
Date: Wed Apr 19 2023 - 22:50:26 EST


Hi Dmitry,

Thank you for the patch.

On Sun, Jan 29, 2023 at 03:43:38PM +0200, Dmitry Perchanov wrote:
> Intel RealSense UVC cameras Metadata support.

The subject line should start with "media: uvcvideo:".

Both the subject line and the body of the commit message should use the
imperative mood. For instance,

media: uvcvideo: Enable Intel RealSense metadata for 8 new devices

Intel RealSense UVC cameras produce metadata in a vendor-specific format
that is already supported by the uvcvideo driver. Enable handling of
this metadata for 8 additional RealSense devices.

> Co-developed-by: Yu MENG <yu1.meng@xxxxxxxxx>
> Co-developed-by: Evgeni Raikhel <evgeni.raikhel@xxxxxxxxx>
> Signed-off-by: Dmitry Perchanov <dmitry.perchanov@xxxxxxxxx>
> ---
> drivers/media/usb/uvc/uvc_driver.c | 72 ++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index e4bcb5011360..955f67d9a993 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -3000,6 +3000,78 @@ static const struct usb_device_id uvc_ids[] = {
> .bInterfaceSubClass = 1,
> .bInterfaceProtocol = 0,
> .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D410/ASR depth camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0ad2,

Please keep entries sorted by vendor and product ID in this list. The
first four entries from this patch should go before 8086:0b03 that is
already in the driver.

> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D415/ASRC depth camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0ad3,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D430/AWG depth camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0ad4,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel Fallback USB2 Descriptor */

According to the descriptors you've provided (thank you for that), this
camera is named "Depth Camera 430". How does it differ from the 0ad4
device which you also name 430 right above ?

> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0ad6,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D435/AWGC depth camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0b07,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D435i depth camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0b3a,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D405 Depth Camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0b5b,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* Intel D455 Depth Camera */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x8086,
> + .idProduct = 0x0b5c,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> /* Generic USB Video Class */
> { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
> { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },

--
Regards,

Laurent Pinchart