Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2820080rwo; Thu, 3 Aug 2023 15:56:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmntObwqUAcvdc3FP4ZDcJICNjFvFFZW8FhHE5TWj85UCmsjfeET2ypPc4wdVpJ7XHOnXW X-Received: by 2002:a05:6512:2253:b0:4f8:7614:48a5 with SMTP id i19-20020a056512225300b004f8761448a5mr16205lfu.66.1691103407296; Thu, 03 Aug 2023 15:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691103407; cv=none; d=google.com; s=arc-20160816; b=pUOhgPSI1EB2+W9KPTyr8kExWeEhIBiv6xGmqlGKTkmgMGWFdVE5hx8EvEBiOw53Us d2IugViqFQL4IpiZtd9ZtM9/zqNgxTbP4zLsTrdPNaddAV0/HiEf/DWVEHxjjTrR7Cnr 0bUzSA89xudhdqLJLwp8QpZoDZAPRioGyGlN/Rwr26VFuntD3yf0Tc/5fxQ/RFPoYllG Ge3Mv3QGe2cZ1Ac+aEdwD+XrnyB8YvE4Wm3Iv5p5VlMuqgdB1tYkhYvgwIU8uWDX52sa 3skBWEJYqAmVlAI0lseNHHtXQVXyx0xnnxAISnMkKqnlNFtayJoalu2KlUjCkZrNfCUQ IoRA== 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; bh=vaDGrioTxwhQPUpeRreIh8JjaSPC11laQ95VqeO9+uo=; fh=mlxJew9CVZ4g+Al794h+irzadBlRfRbBPvTI+Z7h0G4=; b=bIDC4GdJg43PwaEL3qI2qEsI5l2bn66k+lFDPabx0a41/ioR4bwXOSC91d0APNSJKh IT/4kds/woIkYLPgRsBmW3ufjjfCEpjmwUNtu/Xm5fQjfZRXs/fbijFQV5wEaO5rhQxB otfZ7aMGwqNdqY3UlsMCBOjMi5aewxX+0Z3Q1wDCe5z4UkF7CBB+4izsfKnIq35GVqat ggrDTBIl1b2en7kXqGw9MWBZbhmrsWFmPrBINnMrI8PxVF8iLnC6fq9hLghWshCc3l/G /uv0oOUoFjFwdukRH1p2RoaY8sc048q7jj0F/mqgPwAjiVIQujVcDfU52+rsCopQTsyN Sakg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a056402148700b005223a37a46bsi488808edv.588.2023.08.03.15.56.22; Thu, 03 Aug 2023 15:56:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbjHCVo6 (ORCPT + 99 others); Thu, 3 Aug 2023 17:44:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbjHCVo4 (ORCPT ); Thu, 3 Aug 2023 17:44:56 -0400 X-Greylist: delayed 603 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Aug 2023 14:44:56 PDT Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB97D30F8; Thu, 3 Aug 2023 14:44:55 -0700 (PDT) Received: from fedori.lan (51b69adf.dsl.pool.telekom.hu [::ffff:81.182.154.223]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000072E3A.0000000064CC1C4F.0001D18F; Thu, 03 Aug 2023 23:29:50 +0200 From: =?UTF-8?q?Gerg=C5=91=20K=C3=B6teles?= To: Mauro Carvalho Chehab , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Gerg=C5=91=20K=C3=B6teles?= Subject: [RFC PATCH 2/2] media: v4l2: map UVC_CT_ROLL_ABSOLUTE_CONTROL Date: Thu, 3 Aug 2023 23:28:58 +0200 Message-ID: <550bf1a9adf175a166163d696e667165ce7db79f.1691096157.git.soyer@irl.hu> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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 Logitech Streamcam can be mounted in 'portrait mode' as well. It reports the current roll (-90, 0, 90, 180) with UVC_CT_ROLL_ABSOLUTE_CONTROL. Map UVC_CT_ROLL_ABSOLUTE_CONTROL to V4L2_CID_ROLL_ABSOLUTE to make it available to userspace. Signed-off-by: Gergő Köteles --- drivers/media/usb/uvc/uvc_ctrl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index 5e9d3da862dd..2801a1ee04a2 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -748,6 +748,15 @@ static const struct uvc_control_mapping uvc_ctrl_mappings[] = { .v4l2_type = V4L2_CTRL_TYPE_BOOLEAN, .data_type = UVC_CTRL_DATA_TYPE_BOOLEAN, }, + { + .id = V4L2_CID_ROLL_ABSOLUTE, + .entity = UVC_GUID_UVC_CAMERA, + .selector = UVC_CT_ROLL_ABSOLUTE_CONTROL, + .size = 16, + .offset = 0, + .v4l2_type = V4L2_CTRL_TYPE_INTEGER, + .data_type = UVC_CTRL_DATA_TYPE_SIGNED, + }, }; const struct uvc_control_mapping uvc_ctrl_power_line_mapping_limited = { -- 2.41.0