]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
V4L/DVB (12327): uvcvideo: Add PROBE_DEF quirk and enable it for the MT6227 device
authorLaurent Pinchart <laurent.pinchart@skynet.be>
Sun, 19 Jul 2009 21:39:56 +0000 (18:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:18:09 +0000 (12:18 -0300)
At least one MT6227 model crashes when receiving a GET_DEF request on the
video probe control. As the various models can't be told apart based on the
descriptors, add a PROBE_DEF quirk to avoid sending the GET_DEF request and
enable the quirk for all models.

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

index f5deb2bc81775f11a3cf54aa60edc5e784c91529..e17216c96ac572fb9024169a6a43e18736c70898 100644 (file)
@@ -1884,7 +1884,8 @@ static struct usb_device_id uvc_ids[] = {
          .bInterfaceClass      = USB_CLASS_VIDEO,
          .bInterfaceSubClass   = 1,
          .bInterfaceProtocol   = 0,
-         .driver_info          = UVC_QUIRK_PROBE_MINMAX },
+         .driver_info          = UVC_QUIRK_PROBE_MINMAX
+                               | UVC_QUIRK_PROBE_DEF },
        /* Syntek (HP Spartan) */
        { .match_flags          = USB_DEVICE_ID_MATCH_DEVICE
                                | USB_DEVICE_ID_MATCH_INT_INFO,
index cf618d7c1f55befd9a238ef6e9b723aa9de39555..68468309932dec4a629e8965f37cba62e5576c83 100644 (file)
@@ -128,6 +128,9 @@ static int uvc_get_video_ctrl(struct uvc_video_device *video,
        if (data == NULL)
                return -ENOMEM;
 
+       if ((video->dev->quirks & UVC_QUIRK_PROBE_DEF) && query == UVC_GET_DEF)
+               return -EIO;
+
        ret = __uvc_query_ctrl(video->dev, query, 0, video->streaming->intfnum,
                probe ? UVC_VS_PROBE_CONTROL : UVC_VS_COMMIT_CONTROL, data,
                size, UVC_CTRL_STREAMING_TIMEOUT);
index 5cf68f59072571f18cedbefd8bf13339ab4248c3..fcccf9c9b7ba7074328c5ebdf1a8bd747fc0168a 100644 (file)
@@ -156,6 +156,7 @@ struct uvc_xu_control {
 #define UVC_QUIRK_STREAM_NO_FID                0x00000010
 #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020
 #define UVC_QUIRK_FIX_BANDWIDTH                0x00000080
+#define UVC_QUIRK_PROBE_DEF            0x00000100
 
 /* Format flags */
 #define UVC_FMT_FLAG_COMPRESSED                0x00000001