[media] UVC: Add support for R200 depth camera
authorAviv Greenberg <avivgr@gmail.com>
Wed, 3 Feb 2016 17:08:52 +0000 (15:08 -0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 3 Mar 2016 09:49:20 +0000 (06:49 -0300)
Add support for Intel R200 depth camera in uvc driver.
This includes adding new uvc GUIDs for the new pixel formats,
adding new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.

Tested-by: Greenberg, Aviv D <aviv.d.greenberg@intel.com>
Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvcvideo.h
include/uapi/linux/videodev2.h

index 4e7148815a7855c2f81639bf3652efaeef2e9d56..451e84e962e2e0be98b48536d2ff8b9546236fbb 100644 (file)
@@ -148,6 +148,26 @@ static struct uvc_format_desc uvc_fmts[] = {
                .guid           = UVC_GUID_FORMAT_H264,
                .fcc            = V4L2_PIX_FMT_H264,
        },
+       {
+               .name           = "Greyscale 8 L/R (Y8I)",
+               .guid           = UVC_GUID_FORMAT_Y8I,
+               .fcc            = V4L2_PIX_FMT_Y8I,
+       },
+       {
+               .name           = "Greyscale 12 L/R (Y12I)",
+               .guid           = UVC_GUID_FORMAT_Y12I,
+               .fcc            = V4L2_PIX_FMT_Y12I,
+       },
+       {
+               .name           = "Depth data 16-bit (Z16)",
+               .guid           = UVC_GUID_FORMAT_Z16,
+               .fcc            = V4L2_PIX_FMT_Z16,
+       },
+       {
+               .name           = "Bayer 10-bit (SRGGB10P)",
+               .guid           = UVC_GUID_FORMAT_RW10,
+               .fcc            = V4L2_PIX_FMT_SRGGB10P,
+       },
 };
 
 /* ------------------------------------------------------------------------
index f0f2391e1b436d7be1916d545421a0091b03bf92..7e4d3eea371b64dfab3d2a9126f1c2574dea4089 100644 (file)
 #define UVC_GUID_FORMAT_H264 \
        { 'H',  '2',  '6',  '4', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_Y8I \
+       { 'Y',  '8',  'I',  ' ', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_Y12I \
+       { 'Y',  '1',  '2',  'I', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_Z16 \
+       { 'Z',  '1',  '6',  ' ', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_RW10 \
+       { 'R',  'W',  '1',  '0', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.
index 466458422385dba37916be6c1441ae1ffb61499e..e895975c5b0ea5811ed2fdc361f57cc978b5efb3 100644 (file)
@@ -625,6 +625,9 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_JPGL      v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
 #define V4L2_PIX_FMT_SE401      v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
 #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
+#define V4L2_PIX_FMT_Y8I      v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 8-bit L/R interleaved */
+#define V4L2_PIX_FMT_Y12I     v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 12-bit L/R interleaved */
+#define V4L2_PIX_FMT_Z16      v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 16-bit */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8          v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */