[media] uvcvideo: Add support for V4L2_PIX_FMT_RGB565
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 6 Mar 2011 11:32:04 +0000 (08:32 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 20 May 2011 12:30:38 +0000 (09:30 -0300)
The TomTom navigation system used in the Sony XNV 660BT and 770BT
reports an RGB565 (RGBP) 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 6459b8cba22384f88a04e28fb3e7cb6964d9d882..61e5137dbcb7976d5fabe03ef491b08a4d2300b9 100644 (file)
@@ -103,6 +103,11 @@ static struct uvc_format_desc uvc_fmts[] = {
                .guid           = UVC_GUID_FORMAT_BY8,
                .fcc            = V4L2_PIX_FMT_SBGGR8,
        },
+       {
+               .name           = "RGB565",
+               .guid           = UVC_GUID_FORMAT_RGBP,
+               .fcc            = V4L2_PIX_FMT_RGB565,
+       },
 };
 
 /* ------------------------------------------------------------------------
index 18d76679d952333364e9d9c713bf8ab59ff28494..cd58ea81320bfbe94ee66bd21b2981488ae17e90 100644 (file)
@@ -176,6 +176,9 @@ struct uvc_xu_control_query {
 #define UVC_GUID_FORMAT_BY8 \
        { 'B',  'Y',  '8',  ' ', 0x00, 0x00, 0x10, 0x00, \
         0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_RGBP \
+       { 'R',  'G',  'B',  'P', 0x00, 0x00, 0x10, 0x00, \
+        0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
 
 /* ------------------------------------------------------------------------
  * Driver specific constants.