diff options
author | Stefan Muenzel <stefanmuenzel@googlemail.com> | 2012-07-28 18:49:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-13 14:49:56 -0400 |
commit | ca47e7192c314193c13942dec45f4070f57ab5a6 (patch) | |
tree | cea28d3a3c55016bff452e0f8dc3bd0acf63ea9b /drivers/media/video/uvc | |
parent | 6fd90db8df379e215f2d495d0b4f3d2553c00277 (diff) |
[media] uvcvideo: Support 10bit, 12bit and alternate 8bit greyscale formats
The SPCAM SP620U camera uses the alternate "Y8 " GUID for the 8-bit
greyscale format, and supports a 12-bit greyscale format. Add support
for those in the driver, as well as for 10-bit greyscale formats.
Signed-off-by: Stefan Muenzel <stefanmuenzel@googlemail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc')
-rw-r--r-- | drivers/media/video/uvc/uvc_driver.c | 19 | ||||
-rw-r--r-- | drivers/media/video/uvc/uvcvideo.h | 9 |
2 files changed, 26 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 1d131720b6d7..11db2621660a 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
@@ -95,12 +95,27 @@ static struct uvc_format_desc uvc_fmts[] = { | |||
95 | .fcc = V4L2_PIX_FMT_UYVY, | 95 | .fcc = V4L2_PIX_FMT_UYVY, |
96 | }, | 96 | }, |
97 | { | 97 | { |
98 | .name = "Greyscale (8-bit)", | 98 | .name = "Greyscale 8-bit (Y800)", |
99 | .guid = UVC_GUID_FORMAT_Y800, | 99 | .guid = UVC_GUID_FORMAT_Y800, |
100 | .fcc = V4L2_PIX_FMT_GREY, | 100 | .fcc = V4L2_PIX_FMT_GREY, |
101 | }, | 101 | }, |
102 | { | 102 | { |
103 | .name = "Greyscale (16-bit)", | 103 | .name = "Greyscale 8-bit (Y8 )", |
104 | .guid = UVC_GUID_FORMAT_Y8, | ||
105 | .fcc = V4L2_PIX_FMT_GREY, | ||
106 | }, | ||
107 | { | ||
108 | .name = "Greyscale 10-bit (Y10 )", | ||
109 | .guid = UVC_GUID_FORMAT_Y10, | ||
110 | .fcc = V4L2_PIX_FMT_Y10, | ||
111 | }, | ||
112 | { | ||
113 | .name = "Greyscale 12-bit (Y12 )", | ||
114 | .guid = UVC_GUID_FORMAT_Y12, | ||
115 | .fcc = V4L2_PIX_FMT_Y12, | ||
116 | }, | ||
117 | { | ||
118 | .name = "Greyscale 16-bit (Y16 )", | ||
104 | .guid = UVC_GUID_FORMAT_Y16, | 119 | .guid = UVC_GUID_FORMAT_Y16, |
105 | .fcc = V4L2_PIX_FMT_Y16, | 120 | .fcc = V4L2_PIX_FMT_Y16, |
106 | }, | 121 | }, |
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index 7c3d082505b7..3764040475bb 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -79,6 +79,15 @@ | |||
79 | #define UVC_GUID_FORMAT_Y800 \ | 79 | #define UVC_GUID_FORMAT_Y800 \ |
80 | { 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \ | 80 | { 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \ |
81 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} | 81 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} |
82 | #define UVC_GUID_FORMAT_Y8 \ | ||
83 | { 'Y', '8', ' ', ' ', 0x00, 0x00, 0x10, 0x00, \ | ||
84 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} | ||
85 | #define UVC_GUID_FORMAT_Y10 \ | ||
86 | { 'Y', '1', '0', ' ', 0x00, 0x00, 0x10, 0x00, \ | ||
87 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} | ||
88 | #define UVC_GUID_FORMAT_Y12 \ | ||
89 | { 'Y', '1', '2', ' ', 0x00, 0x00, 0x10, 0x00, \ | ||
90 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} | ||
82 | #define UVC_GUID_FORMAT_Y16 \ | 91 | #define UVC_GUID_FORMAT_Y16 \ |
83 | { 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, \ | 92 | { 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, \ |
84 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} | 93 | 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} |