Message ID | 20240108-shine-v2-1-ddff959dab89@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:37c1:b0:101:2151:f287 with SMTP id y1csp1038269dyq; Mon, 8 Jan 2024 06:04:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDTiA8ujyW/l9iOsDNWTaXo+AOqxzvxGLyux0ZjVnjhY6ebdDDlWa8kD/wIpg6Ovp91RfQ X-Received: by 2002:a05:6870:ff05:b0:205:cc19:c2f8 with SMTP id qn5-20020a056870ff0500b00205cc19c2f8mr5073918oab.24.1704722694672; Mon, 08 Jan 2024 06:04:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704722694; cv=none; d=google.com; s=arc-20160816; b=VO6cfi3B3lAbaG7WQJrrcgtMvTZVY2+/SFFE6Wjd+UN9A5R1rEqmfU4rB9KUc4+bIk ZitkAmELjci3322b7MXUx2zD59LhrbE5rJ+JqRKw/k7vh3RYyJNKAyblq2eEDnUkO707 446yf5TS67LJdESYD93DYS6HNsqt9xjk4va0pbQC0Fp5C9z+kQdwlL9ZutVWPAd2X9+Y /tZuvpeuX4QPC74TNVsd76EXbiUEsZtB30EqSxcGMfUYjVyDk21yUwYXXdY1QsgOlVP6 1WzThxpA4ZUSAXBCGh17sh/fc1OUXM5Mk79KtXBFDZr4waJtK0LQbwq/ypWf9sxJrkaU 9Qgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=3jFIqgAme8pj3yZgHK0ETOAopc0DS9Aqbs7DQMRGmnU=; fh=NotOPpxVG9bSHxUg1BtW8FylR+ATflupTT9RPOY3q5M=; b=btD0YxkBvsdmBJ9OhnLYAJOryZYA9RcS+KJTKnJNIsxmaHV2ubJ8ozbM1R28Rc2s+w NVVvxf1Rr9agcczD29s7Ecnsk+sPpvZ+gSs64rkbQz5qfomF/qBufYm0Fcnu7BbT9o1L cpLliB3iwqrAIkg+5b+HmjwHBMVOM6TmkSj+rhSjSv7gZdDjGrwKvvG11XyyTk+uqChq c/GPjcwR5QLURFommht/8DsHkF3Nzfj46HQWx9Pl5u39ig9wAAqDhKVYZ7OiCQPk627P WRajoeRnG5O0wokiGwjDadUX+j9TBVVziv00/t6CJDu7Vjglfq5RYWvLoSwoof2MOGbr t0Ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EpdviaNk; spf=pass (google.com: domain of linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n6-20020a1fd606000000b004b717147b6csi867060vkg.244.2024.01.08.06.04.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 06:04:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EpdviaNk; spf=pass (google.com: domain of linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19670-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6ECB01C22602 for <ouuuleilei@gmail.com>; Mon, 8 Jan 2024 14:04:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32EC946BA7; Mon, 8 Jan 2024 14:04:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="EpdviaNk" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D46746B85 for <linux-kernel@vger.kernel.org>; Mon, 8 Jan 2024 14:04:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-680b12e5d42so16247606d6.3 for <linux-kernel@vger.kernel.org>; Mon, 08 Jan 2024 06:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1704722659; x=1705327459; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=3jFIqgAme8pj3yZgHK0ETOAopc0DS9Aqbs7DQMRGmnU=; b=EpdviaNkEUjeHkHfSTrYS1hB0QW5v4lLwxaYeX/rIViG52slXqNzC2wdMBAEX1BtZ9 RHNj2S6qxpZSgjwBX2RwekF+ek7XihqswW+tFxb87KzpMhDQVoVJ/KsLx0VpF+QyQUR5 mLZVREl9vyGMGcXBq16ydw7mK4796QHFt3ekE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704722659; x=1705327459; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3jFIqgAme8pj3yZgHK0ETOAopc0DS9Aqbs7DQMRGmnU=; b=cA7RdgCf/ydrDHn/8UKShWTjb0HbCFT1MbmznRVa5px65CnVStGEgnfgY3a/M4I4aL IWT5CRCLWJt83bIX7zdGK+nrnk8cH2NR/SeuStcuQUVktjtyTpZsg39lXaFUqFrXZEJj ffEdHQ1EMkA+55xy/XisI2dfgcOGZwVG8OMoMoz51tjeqW1S42auVPYcNrpqyck4+JJF 9NCr6FHz+VfO6MBxfDm4ITQCuV3AAb9C2HABAPPbNlqMglbx3aay2Ge115HAzse7zAzs JoArKQ/qNMruxd/8J/rMZDsyTp9gcZPlWQ/sgUknN2zQocymOM33QSTXnwz/mzoqH9Ag Kkcg== X-Gm-Message-State: AOJu0YwDkpeC17QcDT7G/1iDmify4FpURUrkrGTqrOHfUg2CmwBdIer1 958BCnILQz2VSE4v0tQtVcllQ138nnYx X-Received: by 2002:ad4:5b88:0:b0:681:9cc:b707 with SMTP id 8-20020ad45b88000000b0068109ccb707mr1078038qvp.63.1704722658691; Mon, 08 Jan 2024 06:04:18 -0800 (PST) Received: from denia.c.googlers.com (204.246.236.35.bc.googleusercontent.com. [35.236.246.204]) by smtp.gmail.com with ESMTPSA id bo14-20020a05621414ae00b0067f3a1a7557sm2869708qvb.120.2024.01.08.06.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 06:04:18 -0800 (PST) From: Ricardo Ribalda <ribalda@chromium.org> Date: Mon, 08 Jan 2024 14:04:16 +0000 Subject: [PATCH v2] media: uvcvideo: Fix power line control for Shine-Optics Camera Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240108-shine-v2-1-ddff959dab89@chromium.org> X-B4-Tracking: v=1; b=H4sIAN8AnGUC/13MQQ7CIBCF4as0sxYzg6a1rryH6QIByywKZlCia bi72KXL/+XlWyF7YZ/h3K0gvnDmFFvoXQc2mDh7xa41aNRHJDypHDh6hb3tER0NRhto34f4O78 35zq1DpyfST4bW+i3/guFFKnRDTc8GDIj0sUGSQu/ln2SGaZa6xfM45cmnQAAAA== To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Yunke Cao <yunkec@google.com>, Ricardo Ribalda <ribalda@chromium.org> X-Mailer: b4 0.12.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787531303869022407 X-GMAIL-MSGID: 1787531303869022407 |
Series |
[v2] media: uvcvideo: Fix power line control for Shine-Optics Camera
|
|
Commit Message
Ricardo Ribalda
Jan. 8, 2024, 2:04 p.m. UTC
The device does not implement the power line frequency control
correctly. It is a UVC 1.5 device, but implements the control as a UVC
1.1 device.
Add the corresponding control mapping override.
Bus 003 Device 002: ID 3277:009e Shine-Optics Integrated Camera
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.01
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x3277
idProduct 0x009e
bcdDevice 0.01
iManufacturer 3 Shine-Optics
iProduct 1 Integrated Camera
iSerial 2 0001
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Changes in v2:
- Fix camera name in subject
- Link to v1: https://lore.kernel.org/r/20240108-shine-v1-1-9d7b03a1a901@chromium.org
---
drivers/media/usb/uvc/uvc_driver.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a
change-id: 20240108-shine-06c600d17a2a
Best regards,
Comments
On (24/01/08 14:04), Ricardo Ribalda wrote: > The device does not implement the power line frequency control > correctly. It is a UVC 1.5 device, but implements the control as a UVC > 1.1 device. > > Add the corresponding control mapping override. > > Bus 003 Device 002: ID 3277:009e Shine-Optics Integrated Camera > Device Descriptor: > bLength 18 > bDescriptorType 1 > bcdUSB 2.01 > bDeviceClass 239 Miscellaneous Device > bDeviceSubClass 2 > bDeviceProtocol 1 Interface Association > bMaxPacketSize0 64 > idVendor 0x3277 > idProduct 0x009e > bcdDevice 0.01 > iManufacturer 3 Shine-Optics > iProduct 1 Integrated Camera > iSerial 2 0001 > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org> [..] > --- > base-commit: 0dd3ee31125508cd67f7e7172247f05b7fd1753a > change-id: 20240108-shine-06c600d17a2a > > Best regards, > -- > Ricardo Ribalda <ribalda@chromium.org> A side note: not sure what these lines are for.
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index 08fcd2ffa727..ceca1addd7e0 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -3012,6 +3012,15 @@ static const struct usb_device_id uvc_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 0, .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_limited }, + /* Shine-Optics Integrated Camera */ + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE + | USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = 0x3277, + .idProduct = 0x009e, + .bInterfaceClass = USB_CLASS_VIDEO, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = UVC_PC_PROTOCOL_15, + .driver_info = (kernel_ulong_t)&uvc_ctrl_power_line_uvc11 }, /* Acer EasyCamera */ { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | USB_DEVICE_ID_MATCH_INT_INFO,