From patchwork Mon Nov 7 20:15:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Zabel X-Patchwork-Id: 9415999 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B9A516048F for ; Mon, 7 Nov 2016 20:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A94DB28989 for ; Mon, 7 Nov 2016 20:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ACE328B5B; Mon, 7 Nov 2016 20:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 354C228989 for ; Mon, 7 Nov 2016 20:15:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbcKGUP5 (ORCPT ); Mon, 7 Nov 2016 15:15:57 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35749 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbcKGUP4 (ORCPT ); Mon, 7 Nov 2016 15:15:56 -0500 Received: by mail-wm0-f68.google.com with SMTP id a20so7633606wme.2 for ; Mon, 07 Nov 2016 12:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=bvb8Bq3LaptYtw8/2uOLWEjmjKAkfZu0L3z0SbtdbmE=; b=GEpW3epDCyDyyr855/gZ82LO/+3CBzgHjFsIAs4/AJlY5EbJlaD/RchilkUjcmIwwW xZaOKA9A62fXOnj3qyhHAIqC8XTH+r77IQfGpAMJ5tsOEaRC7pEjlxlGUS6YRYj54t6F fyCk3LkQM77iHwT2M0CMvSUSzseS/yRi/4XM2UaGIt82NNkxs4UobxCfdM5MqPvIGnun EqhetkuVqIWr2/BAA/PQTglwT03rGzooKAMQfWgJiboSctr/8UIpjUagtBlFu2oTnkMF zSntjZx11s5J0ZsINIdmOB9szI+JfERskO+7m3tbG52mu2JlhEJIP1qtSKGUcfExzQ5G /ajQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bvb8Bq3LaptYtw8/2uOLWEjmjKAkfZu0L3z0SbtdbmE=; b=SdbjLYnZYF6b5lCaCcWdSN6pAGvZB+INYT0tw60gJKI0+gtUz0MLFfmrEhEn8QFDbv rEYhceliaH20exn7tkcLjYvXaVd57bslW2oQZsOYILG0m+LbtAIR3uOf1tHhPNJNApIu 4yMI+Y+3/0J6bVaeoaAdDBi6PcDZL+qZvS+qoeEJNoKBIyuU9Y+YMHlsjDTI+ebJWQdX QFG0VwJYOrQmLMKqG4acqrQO5lBz+bJyl+1cXmEOQkA6ZzT4u9Aep4XosGfFI1XytaVE USKmqvh8lpKrt8/hDp8KEEeRSIYvjTGhRkcUM1umCjfi6WM/AVn1kQpMdDtSVw/nJt7n au5A== X-Gm-Message-State: ABUngvcqnVqKuveVbpiAAlwEj/BFTMJX9xKBrlG/azHw85i0GnT5C0wuSv/tyvmo2IG1/Q== X-Received: by 10.28.18.194 with SMTP id 185mr7439499wms.124.1478549755443; Mon, 07 Nov 2016 12:15:55 -0800 (PST) Received: from ped.lan (ip1f12fb3d.dynamic.kabel-deutschland.de. [31.18.251.61]) by smtp.googlemail.com with ESMTPSA id y2sm32931217wjx.20.2016.11.07.12.15.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 12:15:54 -0800 (PST) From: Philipp Zabel To: Laurent Pinchart Cc: Thibaut Girka , linux-media@vger.kernel.org, Philipp Zabel Subject: [PATCH] [media] uvcvideo: add support for Oculus Rift Sensor Date: Mon, 7 Nov 2016 21:15:47 +0100 Message-Id: <20161107201547.7537-1-philipp.zabel@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Laurent Pinchart --- 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,