linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor
@ 2016-11-07 20:15 Philipp Zabel
  2016-11-11  2:06 ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2016-11-07 20:15 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Thibaut Girka, linux-media, Philipp Zabel

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 <philipp.zabel@gmail.com>
---
 drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 0eaa9a9..b64bfe4 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2583,6 +2583,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 },
 	/* Leap Motion Controller LM-010 */
 	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
 				| USB_DEVICE_ID_MATCH_INT_INFO,
-- 
2.10.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor
  2016-11-07 20:15 [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor Philipp Zabel
@ 2016-11-11  2:06 ` Laurent Pinchart
  2016-11-11 22:07   ` Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2016-11-11  2:06 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: Thibaut Girka, linux-media

Hi Philipp,

Thank you for the patch.

On Monday 07 Nov 2016 21:15:47 Philipp Zabel wrote:
> 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 <philipp.zabel@gmail.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree, after fixing the conflict (see below).

> ---
>  drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_driver.c
> b/drivers/media/usb/uvc/uvc_driver.c index 0eaa9a9..b64bfe4 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2583,6 +2583,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 },
>  	/* Leap Motion Controller LM-010 */

That's not in mainline, where does it come from ?

>  	{ .match_flags		= USB_DEVICE_ID_MATCH_DEVICE
> 
>  				| USB_DEVICE_ID_MATCH_INT_INFO,

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor
  2016-11-11  2:06 ` Laurent Pinchart
@ 2016-11-11 22:07   ` Philipp Zabel
  0 siblings, 0 replies; 3+ messages in thread
From: Philipp Zabel @ 2016-11-11 22:07 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Thibaut Girka, Linux Media Mailing List

Hi Laurent,

On Fri, Nov 11, 2016 at 3:06 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Philipp,
>
> Thank you for the patch.
[...]
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> and applied to my tree, after fixing the conflict (see below).

Thank you, sorry for the inconvenience.
I got excited to share this patch with Thibaut and forgot to properly rebase it.

>>       /* Leap Motion Controller LM-010 */
>
> That's not in mainline, where does it come from ?

That is also from my local branch of quirky USB cameras.

regards
Philipp

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-11 22:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 20:15 [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor Philipp Zabel
2016-11-11  2:06 ` Laurent Pinchart
2016-11-11 22:07   ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).