From: Philipp Zabel Date: Mon, 7 Nov 2016 20:15:47 +0000 (-0200) Subject: [media] uvcvideo: add support for Oculus Rift Sensor X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=03c47aaeffec8e91ff4207d4814061a24fe51afb;p=linux-beck.git [media] uvcvideo: add support for Oculus Rift Sensor The Rift CV1 Sensor has bInterfaceClass set to vendor specific, so we need an entry in uvc_ids to probe it. Just as the Rift DK2 IR tracker, it misreports the pixel format as YUYV instead of Y8. The sensor is configured with a low exposure time and high black level by default, so that only bright IR sources can be seen. Signed-off-by: Philipp Zabel Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 87b2fc3b0ac2..11744f92097b 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2670,6 +2670,15 @@ static struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = UVC_QUIRK_FORCE_Y8 }, + /* Oculus VR Rift Sensor */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x2833, + .idProduct = 0x0211, + .bInterfaceClass = USB_CLASS_VENDOR_SPEC, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = UVC_QUIRK_FORCE_Y8 }, /* Generic USB Video Class */ { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) }, { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },