]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/uvcvideo-ignore-hue-control-for-5986-0241.patch
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / uvcvideo-ignore-hue-control-for-5986-0241.patch
CommitLineData
00e5a55c
BS
1From: Brandon Philips <bphilips@suse.de>
2Subject: uvcvideo: ignore hue control for 5986:0241
3References: bnc#499152
4Patch-mainline: Never? I will submit upstream but there is probably a better fix
5
6Querying the hue control on Bison 5986:0241 causes the chipset to
7lockup. So, create a quirk that will avoid offering V4L2_CID_HUE to user
8space.
9
10Signed-off-by: Brandon Philips <bphilips@suse.de>
11
12---
13 drivers/media/video/uvc/uvc_ctrl.c | 4 ++++
14 drivers/media/video/uvc/uvc_driver.c | 8 ++++++++
15 drivers/media/video/uvc/uvcvideo.h | 1 +
16 3 files changed, 13 insertions(+)
17
18--- a/drivers/media/video/uvc/uvc_ctrl.c
19+++ b/drivers/media/video/uvc/uvc_ctrl.c
20@@ -588,6 +588,10 @@ int uvc_query_v4l2_ctrl(struct uvc_video
21 __u8 *data;
22 int ret;
23
24+ if ((video->dev->quirks & UVC_QUIRK_HUE_EPIPE) &&
25+ (v4l2_ctrl->id == V4L2_CID_HUE))
26+ return -EINVAL;
27+
28 ctrl = uvc_find_control(video, v4l2_ctrl->id, &mapping);
29 if (ctrl == NULL)
30 return -EINVAL;
31--- a/drivers/media/video/uvc/uvc_driver.c
32+++ b/drivers/media/video/uvc/uvc_driver.c
33@@ -1948,6 +1948,14 @@ static struct usb_device_id uvc_ids[] =
34 .bInterfaceSubClass = 1,
35 .bInterfaceProtocol = 0,
36 .driver_info = UVC_QUIRK_PROBE_MINMAX },
37+ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
38+ | USB_DEVICE_ID_MATCH_INT_INFO,
39+ .idVendor = 0x5986,
40+ .idProduct = 0x0241,
41+ .bInterfaceClass = USB_CLASS_VIDEO,
42+ .bInterfaceSubClass = 1,
43+ .bInterfaceProtocol = 0,
44+ .driver_info = UVC_QUIRK_HUE_EPIPE },
45 /* Generic USB Video Class */
46 { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
47 {}
48--- a/drivers/media/video/uvc/uvcvideo.h
49+++ b/drivers/media/video/uvc/uvcvideo.h
50@@ -314,6 +314,7 @@ struct uvc_xu_control {
51 #define UVC_QUIRK_BUILTIN_ISIGHT 0x00000008
52 #define UVC_QUIRK_STREAM_NO_FID 0x00000010
53 #define UVC_QUIRK_IGNORE_SELECTOR_UNIT 0x00000020
54+#define UVC_QUIRK_HUE_EPIPE 0x00000100
55
56 /* Format flags */
57 #define UVC_FMT_FLAG_COMPRESSED 0x00000001