summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Patrick Johnson <teknotus@teknot.us>2015-03-02 20:30:48 -0800
committerInki Dae <inki.dae@samsung.com>2017-02-01 00:10:47 -0800
commit829afdc3b39237e160cac2df650af3e6823edeed (patch)
treee051772bc6473b9de1a6bc8d4b087f078d39a10a
parent35ae16ec4e7511d09c4261a3d2af4e8029ed8759 (diff)
downloadlinux-exynos-829afdc3b39237e160cac2df650af3e6823edeed.tar.gz
linux-exynos-829afdc3b39237e160cac2df650af3e6823edeed.tar.bz2
linux-exynos-829afdc3b39237e160cac2df650af3e6823edeed.zip
This patch adds video format support for Intel real sense F200 camera. Multimedia team requested me to support this. Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us> [Port from https://github.com/teknotus/depthview/tree/kernelpatchfmt] Signed-off-by: Inki Dae <inki.dae@samsung.com> Change-Id: I48de58feb46fc1a91fcee449213c03bdbbcbb905
-rw-r--r--drivers/media/usb/uvc/uvc_driver.c30
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h18
-rw-r--r--include/uapi/linux/videodev2.h6
3 files changed, 54 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 5970dd6a1c1c..9e3eaab0ff9f 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -147,6 +147,36 @@ static struct uvc_format_desc uvc_fmts[] = {
.guid = UVC_GUID_FORMAT_H264,
.fcc = V4L2_PIX_FMT_H264,
},
+ {
+ .name = "Depth 16-bit (INVZ)",
+ .guid = UVC_GUID_FORMAT_INVZ,
+ .fcc = V4L2_PIX_FMT_INVZ,
+ },
+ {
+ .name = "Depth:IR 16:8 24-bit (INZI)",
+ .guid = UVC_GUID_FORMAT_INZI,
+ .fcc = V4L2_PIX_FMT_INZI,
+ },
+ {
+ .name = "Depth 16-bit (INVR)",
+ .guid = UVC_GUID_FORMAT_INVR,
+ .fcc = V4L2_PIX_FMT_INVR,
+ },
+ {
+ .name = "Depth:IR 16:8 24-bit (INRI)",
+ .guid = UVC_GUID_FORMAT_INRI,
+ .fcc = V4L2_PIX_FMT_INRI,
+ },
+ {
+ .name = "Infrared 8-bit (INVI)",
+ .guid = UVC_GUID_FORMAT_INVI,
+ .fcc = V4L2_PIX_FMT_INVI,
+ },
+ {
+ .name = "FlickerIR 8-bit (RELI)",
+ .guid = UVC_GUID_FORMAT_RELI,
+ .fcc = V4L2_PIX_FMT_RELI,
+ },
};
/* ------------------------------------------------------------------------
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 1b594c203992..f61641af2949 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -119,6 +119,24 @@
#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_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_INVR \
+ { 'I', 'N', 'V', 'R', 0x90, 0x2d, 0x58, 0x4a, \
+ 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INRI \
+ { 'I', 'N', 'R', 'I', 0x90, 0x2d, 0x58, 0x4a, \
+ 0x92, 0x0b, 0x77, 0x3f, 0x1f, 0x2c, 0x55, 0x6b}
+#define UVC_GUID_FORMAT_INVI \
+ { 'I', 'N', 'V', 'I', 0xdb, 0x57, 0x49, 0x5e, \
+ 0x8e, 0x3f, 0xf4, 0x79, 0x53, 0x2b, 0x94, 0x6f}
+#define UVC_GUID_FORMAT_RELI \
+ { 'R', 'E', 'L', 'I', 0x14, 0x13, 0x43, 0xf9, \
+ 0xa7, 0x5a, 0xee, 0x6b, 0xbf, 0x01, 0x2e, 0x23}
/* ------------------------------------------------------------------------
* Driver specific constants.
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index fa376f7666ba..1df0e6ec620a 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -529,6 +529,12 @@ 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_INVZ v4l2_fourcc('I', 'N', 'V', 'Z') /* 16 Depth */
+#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I') /* 24 Depth/IR 16:8 */
+#define V4L2_PIX_FMT_INVR v4l2_fourcc('I', 'N', 'V', 'R') /* 16 Depth */
+#define V4L2_PIX_FMT_INRI v4l2_fourcc('I', 'N', 'R', 'I') /* 24 Depth/IR 16:8 */
+#define V4L2_PIX_FMT_INVI v4l2_fourcc('I', 'N', 'V', 'I') /* 8 IR */
+#define V4L2_PIX_FMT_RELI v4l2_fourcc('R', 'E', 'L', 'I') /* 8 IR alternating on off illumination */
/* SDR formats - used only for Software Defined Radio devices */
#define V4L2_SDR_FMT_CU8 v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */