Commit 61421206 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16

The Miricle 307K (17dc:0202) camera reports a 16-bit greyscale format,
support it in the driver.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent acc8cc43
...@@ -91,10 +91,15 @@ static struct uvc_format_desc uvc_fmts[] = { ...@@ -91,10 +91,15 @@ static struct uvc_format_desc uvc_fmts[] = {
.fcc = V4L2_PIX_FMT_UYVY, .fcc = V4L2_PIX_FMT_UYVY,
}, },
{ {
.name = "Greyscale", .name = "Greyscale (8-bit)",
.guid = UVC_GUID_FORMAT_Y800, .guid = UVC_GUID_FORMAT_Y800,
.fcc = V4L2_PIX_FMT_GREY, .fcc = V4L2_PIX_FMT_GREY,
}, },
{
.name = "Greyscale (16-bit)",
.guid = UVC_GUID_FORMAT_Y16,
.fcc = V4L2_PIX_FMT_Y16,
},
{ {
.name = "RGB Bayer", .name = "RGB Bayer",
.guid = UVC_GUID_FORMAT_BY8, .guid = UVC_GUID_FORMAT_BY8,
......
...@@ -131,11 +131,13 @@ struct uvc_xu_control { ...@@ -131,11 +131,13 @@ struct uvc_xu_control {
#define UVC_GUID_FORMAT_Y800 \ #define UVC_GUID_FORMAT_Y800 \
{ 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \ { 'Y', '8', '0', '0', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y16 \
{ 'Y', '1', '6', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_BY8 \ #define UVC_GUID_FORMAT_BY8 \
{ 'B', 'Y', '8', ' ', 0x00, 0x00, 0x10, 0x00, \ { 'B', 'Y', '8', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
/* ------------------------------------------------------------------------ /* ------------------------------------------------------------------------
* Driver specific constants. * Driver specific constants.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment