V4L/DVB: uvcvideo: Add support for V4L2_PIX_FMT_Y16
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 12 Apr 2010 13:41:22 +0000 (10:41 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:58:42 +0000 (12:58 -0300)
The Miricle 307K (17dc:0202) camera reports a 16-bit greyscale format,
support it in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_driver.c
drivers/media/video/uvc/uvcvideo.h

index 72a705802f189e348f64477dcaa9311b01efdc23..838b56f097cf816f9221f97a63fd468f49e7bdac 100644 (file)
@@ -91,10 +91,15 @@ static struct uvc_format_desc uvc_fmts[] = {
                .fcc            = V4L2_PIX_FMT_UYVY,
        },
        {
-               .name           = "Greyscale",
+               .name           = "Greyscale (8-bit)",
                .guid           = UVC_GUID_FORMAT_Y800,
                .fcc            = V4L2_PIX_FMT_GREY,
        },
+       {
+               .name           = "Greyscale (16-bit)",
+               .guid           = UVC_GUID_FORMAT_Y16,
+               .fcc            = V4L2_PIX_FMT_Y16,
+       },
        {
                .name           = "RGB Bayer",
                .guid           = UVC_GUID_FORMAT_BY8,
index 2bba059259e6ce9b5465490345c3e9f1dc9f0317..d1f88406a5e7cf784b108d6c0bc1e3584871d742 100644 (file)
@@ -131,11 +131,13 @@ struct uvc_xu_control {
 #define UVC_GUID_FORMAT_Y800 \
        { 'Y',  '8',  '0',  '0', 0x00, 0x00, 0x10, 0x00, \
         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 \
        { 'B',  'Y',  '8',  ' ', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 
-
 /* ------------------------------------------------------------------------
  * Driver specific constants.
  */