Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp284599iog; Fri, 17 Jun 2022 03:40:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v78Wolqr8CPW5rfVa+ag4LxW3PAs97WYGu/Yts1XF0ejorvhyu5LppIO9l0pnyxdIXV0Qs X-Received: by 2002:a17:902:6b05:b0:168:ee36:1928 with SMTP id o5-20020a1709026b0500b00168ee361928mr9483693plk.114.1655462423792; Fri, 17 Jun 2022 03:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655462423; cv=none; d=google.com; s=arc-20160816; b=x8zc6cUYYhwN80NPC7CTvtcQSC5ueRIYH/2RMvwVKZPX1l57NVHrysK+XbpJbCms7w uUY7VqBYf8hnJ0nRwD9yEyvvwSgOuIvyX52hcDayPhrWHjpVCDyn9QgAEJkk/r9rn9Ff g/DG5yKKf61i9LjxeX20K09j9Vsm/UCQzqMGqzMIbmzoflrEH2KqgqVW9YuGwe/zVXzZ lqjDpl83EqxDTo0gouTUPvxuSFs0d9zu+g/TQnIAje4cin5/NsdyhU9epYtjJzPcJMS0 wQ4kgxV/cQghv+FqMGvJ73S98BcZT48NGSw9waWF8VCVSjfOu6a3ebkC0GniywKM0nWu ToQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JhLoBlqgRdL7zGQaDBkJEiUo6xrYYgqrgV6p3n7v4gE=; b=yxVquNsKW2UsnOzhejvfl1Sw2odXbckrIAQezeeyGDzXPFsLBIbXprO6SIcssmpRxa WZm8MXAOJynj1XGegdnpkHnVKTv1pSGQQCTJqI6vZpXUkOEeeQN47hzg75aSGV2Ze4j4 Wilibwygqu/jHpJBUVBtBPCkM7NOi7Cj8lV2bM8hviDLw+w/bO1n7LTxUiQsgoqlyPDa 43W/tWTXcOvJjs3deGa38lClXpWPgdwQvC7lineg6rnzqE/ANMYtGRRUwEeoqAKtVv+l DGZPglmgrJO7HbWsbszTGH99unfLDrpncz7+gLFYHWpCtsxp0aZ6x80wJO0f08EUbPi5 QQgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Wwk7RLof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w184-20020a627bc1000000b0051c20f51870si5396990pfc.320.2022.06.17.03.40.10; Fri, 17 Jun 2022 03:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Wwk7RLof; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381945AbiFQKh0 (ORCPT + 99 others); Fri, 17 Jun 2022 06:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381763AbiFQKhL (ORCPT ); Fri, 17 Jun 2022 06:37:11 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70DBE6AA7E for ; Fri, 17 Jun 2022 03:36:59 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id o7so7991157eja.1 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=x3ZAUurCm5mloiP51A31niUwdjxi4qhYJC+JcNO/NwRNMTXtXSyGIGDHnuCpEsoAad 0yQGr13AXLN+L2VPhiNKktYHmxpruBFyp8XaMGcgYSyxivXKX2jPMR+DrOoh1G7y41rs /AKlME0MsYmgqegIoICQStrAACCULfvTwxIBuG7VRoiuIr7P8H2WQyhYW19GCpnd7Jje pTT6ssUPQoej7xSEDAcbRn+aGAo4Wi4SKRISKRTC6MejgVqs7re19hbA2tlNMtzXlThl 4DqsbhNIM7CV247JEfufdKU++SdRMc/+lLlOdYsi86kHKMm4+u2VRRzpRlmAV0oj8Nva L1pQ== X-Gm-Message-State: AJIora9G+XyPR25U/6IBxng4BmTaUPZH+kSC7jlQuXQBgFlibZ6Sxw0l NcQWLmQL64rFUHTc71Oo26LjDQ== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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, -- 2.36.1.476.g0c4daa206d-goog