From patchwork Fri Jun 17 10:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 12885491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C27F4C43334 for ; Fri, 17 Jun 2022 10:37:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381839AbiFQKhV (ORCPT ); Fri, 17 Jun 2022 06:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380568AbiFQKhM (ORCPT ); Fri, 17 Jun 2022 06:37:12 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70E596B000 for ; Fri, 17 Jun 2022 03:36:59 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id gl15so7975066ejb.4 for ; Fri, 17 Jun 2022 03:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JhLoBlqgRdL7zGQaDBkJEiUo6xrYYgqrgV6p3n7v4gE=; b=Wwk7RLofEB+IbmYSe2FmMqkR5iRZKO1Oh+HCKuEp/FIYSTFYKycnJdq/iYv5WDw79Q dOCmjt/GDxI5WU3cVlVb3xZ2zvIAfDOX/MI/VNNL1P+6Xlw0PoMr0mC8unwkip1c4grT KQQyL2tnyQg+IAK0xlNXpYVUIUSja8u09c6hE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JhLoBlqgRdL7zGQaDBkJEiUo6xrYYgqrgV6p3n7v4gE=; b=XJWqZFGeq6x8dO9jly/O60SyF+NSB/KiktlagnLBuY+UtJK9Hl1o4C3Bz2+FfAEA2d PW8ZnNOpsYY1uJk44YiA+2wc4txZG5EhnqtlVbEbIVBNChzkWB7A+jmsSDbWpIxRPgeD Mm0QHBtRgjCRgVILxIfVRr5MDcxnzqVSVnygmSey9+wIZSlMudsVj8pA3AqAxNHKRlkf 1HvaEtfpWfT9Ry+UZE3asIt2bjwjgyaFu61VYCJ/OiQoOTE0OIl/Q3p1Kmyt/nubIO71 ysLSondqd3+/BbEPmNN10urwPQKFeEyhCFue3RgHrhucw0h90oGkLhcei3qIKFrw4HI9 hUaw== X-Gm-Message-State: AJIora83BD6GurVVOsYfmvfxW8Ui9aRz2aXxhxyCcDiljfz5CfXKYeuP TDGIkmXocMHkdx7ghgFaFBDKKg== X-Google-Smtp-Source: AGRyM1s8HwNU0Z7zculSCmSGdnF7htKjf3r7eeUdFUUmjP7/4WdkESSeJkd6mQq3hUxLna+JTh5y8Q== X-Received: by 2002:a17:907:7f06:b0:6fe:b81f:f885 with SMTP id qf6-20020a1709077f0600b006feb81ff885mr8695519ejc.621.1655462217885; Fri, 17 Jun 2022 03:36:57 -0700 (PDT) Received: from alco.corp.google.com ([2620:0:1059:10:a86e:90:fb4:466e]) by smtp.gmail.com with ESMTPSA id z19-20020a056402275300b004319b12371asm3704340edd.47.2022.06.17.03.36.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 03:36:57 -0700 (PDT) From: Ricardo Ribalda To: Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, senozhatsky@chromium.org, yunkec@google.com Cc: Ricardo Ribalda Subject: [PATCH v7 7/8] media: uvcvideo: Limit power line control for Quanta cameras Date: Fri, 17 Jun 2022 12:36:44 +0200 Message-Id: <20220617103645.71560-8-ribalda@chromium.org> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog In-Reply-To: <20220617103645.71560-1-ribalda@chromium.org> References: <20220617103645.71560-1-ribalda@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Two more cameras do not implement the power line control correctly. Add a corresponding control mapping override. Bus 001 Device 003: ID 0408:4034 Quanta Computer, Inc. ACER HD User Facing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x4034 bcdDevice 0.01 iManufacturer 1 Quanta iProduct 2 ACER HD User Facing iSerial 3 01.00.00 bNumConfigurations 1 Bus 001 Device 003: ID 0408:4030 Quanta Computer, Inc. HD User Facing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0408 Quanta Computer, Inc. idProduct 0x4030 bcdDevice 0.02 iManufacturer 1 Quanta iProduct 2 HD User Facing iSerial 3 01.00.00 bNumConfigurations 1 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart --- drivers/media/usb/uvc/uvc_driver.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index d21de83021f5..a862a9d6a2fd 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -2708,6 +2708,24 @@ static const struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, + /* Quanta USB2.0 HD UVC Webcam */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x0408, + .idProduct = 0x4030, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 1, + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, + /* Quanta USB2.0 HD UVC Webcam */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x0408, + .idProduct = 0x4034, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 0, + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, /* LogiLink Wireless Webcam */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,