[media] uvcvideo: Add support for Intel SR300 depth camera
authorDaniel Patrick Johnson <teknotus@teknot.us>
Thu, 2 Mar 2017 23:43:20 +0000 (20:43 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 10 Apr 2017 10:47:34 +0000 (07:47 -0300)
Add support for Intel SR300 depth camera in uvc driver.
This includes adding three uvc GUIDs for the required pixel formats
and updating the uvc driver GUID-to-4cc tables with the new formats.

Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us>
Signed-off-by: Aviv Greenberg <avivgr@gmail.com>
Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvcvideo.h

index 04bf35063c4c489cebfd63432e38dd3b9518fc08..46d6be0bb31688ab32e3fd9e149828ead3c16590 100644 (file)
@@ -188,6 +188,21 @@ static struct uvc_format_desc uvc_fmts[] = {
                .guid           = UVC_GUID_FORMAT_GR16,
                .fcc            = V4L2_PIX_FMT_SGRBG16,
        },
+       {
+               .name           = "Depth data 16-bit (Z16)",
+               .guid           = UVC_GUID_FORMAT_INVZ,
+               .fcc            = V4L2_PIX_FMT_Z16,
+       },
+       {
+               .name           = "Greyscale 10-bit (Y10 )",
+               .guid           = UVC_GUID_FORMAT_INVI,
+               .fcc            = V4L2_PIX_FMT_Y10,
+       },
+       {
+               .name           = "IR:Depth 26-bit (INZI)",
+               .guid           = UVC_GUID_FORMAT_INZI,
+               .fcc            = V4L2_PIX_FMT_INZI,
+       },
 };
 
 /* ------------------------------------------------------------------------
index 4205e7a423f0fed13473559ea503e35dd1a69771..15e415e32c7f596fb17f94e063e820c1ef63b305 100644 (file)
 #define UVC_GUID_FORMAT_RW10 \
        { 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_INVZ \
+       { 'I',  'N',  'V',  'Z', 0x90, 0x2d, 0x58, 0x4a, \
+        0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INZI \
+       { 'I',  'N',  'Z',  'I', 0x66, 0x1a, 0x42, 0xa2, \
+        0x90, 0x65, 0xd0, 0x18, 0x14, 0xa8, 0xef, 0x8a}
+#define UVC_GUID_FORMAT_INVI \
+       { 'I',  'N',  'V',  'I', 0xdb, 0x57, 0x49, 0x5e, \
+        0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.