From patchwork Tue Apr 25 09:45:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677053 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 A509AC77B71 for ; Tue, 25 Apr 2023 09:45:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233655AbjDYJpa (ORCPT ); Tue, 25 Apr 2023 05:45:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233613AbjDYJp2 (ORCPT ); Tue, 25 Apr 2023 05:45:28 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D9C45BBA; Tue, 25 Apr 2023 02:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NepYPkVHhO9ZUgY84UmijyRV7fGRkSPycmcSV2JDsy9I12uxI1deiewqrjTJJrwJex3i4wLRf9m9qUOJOvOW1lgCyp8F56dhVDjVF5MJ/AZlbTHrmSvXhRie9Mr7fsuoGkDTUTyju9bqkyxL8MU85ywFNGtpEaLf9aOrm1PAJ4UqoTUHCy7KTuMxD0TboSJrhb+9/u28OImW9SFoUm7VSbhurs2GY5Vq4LqDq3wnAUm/XwsrZmKixJWe2FTeYNPiNitZjFa5wJMdoO/FHYXHGp76lM3DQk1pvnWmEd68GE3wdN5Q+DoWaOnp2TcfXm0A+z/RDLj5t7MFNToJT4EoPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=E/np1ssZ/vRL41pK51a5xuP3Pd/7WNHyAEgiJNx8ZtI=; b=GGb+NHgV9zhzuR/E+giLc+FdhwzD7HavzdubrZlqxogrUmFnsDI2FHSXggpa39uQbD92h04RhVetlAB8t8PBehjw72+9SXJlPuG63/rmrs+BOSJZn+YIbC7jQkd1TjBMMeOPtOXxCPbz0HK/6/EPAc3TPhi3NKbt3tuDq1LjbKyUjELTVYg3GEcDXBNJV21IbEYXfqL/tNATRBjz+BG4YSqD2GbMVwvG7E1N1ospHrDCj/cOmCXXFSicNIjTb10XPWLNTeeHnAP04IFYlUMY7Il6UMt6RGHrAzniGM7n4PtdOCMG8rIqUSnyoeutpLBTbAxyLBGDFqAHgaBGqbNgFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E/np1ssZ/vRL41pK51a5xuP3Pd/7WNHyAEgiJNx8ZtI=; b=F5Ov3f4Bm0iEJAcGuRgzMQXUaSW5vRycLzeaI3FdFqcEZmt5jx0dQ5bb10rF969CjodpfOHmWZ6paAW8w/cDMYT0dbAmZ3r57dO4ZmGydcAwLuCApAn29UikNSd+X2kdzVCs9yZahTTlfrximSFJnGOkps88HCY+ftgzdmJJts8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:24 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:24 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:11 +0200 Subject: [PATCH RFC v2 1/6] media: v4l2-ctrls: fix documentation of V4L2_CID_FOCUS_ABSOLUTE unit Message-Id: <20230406-feature-controls-lens-v2-1-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=1253; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=DUug3cmze1JbFFjqafjKeI2QEmsiWz/5lD5k/gkcZ58=; b=40z38y3YqQBmvZU3HiBECHWzurcl45POnP1/YBhONJ1NWvd1gw6ma7sgzem1tfv6Mi9XXAMa3 nFNM9CdEmF/Cf0aH9vwC3N4JgmhMLL4fX7bcklRpWRtPcuBVcbGarUm X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b4356f3-14d9-4cd8-b376-08db4571caad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AsHcqLnyJEAAFi+ENSoGCZxrqnKYvmvFjTOiJtRPoHzwWA2Mojxj3jgLu/zlpbYXrcxjU5XHncOQ+fZCRdEFkPmMiTMcVvfLuULeFkVaLNQItNhUDswHwfpREhJU6Flo2hgqovLjYzrDng6rIIrFt1H8WBmuuAOWnIA7WzWBLo6jjCpnalcXaRHSDRq7/XhPEhEOlzfpYt093qJg6vw16pESJq/kFpMyGZfwa8v0qVRxdhUL8BIOsNHZbQJvqXy/YO25ZJk7hzqpEVNO0yw0aFq+ODpBqrd4pBpNc/HIbSWLF+GJgSxbLQ3BDq2M5jh4PRjnMwkyyqku54/wB6dkbDBfB5uy2FAPgqALv8rFyzlqXHDldpsWgooluJ6u3qmMysr7ZuR8TyChQaKT7HhyT3AmfPlgoUsSpSwnRBkkDnC78j4828+mb6jn/tJv/9NqYOwntp3rLUXhL2pFV6G37BWgJ4aH/4GyGYatBFmYmBSZewYuXdW+mb3EiGB42zGL7kiW7jKI92ViKZKAOQA0UGsfeFdRZk7eXiyo2sCcTxdBTyEc0UFpQAS530ottx4BdRHD4WX/Mp4guZdQwUwyvzSlg/+zznnooueQFu+NorBr7J2Vhrc5QtDuGt/pzJs5 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?8kXq4cE8imbXLOArXieAvTN7qCrK?= =?utf-8?q?DdbgOt6NfF64xwWAMsoIaczbY+7I776YFP5fTuVS7LuUZ4pcOK/XJYqP0vSFrcxjA?= =?utf-8?q?1dIfTW3NxYEw0NMWl7f6Do7kaYUuky/z2MImCIOTdyvlQCCin04qu/zub8x2VOwbN?= =?utf-8?q?lFZplf1yjIT3Pkj/bZXGeEXwwxGnsiVXeGG6SGGZFcKNbpJV3g8BCV9rOxc3NRLp/?= =?utf-8?q?b5OCGKPORgq5wDYsonyI8v9lLQIrOnpsV8gOP41OQTv5WweS/9otJl+kENLMpDWT3?= =?utf-8?q?src2RavtRRZLi7JCHx8jwIdufmAqUzx8du/RH0+d2v2VGsrT/XPJiEP4WTXvPeL0o?= =?utf-8?q?SEBv//82rUTrLov8uq7vV0/C8tlA8MDVm6cv9BvySMNnjtQWrw3zOFXtkUB+CaQez?= =?utf-8?q?bG9LltYCJiuABah/50go67GYQ5QyTTDa2ikKoWRTQ9i6dJhzCdwoz1bYiCMVZ61mY?= =?utf-8?q?GZTgLUE7y/6gynsE5gpdSpMoCkiNxGuXQ0BxF3FvsnOpvO84/vrwUJemhES9Fbmm+?= =?utf-8?q?siwsj1BVILymmQt3Z1Z0bgw44u/NtRU6xZRvMYB8QjgyX8/2HpcwBQqthZnP0P2ok?= =?utf-8?q?FsE6yGcePzXO/0hPALYgKiRg85o2aC6NHWn6FdDHl9RtM5NRM5T1MJFtlbNBXaXX7?= =?utf-8?q?zsIgorUy/pB6R0adFkVwgNQHh/n1Aiy/FAj89kDD8PZ6e8P5wF6ckDg1qO5dJsHG+?= =?utf-8?q?Tin5NVtvAjsxnLYOKZQQt1BFJnGQFM0wVW3OVWXE9VFC6GjoL3PSHzKYf7kZhYH1Q?= =?utf-8?q?h1F6dHE3+0DTNscIydnvGrS8Ggc87lAgh08VYXt7ChgLZMUYkPhZbCYxeJINTS8lj?= =?utf-8?q?zzWXghkQDkai78+iBLPFJxwBFcjBcYPNbtWun1ZNb3wcF3gR5zH+BiAKDpJdZ/CbL?= =?utf-8?q?SGqlD1II1q/UnQvfBPnFpGAycMmzH4ixWWeOf4ucikQVvosgYbYioNHLwjjvnDqmy?= =?utf-8?q?fX5yGgMCA8ZHqtKNVvkYVsolFhTBwNYlns0lXIYGNLbXuj3TPVSpYK0hMcwcOKfsf?= =?utf-8?q?XO+2B5qzT2Wp8EFrMXe/W8Xg8haotL0EagAzbqdAe4Q8pg2RQUQK8qFX6YzK11z0p?= =?utf-8?q?4Ae/kpLyW9PrIp9axqwWUSRROWjzcf4QDS08Xl/S8BEfZ0XA/G0NQzEIrH35D94BU?= =?utf-8?q?kGp+o/TfezMEDJ3pe/kq+H4imXLpr7zudf/you6bNGHn1aIjijjcZFjRuVVXK5qMg?= =?utf-8?q?uKpZMG4DHSBH3bbaIjWxPlwZFM417n9ffhBHjztpPmEReGrpLLimErnKyUaueNzB7?= =?utf-8?q?l01LrSMqqcuRMH+Zyjf6E2N1dqVFExHXo9paSKNqJXjF4mgydUTLoYf+2uM6ZKRLR?= =?utf-8?q?n9H1vJBdRbYERqy7JsUNkQuSp3DwbV4tP2FAU+IQS6un/LmLWZBE5lSKqyLpm6gTC?= =?utf-8?q?xqNXGA/UnWnMP9heZcD0JETMEkc9s/EP4sWGBXLnriMBxkW2CZ20VTpChbiQ65Cpa?= =?utf-8?q?m76bNUE7mqqN5VKgcbKkaPoDkji2oCJXT5DPK2nN85M1rFU8K0ea1FtupNfDDNLIB?= =?utf-8?q?tpDxZwKYJxHJTbjGr4qavBiO7mIIz6m3pA=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 3b4356f3-14d9-4cd8-b376-08db4571caad X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:23.9518 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jmseUhbvjM/qRoDvC7JYfFdSD75bfxI3qXkYxrfUqd3GsQs0OYvdQBDkzDLZAW2GXPk8D+K666yjzEdaMYGOtIPzHITSeHwo/8Y+kY+zaCM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The current unit description of the V4L2_CID_FOCUS_ABSOLUTE does not make sense and was probably copy-pasted from V4L2_CID_FOCUS_RELATIVE. Fix the unit description in the documentation. Signed-off-by: Michael Riesch --- Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index daa4f40869f8..df29150dce7b 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -140,8 +140,8 @@ enum v4l2_exposure_metering - ``V4L2_CID_FOCUS_ABSOLUTE (integer)`` This control sets the focal point of the camera to the specified - position. The unit is undefined. Positive values set the focus - closer to the camera, negative values towards infinity. + position. The unit is undefined. Larger values move the focus closer to + the camera, smaller values move the focus to infinity. ``V4L2_CID_FOCUS_RELATIVE (integer)`` This control moves the focal point of the camera by the specified From patchwork Tue Apr 25 09:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677458 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 A786BC6FD18 for ; Tue, 25 Apr 2023 09:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233595AbjDYJpd (ORCPT ); Tue, 25 Apr 2023 05:45:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233645AbjDYJp3 (ORCPT ); Tue, 25 Apr 2023 05:45:29 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A489349E1; Tue, 25 Apr 2023 02:45:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Px6aa72kGdAp7UhacPENjxbt8MTL1DnfYGMHC7m2hejWf67/U9WAKw4fzTfDThmGB5wpzIsK+1DKSlWr8LuyKK5jx/OPPXTv1la3PjsffbZVTQnbmj3aBaRWzRrzNYTMVOGnYJCVAZTexozLZSoFa1ixCZArYJnEqINvn7v1d3P3loFOGIrSRfbcpHOZhMWThgFMGHDCuJGUHLaZ53Nb8PENRjNMK2d2YT94j6WfUht4Iv+6a+8X7rmdjauozZ1x1iluP8W+anIMNpjM98ERRzPi6KG68knUu3bEbrq3fLAbpYlgiqX703NieXb2GxMKEI1ti28tghSEuasDbDQwgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XxXCNgexyIvBtPa5jGHwEJC7cJJJcsFJu/5pNRqjkZA=; b=Oeq4P9gkcM1aQyJqlNQ12FVlPuFSsYAveW7fI7pjR3a5hSitezeZfQW5SbSgESvtS2Bj8L8Lm7EzsQkvIVgBP5g9m0iq8E6x7+2oJIqqCKSAMhJst34gfOXUgbh8ngB+Wn0iJkDvSi46vTIYYQv3AcRTQvQ07mEUeClJcBQFbPSOj0DDDafGH7Xi8hDo3Pscopnx4KXvq7SIag3gtnSFQtqCBwoxEisrsypFNhJF5OQ9oxTfxHVvG6SmatKTkNwqnjpdT1T2pwfrUd0+W/TkPTLr0PgNriFMVkkKV12zfsz93Nk5lO+4HWMHpOGokAklR9200OASHgx4EJcqP7kUXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XxXCNgexyIvBtPa5jGHwEJC7cJJJcsFJu/5pNRqjkZA=; b=2KIhX28FNfHyIL/cMlg1QHhQ837QNIvxMrAQgJlSrihUjHPFdFOppTuiw07CJDeAoK3LCqd6TvQS2JGDqfXBwRl7/nTskLrHRyX/NF90E5EQtd4Xi1x6R4dyNConoofTWr679kVgrNuCj/6Z6nNWRwDiQ7cxRMndtBIgpD6JRuo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:24 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:24 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:12 +0200 Subject: [PATCH RFC v2 2/6] media: v4l2-ctrls: clarify documentation of V4L2_CID_FOCUS_RELATIVE Message-Id: <20230406-feature-controls-lens-v2-2-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=1208; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=Z5D1yuiiYZHSN2KVN2mlLolGJK2gmtMfF0hmHJGrfto=; b=LXHawEo9oQqtbQzGztJgNDH3WWhhFRCI1ryQdpx7BYRlB4Ex+hx6H4F4zByuXAuutYY+Jz20t SHOy2Mxq74kA/GN+0gKGai1ajvg4u8fTcsmKY5gNUSrPVKwT9eICMHn X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: 52afc636-975a-4fe1-09f8-08db4571cb2c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8EP7+qKIwGaLmqg7mcJGMBj4naK+R9JsR0NxMDfvrfauRXGfKBZ7kcBUwOFMqOxuzct7hlfU3i/xHzMO7cq7OTmE1iRcRjU6bAwhcu7uF9IfSveYoWJHD4xu1+gj+E34FGyZgCJ2dx2XLTsap01jEfaW0JetB2iWXcLoTjBzp4WYTjf5kKN8c5EZn3lpP+ea5kd7ljdMjRw/kdZdY0kUOlS1oRa0cjRTXc6l+wTHKVpAt5KdruLoUlx7ro29KbEnjJin0v+yEbzw/iaHVv9Yh9ASVztluKBSghDeYjiN38GdIrWIdDhJzNX0TbWDtUfqbGJXu5B+SP9tqza00wbsk/NAONiKc4B3DcEgHWYc3xQXNcCNxdkz5Xq5D1TwmBjOgHGUkbkiaSDFMlOqGS9JRVT/DovUlN8DhomyYADAtYg7aOUPpJYgbUR2xzf5AArTvrjaYvmA1Qu+zzN3kpPZq2e74XOCU4T/O68rnsxSjo1Q8np9gpQmADBhrXFGlkCBqScwCUxYDPzY0HVgbFJzqfi0UmuEYLzRKxjqqI8VSSfEUnTyMw6iRQZ9KeHlzyUrkj/4K576kaER+Y9taMNwFPj/krso+En8LqIkZfoZJZrjv5t5+tEqRHxHPlaja0yY X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+c2jJBEBNYbRWLYOPnVZ0WE2O931?= =?utf-8?q?/TfO0U/CtovTWPYYOVztses2onjDC9Yxawp7WNNdzY4dUK162bCif1a4OpHu5v770?= =?utf-8?q?QtGom8CPZ7zG/rDZuGjHG02gYjl8Jav1JuCrLUQdK+Qxg+qN0228V/1HtjrkQufox?= =?utf-8?q?AXfmQmWGVykLiCpuORMDjcEQwo9FYHrwrkVKxijmkg2KDA+mZqdYRnP+ZkRQw89Ka?= =?utf-8?q?rSnD5ayOYe1YgxyNB5+bTCn8D+cHW/HQnoyef0IAk48OcaOJuygWcBcQ5q4OengsG?= =?utf-8?q?bldgMKh3D7/7s9Ynuh5o+Xr9hB107+5Su1c+dQ5puVQvwPFAOHzITeCm2jkxIZocY?= =?utf-8?q?TXjVrl4rtPkzfSW6nPHm7zneA4uz56k9A2JXCP9QthStGlDDRdWgx8eseN6jzQQkK?= =?utf-8?q?M/LL5lAjO7/t/eyKYAKFZdGK4eR5i41IiXfAoULdvbj9B5uC7SM9Ga8ePnsEc5SlU?= =?utf-8?q?Rpxv9iHZ9BptEHpr9GXqwJichWHty6v8F78rUkV5O0ME59XhnT0PprizuOveOSTrq?= =?utf-8?q?gauaBoGVkCE5rNmMesec8vHqg3BhXtNoRreOjNfyyGQ5ovJhnexewFOb41v8SSHjj?= =?utf-8?q?2UZNPgTnS8jYnYoB0fuHcZJxGgdbJva4/BPuKG1i/IwiLeUIjim0hl7w8nKkpZ4Sn?= =?utf-8?q?OnjV4vgjKjHxyPZufwOr5PeDpMI7tNqKVELoLejk0qKr86kGb687RPME6MYTKtQAx?= =?utf-8?q?WTi3S+YqWb0jcM1ErvQziJ0iWS8IBNnoEXzCEIgpgWheUKBOyWc5mfrloDpYFfn6/?= =?utf-8?q?bTEssm5CI3WwhYPLrS3+CQhlz15SiL0+fRhINIvl12gF9csBftRbC5yseE+ZmcnCJ?= =?utf-8?q?Lc3bphU1zRmuEGBHl7i80Wbh9JY/sZD21Y3kUkymrvVY6YhZ7/iYjugmQzWr/5B3d?= =?utf-8?q?JSnQW05YzgmMyeFOSVENjohGR7ZIfF+BK7bXR2i0oP2hoAOHN4MNvTP/saCYXDgg/?= =?utf-8?q?OUlbbqb4kbb/qmzqUFc4BPn99B0Fv+XSS8JKRNFSW/bNxWVB7oS2moS9r8cbyc+Z0?= =?utf-8?q?vrxM/YQFJXscHFsC/uEb2qnVSLSF7o71nv2+CSdP5Va+s+liF157ViTUOr7DIOl2G?= =?utf-8?q?CZgXuQKohwY2dD4hHUFhNUZJAQG6ODzSJVzac+IYXG57GXMfktIDi+bT3jBuO2V6P?= =?utf-8?q?iRZTmSJ7HgxhZCoZZpuwAsQNnhESC1027XnZYflFUbB1LYDTY76tfORHelWB/YOV7?= =?utf-8?q?UhqRzwp2fX9cHHlPh1X8FyPN1rbxmR10j4Nb9sFVRXFGD3+pZEOunBdKnuJulHmlp?= =?utf-8?q?lEqQYG70Z/clqIkVpRrAX71XQYumvV8oitqgsv+ozI3rVIxDhxkfSN/qF0KQB80k0?= =?utf-8?q?CzpgiJc6ar0GeZki0dXeKLupsxnSvDrtBCN6/Sa+MnsLgWzdZFYYtRJNDo3sMpiLN?= =?utf-8?q?IltGnipVvbKAPpwetiHsXwwwUqfwGD/nMm/3ws/vhChTORpYEVrfROW+wn9iSDuM0?= =?utf-8?q?XakIYcq83skH6DDs+IK1UnBvcAkr3PX8Bdxej/L7YnLCtw37i0zY04pOCkGXnynUS?= =?utf-8?q?DkVRVPY9zcCcjCVdPIR1NlUFzRz7vhoZ+Q=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 52afc636-975a-4fe1-09f8-08db4571cb2c X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:24.6776 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 867sJcN4MPM4n9lfWSdRdGjcNWjYwgSZDN2ejMkliwmeqecv4QLnUULHMxI1QfS11pdZOXJF47xooZ0OfgQshNFXL9ZWKFxLwBcvJle/KTk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The control V4L2_CID_FOCUS_RELATIVE only makes sense if the device cannot handle absolute focal point positioning with V4L2_CID_FOCUS_ABSOLUTE. Clarify this in the documentation. Signed-off-by: Michael Riesch --- Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index df29150dce7b..42cf4c3cda0c 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -147,7 +147,9 @@ enum v4l2_exposure_metering - This control moves the focal point of the camera by the specified amount. The unit is undefined. Positive values move the focus closer to the camera, negative values towards infinity. This is a - write-only control. + write-only control. It should be implemented only if the device cannot + handle absolute values. + ``V4L2_CID_FOCUS_AUTO (boolean)`` Enables continuous automatic focus adjustments. The effect of manual From patchwork Tue Apr 25 09:45:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677457 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 DB31BC77B61 for ; Tue, 25 Apr 2023 09:45:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233613AbjDYJpj (ORCPT ); Tue, 25 Apr 2023 05:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233704AbjDYJpc (ORCPT ); Tue, 25 Apr 2023 05:45:32 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045EE5FE0; Tue, 25 Apr 2023 02:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TYnO6QQivTGNifrhYRHyBF3V1GuF95LDT1kZi2TNJMwpyhiPrl8UqBFlZL9xkKu6GPYZzHtRKxtVzYSQjUWmai7a+/GpMWQO2bjs12DivOguNJJ9z9EoXwhcKVKaA0aMTM9zh/QOfUDUGbv9ea/nihnBLitpdllSCv3DFLVPrx5A2/lbN9OI0HYrUb6/+gZ49upkIR1PDPo2GHwBWLDcUvvsoQOAEMHHopWXGmq/mbWZxfnWfxaQNP3PlnKRZsNtpyt9ch66YNDQ5+euHbEROmxCdgNf4CEr85gdOIM8x94qfVVhfPRmZrTBl2kaVKElG6RxZvmO4e8N4OghEblGpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eLuld8DVZQUl9JD96D4KgwpO+GrK8L1VnMH9Vmashgs=; b=O0WtZoFrTFLpLnaf/uRLqA7jclSQ78Efw2Bqt2QnYjnns46YNkFJON0eTbnLfpCLJBxGuVrUpoGPZbVLGJ7/6t/lt82pzMNr42R3pt58Qpynw/i3ojePgDnzybGcdAmhztRA5aKaT3jwyyVbFHJRCRbrDJ9E+PWqvrWjpdFHI0vSBMumhwKNcwAahplBKWhrEA/4y4C313ZUj6d0E28dAeIcI1R2WlyV3YcZlqgl0QaVF83S8BlLdxOVvfiTuofNW7TAjCX62VE9uwLdcCqSv76gIh6HPpln5HANfCxCoi8IBQ8qbyAs1iTOlr7fNutDg6TfhEJKtRgBH6MPqU8QMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eLuld8DVZQUl9JD96D4KgwpO+GrK8L1VnMH9Vmashgs=; b=lmrNszoFMKjBRS+Ae5fm1mtwYRAcI9a3p0f8BespJ7GkiCMrHzs7GSKpTjEBDaXEagOa4Q1XI+OcD2gBPoLFxCHhBoL0d2M0f6Ys1x6u3ZOAQfwplasDgf7xN8tuLj78SjZKLhhf8gnkPasBllHRoX4q8EocAojNdF8d+ryVB5Q= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:25 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:25 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:13 +0200 Subject: [PATCH RFC v2 3/6] media: v4l2-ctrls: add lens group status controls for zoom and focus Message-Id: <20230406-feature-controls-lens-v2-3-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=5400; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=jTe/P0FictDH0WXUKp4+aPsn/OR0dr8kofVL2EiodPU=; b=q+A4kfSu5mcb74thT71W0+NUs8JKLAvBQnN4oe+mwNlYiI9s0a5IS8ab/NrMWzdGOWMGIOtQm jYP3VNmdccTB+y15tld68yx3ooPyKxoPA6VxIYpNm+B3DQ1gJJN6TaW X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: c9bbbe5b-b84d-4d9e-12df-08db4571cb9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uCeHmzylZzfasjO4Jxrz/E1vxsIZsEQJdCArZxUNgdZ1pJUPT2qKcn2d5B0pa0ZjwCulumhU/7lIIOkT7OylzKvxDyhdIXjRlTDydTHQpO46WrtXyIttEtgbXIgyGk0zBU+VbxRPxgaIPgvTLYcaoIIuYOrHJcvHfuvydZLR5q8+bOSmpT/I8hvv4x9A1lOoxTzF2JIRpYYPDWSoDH/fdm+7fn4+QIC2EgbqLpeABfKGtAr8CVToHO9udlu+pdH7PRYMYOeWsM6O0wNXlS1Au48/1nSCfYULB/dz5qXji/j82ugHujPqFVOrGzvl+PEOo1NzVQj46Pkf8xDzJdaZgxST9ugh3p5zg+XYdDa0utL93bUoRY/ObPq22ko7kK8GrE156Y0OxUgcj0xxcM9+5CLIrNdwTrBHdVYHteu3hbeT/Xft2i/OuXcQaYkCpwTAi8+kdkwYMGXhXyCJu02T/NkTjLeY2fd5r+7bPI98ykqcS3/DxpmDjmy/lb7dPW5uXRT54R7quEvZ5jwqC1XU5MxCWkZBXXOACK20MFS2Cl+5VpUy/70bCOS5G8VKVx/mAA5eUAz4SKHLpMHPjPhDfS7cGogpJ9dJ6pIz2wlmvQKeGqZTRdPtLIVTxvkeVTRD X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?t5a23Tbe589dDKR6RSgmcK913Y/t?= =?utf-8?q?n4BOqX7/Z8DZYoq1voYl1sewwTr+yTHvo4V2ODGsrMHIyjguvk42/dqDXx0CBBviq?= =?utf-8?q?WOPoEgNUx5SlrgSjVgSb1njk41G0iPJgEKONJ4Z+vIve9L2/ObhYySsoAyCeOZmsz?= =?utf-8?q?GKbkZd5vkgxmRaTkV/Ii1SUN/Y+QwUvJQ79vf4hn+26UPgAsyAV3jjeFMlIkWEJvH?= =?utf-8?q?x543jIWwk60GLitYJsuonhDLLH9aGor3Zv9jNHhpD22KoS42vVEzLGKcB4fUYSSHm?= =?utf-8?q?+RjQRLAfVsz84UESG/3M/D8eCzmsN42IGuEzx04V5QUjwWf8i0wmfthpbmtFaslFk?= =?utf-8?q?mFEcDC8GttWUlG6MJGfspe/gH1MQ2AIZ5nKvLl6WApJV14zg56GQnLAnrv/dg8FFI?= =?utf-8?q?8soQdZW79h8X2nBSzsTS4S/oh+vV72H0Kb7TOwsuXEHrsi9myxVboSOitFC/tPaxs?= =?utf-8?q?3IzXbfCCglQVTv9XwXu0r5C1CNtKocRieXVQQHK0ThRw9FgZtktxCUkGrbEVKQldv?= =?utf-8?q?tnFzXt+NXODHih4u2DO+rmqVQZLbwrVEU2KRl/YEqqdCJiRa1bb/shACVX38QnqjB?= =?utf-8?q?srWXlLfrHwHpmel2OOmizx7yu2y+L54+kiY5lZa90+oVtjwEv6IRJDSRlSr5PQJbk?= =?utf-8?q?hFbAQGKAWXc6e73Qv340/S0IgR9O7mtmS7AUv9Gk+k9xJQtHCUiidCZVLC1KI8KSF?= =?utf-8?q?uxgvSOmX5x+v4vMfa3k+m9ebl9hX+1Xmz3bp0+MKxPwStrEzdwqhmztLkkqdh+MzS?= =?utf-8?q?mKM+GK1kr8pTer7GkU5bYE3SH/ZuAvSqx7gNphpzJRZRXMV28v+rvN5QIVV5xKrlA?= =?utf-8?q?7ec8bd1VizAJJ4RLNAGTCa3QPvJN9iUKpXUJHJcn8E+AeDO0UnL7yKMcQmTnJKTi1?= =?utf-8?q?uGYHbDixwbL4GnAIJg3rzk6/w4H5M8cc1AZfQgNy76eq94uOGiBC8pzbr26xWSFtz?= =?utf-8?q?+9aYgd4xj9L1fu1fJ/QZMirP6vlO5fm9Sqx3V1A4mvnC1W1jaEM4xrWsNNjsOTJya?= =?utf-8?q?WjbLJ9K2c+PxVK7ivUCfHaCrry9IQZmVpV2TrwcYfRJ9AQmk2qXSvcRBclogSvBZW?= =?utf-8?q?tj/Jp43UaHnDWD5pl7blYsx1RihiXgxX9DAOrzonT7AzHAYDEYRStUp12FAdZC+6Z?= =?utf-8?q?ZW2F3SoukjLr8t93SxChSTVuEXV0XgrMz5dNnGZ6Lt1PyDpfK56astlTqWqB1SFcz?= =?utf-8?q?lnFGwbvvtr3tnoJyuONX29NA3PiykPXtR0e4f9xSOOaRY1nTqaQ1RZ1b+ihvAPEyI?= =?utf-8?q?jfSztXHgO0Ycb5JRqloS8/rs7UbMpUHQCmU91KQynYSbo9GFhxcyplg8G9D0wkQ02?= =?utf-8?q?OcRX909vMHrrZavQPRDifOoW4l26InbMncyI6o3tSEL1dhP8PGVxcf6XEIVLsmeIe?= =?utf-8?q?3pIO7bFbFi8lDSDBnNh9P0P2bLf8r/4KORZrzUJczhDoguUId3uZkTrmLHluYg48Y?= =?utf-8?q?EHH1uTe02Og9fU4wj0Dc0fph7rwQkjQ+eu6UPgpQOZojoKs3b8+US39B4O3qXQ2dc?= =?utf-8?q?CRPQRjTglyNbfXQTWhWf5wfx7Gy+8ULJcg=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: c9bbbe5b-b84d-4d9e-12df-08db4571cb9c X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:25.4366 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iBtpHv1xbmlZF57ajBLFX6fQh5kB4SJyuslA6EDvQY0EoCKob87W/Cq83ZqLjBoGFgcsop658jp/A2wJj8qgmXcsxaZHeU+j8+M1kBZd4Mk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the controls V4L2_CID_{FOCUS,ZOOM}_{CURRENT,STATUS} that report the current position and status, respectively, of the zoom lens group and the focus lens group. Signed-off-by: Michael Riesch --- .../userspace-api/media/v4l/ext-ctrls-camera.rst | 46 ++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 10 +++++ include/uapi/linux/v4l2-controls.h | 9 +++++ 3 files changed, 65 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index 42cf4c3cda0c..3ea4175f9619 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -150,6 +150,29 @@ enum v4l2_exposure_metering - write-only control. It should be implemented only if the device cannot handle absolute values. +``V4L2_CID_FOCUS_CURRENT (integer)`` + The current position of the focal point. The unit is undefined. Larger + values indicate that the focus is closer to the camera, smaller values + indicate that the focus is closer to infinity. This is a read-only control. + +``V4L2_CID_FOCUS_STATUS (bitmask)`` + The status of the focus lens group. The possible flags are described in + the table below. This is a read-only control. + +.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LENS_STATUS_IDLE`` + - Focus lens group is at rest. + * - ``V4L2_LENS_STATUS_BUSY`` + - Focus lens group is moving. + * - ``V4L2_LENS_STATUS_FAILED`` + - Focus lens group has failed to reach its target position. The driver + will not transition from this state until another action is performed + by an application. ``V4L2_CID_FOCUS_AUTO (boolean)`` Enables continuous automatic focus adjustments. The effect of manual @@ -241,6 +264,29 @@ enum v4l2_auto_focus_range - movement. A negative value moves the zoom lens group towards the wide-angle direction. The zoom speed unit is driver-specific. +``V4L2_CID_ZOOM_CURRENT (integer)`` + The current objective lens focal length. The unit is undefined and + its value should be a positive integer. This is a read-only control. + +``V4L2_CID_ZOOM_STATUS (bitmask)`` + The status of the zoom lens group. The possible flags are described in + the table below. This is a read-only control. + +.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LENS_STATUS_IDLE`` + - Zoom lens group is at rest. + * - ``V4L2_LENS_STATUS_BUSY`` + - Zoom lens group is moving. + * - ``V4L2_LENS_STATUS_FAILED`` + - Zoom lens group has failed to reach its target position. The driver will + not transition from this state until another action is performed by an + application. + ``V4L2_CID_IRIS_ABSOLUTE (integer)`` This control sets the camera's aperture to the specified value. The unit is undefined. Larger values open the iris wider, smaller values diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c index 564fedee2c88..794ef3ab0c02 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -1044,6 +1044,10 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_CAMERA_ORIENTATION: return "Camera Orientation"; case V4L2_CID_CAMERA_SENSOR_ROTATION: return "Camera Sensor Rotation"; case V4L2_CID_HDR_SENSOR_MODE: return "HDR Sensor Mode"; + case V4L2_CID_FOCUS_CURRENT: return "Focus, Current"; + case V4L2_CID_FOCUS_STATUS: return "Focus, Status"; + case V4L2_CID_ZOOM_CURRENT: return "Zoom, Current"; + case V4L2_CID_ZOOM_STATUS: return "Zoom, Status"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ @@ -1593,6 +1597,12 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, *flags |= V4L2_CTRL_FLAG_WRITE_ONLY | V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; break; + case V4L2_CID_FOCUS_CURRENT: + case V4L2_CID_FOCUS_STATUS: + case V4L2_CID_ZOOM_CURRENT: + case V4L2_CID_ZOOM_STATUS: + *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_VOLATILE; + break; case V4L2_CID_FLASH_STROBE_STATUS: case V4L2_CID_AUTO_FOCUS_STATUS: case V4L2_CID_FLASH_READY: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 5e80daa4ffe0..793ee8c65e87 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -993,6 +993,15 @@ enum v4l2_auto_focus_range { #define V4L2_CID_HDR_SENSOR_MODE (V4L2_CID_CAMERA_CLASS_BASE+36) +#define V4L2_LENS_STATUS_IDLE (0 << 0) +#define V4L2_LENS_STATUS_BUSY (1 << 0) +#define V4L2_LENS_STATUS_FAILED (1 << 2) + +#define V4L2_CID_FOCUS_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+37) +#define V4L2_CID_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+38) +#define V4L2_CID_ZOOM_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+39) +#define V4L2_CID_ZOOM_STATUS (V4L2_CID_CAMERA_CLASS_BASE+40) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) From patchwork Tue Apr 25 09:45:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677052 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 20147C77B7F for ; Tue, 25 Apr 2023 09:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233695AbjDYJpk (ORCPT ); Tue, 25 Apr 2023 05:45:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233713AbjDYJpg (ORCPT ); Tue, 25 Apr 2023 05:45:36 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8F65C15E; Tue, 25 Apr 2023 02:45:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gdJfWUJamBHEzqqzWnYt4XpKtzL5MDYgF+9ydAA5N4bf4eSqvJpL62JmWWKYjNml+FDmsDP7/KH0B6wIghCO5+gflNEuOekYjWvKaGBJ4P969/q9kwNgqNo5NzPZolrzF5q6KA8yloHVydUyMzHW+ammKImtT9haAZOqruL3cuBLXxfIkIVr3R6rCbWtpS+gIQJqVPN+QJwPyv8pE/LHcUg5ZsUmqqtDyLa8lX+m9/1of3pJfZrOIiT5gzKW6vUMtnx3z2uhyLCwTEHJfiRxQu4Mk8Nq5hcsMRiyNBw1mpNHYTaQf84iuIRCI5vdmg/8bEl5nDMQN3C1Se8GjB5csw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TQrDJvOM/69KPMgS9CzR0tv6l6Kk/FgdIf0NDXzqS9o=; b=nmWs6dPydYgDFO7jmKiUUuT9zZZRGz3k9DOEJ+jdNLft5UHqj/EpHrwP9zpean0DvxU1R+bPWTTaARHmgIlNamloprvghLZCn4B2BsehMN8GoPY7khFtdkDQmhrbzhRWoIPOxBlGnQfFfYQjztXCVRUeeyyg9vCWVnXW4+dKIpEOTOTvncDiAiNV6X01fC6J265BZf/GExkdW50r1pU8x9yA7RSnt60ktO9M85px3xGA233DY16FVuYgwTzzncCgh+8CffS63+M8RZEtI8pDwQbhT1BNTl4lVtSj96LK1TCswH0gm5P20HJiJBY8V0Jr37njhZ/WblUp6akvBidZ3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TQrDJvOM/69KPMgS9CzR0tv6l6Kk/FgdIf0NDXzqS9o=; b=kmt1j1fbhlj+T8jn1r+/bbqM/g6CpYDcnOsKTQjCEDfEdMRdtmND7LOsktXd8ei2BuirNzSEe2pu57+jlzP7+iYx32OzFtbQFmDCrG00/HjZTiVTQFPw/P+WXboPNsHksWgMRc9UdfO2fPDmEefc7WuCvvFYZoJjnrznfzJW2sI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:26 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:26 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:14 +0200 Subject: [PATCH RFC v2 4/6] media: v4l2-ctrls: add lens group speed controls for zoom and focus Message-Id: <20230406-feature-controls-lens-v2-4-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=3264; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=B6OiJRa47o14LtJJ73V2E+VFtxvPLWW9YHiaI+U9DCE=; b=JtypR8MO8CEbYK0b+q55Wzuz0OY62YDr3AARmuBx0AF9uIg5IbZwZ8S57w/DXaxkykw2d5KJI VLue5UZQOq0DHIWfSvqtvLD+7Zrn6KwjslShkZGLCNLDlRFVQdYK5dR X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: 977200d2-c61d-427b-c89f-08db4571cc3b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hv1M7+ibVKiYX3nC/eM2IrwaIgG6SvaTOfVyvAdlq3E3aSI4euUwYkVFeyT6xCWrOCFLDd/vQO37CSdjPg7rBMKFskDHc+/BhS/o0loIaFVHZWxkRLnWWrAUdYlZsqgrCEWB4LdjQXUwH6mOLKHpdFQTl7IFyE5A9xMEP7OxFY3opYoOngCTGrbu7GPCsQQXptjBQNFqGWcEk5YlOsvCF60dK4K3YLeMcpIqYFe1JH4UOV2OnBk6LJei/aYA2hE9Ygd9psM+n2jXew7CWTgQZT8nRq+qCEIseuh1QJ3ez0J7LeJ07mFbCLbivn8wMU33UTo2/pj6NxUqJ6pr1fPhVSame0z4v2r8qyLYK41/2bTii61WwhllxKN/kYOQLabVu2dHpt+80w9yKntm3qzis01B6RVSNfkd0OIFXRt8RZymNBqNq2z6y/V1zyHWlNKG9N7Bob2olGjnG4biuvqRvzd0gHxihIh59dae8ZyIUfCR545X3n9e8ue9EGYkAu8E6CBM/XE+Oilyjet08SISe5ewH7CciuLc7infsOC1zisJQMzgDS2DigLo2TQMRadwkcqic1wq/Gx6a57POqKI5QIG8CVYwbWxbxdp8xFEYfL5Q0LJsMdJSF8WPYaLfGy4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?LRIcO+LehSPKQVkKrx9KqzlYhaP7?= =?utf-8?q?sDbu1pxIWBi4DCE/RLAtNFoo4AItBe0dXawZ0rgKdWmgCiCaLr7KshswrthoYuWvZ?= =?utf-8?q?ijY0z22B5rnWBI+qZhA+s2jIa55oPbASiJgzByV8Ng6GRBG1QijCDBI7n3QfW3t6u?= =?utf-8?q?wbUojDNOALUhwjIi5DhwY8A9rooIZYSXsWOXqWGVzVb6A8wyk2atRYUcM7pKPf1Ib?= =?utf-8?q?YWTeDPSkebVnZ3AAT0SWfK8sHu2AQe+aFgvkeg+5yBhp18Fy0+qKCRxi5ng3h70pq?= =?utf-8?q?Ed4cr/cIPVeRPmlr84Mv+iyfoeUSKRCtkIkcwIUtz8uPMNqfWBeHvUTuqJAi2C0TE?= =?utf-8?q?Pk0Rs1Q9L7wAYBEKQSsW3QVft4guvhn0C1otaxpTeSob5UF+o9//Nu8ixfqTSRC2m?= =?utf-8?q?Ffqyx+VCu27rz2YAv+YoPrx1J9gV8yXjix6HPr0jorIQUlSte5ghTOoUC8SyEsM/p?= =?utf-8?q?QTbu9xOD3HoYrD3kdcXted25RbEvROH3+Nr0MQIaS6IlEzYDWtadU5kJ8kAqM4FGq?= =?utf-8?q?jWqAjSTShMBUcTlpRb1g63aP0cza2pUvtyWLaEpDXIXHoKN3kmNiMQwaC0UJosPxR?= =?utf-8?q?5TcPChpmkTDvN9CzcDl51yrVJGQog0L5JzOQ6q+ATZivbJheN8s3wi7KK/NQZvO51?= =?utf-8?q?ajrE6UlahtQv7+rrQlAtsfBFrkRE3R4fivBFPslOBIsluWEZ/4TYQJz0MwE+0PhEa?= =?utf-8?q?iIwl8GnPF7Rw6yS47Fu86UMtI2F6tM88LV6Nsl/rg22olLzXN4QSmI122/G0zKnqC?= =?utf-8?q?WeKcXAIS4005FEbpnWluT7jykVWYTb106FixY8G8NuZQ1bKFf2h3+SS/2ttiJvtFv?= =?utf-8?q?SIFpF0resyXGrAkz8ufmIthm1L54REZGUDFG76p0Knq5Ay01rCLUghyvZabsfjX4F?= =?utf-8?q?GteV5q44A0ssPpVXkr/AY0Slnw2bY9i/i/b2Wbfs2WhtVObRYhR0mtbdnmTiXdSEC?= =?utf-8?q?d9L+NXOs8evRKMLMq6WqH2uxSt2OPT51vPPig+2Hhnjk8Fu2uM4baHVNCdn347DNi?= =?utf-8?q?rUmd0H1LQO67PHe3jPUmyPDJZBDIvY0MiSwWfEeGaZkjTAXhrbfwLGnJCVIuani5o?= =?utf-8?q?x1RYGRmIkgXDH5AMPenzmKrpACtAEWZGNVj7LSABWzMqTv5OrNWCS9NHwmHqMuX+X?= =?utf-8?q?4CRrQzQFCkm+yEHiRLKqBC8wmgX/1kQhu1Ttx493HRw2ewStjCvwCxDjd9KKZDTZe?= =?utf-8?q?DnPb8JDhLLeubN1lIL4Yq9x5v95e0hS73tIqF/21UG4PAUu8sVrtW92yitoKJdqX7?= =?utf-8?q?BwoHWExU5IlGN7zPq/7Br2K7iPLCz/hXVz0+xxMdrf3SXrByeCLwaDEsT1B6VRyYx?= =?utf-8?q?xwuuCDaL/wza3PYRJ1PQgXDhBOVsw7TecNEgMRndwQ/GF3173f0l4spWsBxt5/bAO?= =?utf-8?q?ptsx+dY2DtzxVcUQ2NnyD3Zp+DLRdHg7r0s82sEfdpZwSSP/Q2X5Ls0EgCZkD7xre?= =?utf-8?q?1nvbWLhrqmeaGgU9dtciNwf1SYzi+OHh1Y7i6bBM3vumLVPJ5fW4A1C/Ppcolc/Jq?= =?utf-8?q?DdvA1M5Q70V1YaGdq+vbxyVjajyeZjt6uw=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 977200d2-c61d-427b-c89f-08db4571cc3b X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:26.4582 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ic03Ri6QJsvjZMGyqp9jYpF2ZNO+BSdAVsqESARqVlQfY/J3uSdVBezToOgCBjDcm7NPxZUD2ByBa+8mgT713uaszDJmybSoHseu8lmJeQk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the controls V4L2_CID_FOCUS_SPEED and V4L2_CID_ZOOM_SPEED that set the speed of the zoom lens group and focus lens group, respectively. Signed-off-by: Michael Riesch --- Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 10 ++++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 2 ++ include/uapi/linux/v4l2-controls.h | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index 3ea4175f9619..a17620ab03b9 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -174,6 +174,11 @@ enum v4l2_exposure_metering - will not transition from this state until another action is performed by an application. +``V4L2_CID_FOCUS_SPEED (integer)`` + Set the speed with which the focus lens group of the camera is moved + (V4L2_CID_FOCUS_ABSOLUTE and V4L2_CID_FOCUS_RELATIVE). The unit is + driver-specific. The value should be a positive integer. + ``V4L2_CID_FOCUS_AUTO (boolean)`` Enables continuous automatic focus adjustments. The effect of manual focus adjustments while this feature is enabled is undefined, @@ -287,6 +292,11 @@ enum v4l2_auto_focus_range - not transition from this state until another action is performed by an application. +``V4L2_CID_ZOOM_SPEED (integer)`` + Set the speed with which the zoom lens group of the camera is moved + (V4L2_CID_ZOOM_ABSOLUTE and V4L2_CID_ZOOM_RELATIVE). The unit is + driver-specific. The value should be a positive integer. + ``V4L2_CID_IRIS_ABSOLUTE (integer)`` This control sets the camera's aperture to the specified value. The unit is undefined. Larger values open the iris wider, smaller values diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c index 794ef3ab0c02..3ef465ba73bd 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -1048,6 +1048,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_FOCUS_STATUS: return "Focus, Status"; case V4L2_CID_ZOOM_CURRENT: return "Zoom, Current"; case V4L2_CID_ZOOM_STATUS: return "Zoom, Status"; + case V4L2_CID_FOCUS_SPEED: return "Focus, Speed"; + case V4L2_CID_ZOOM_SPEED: return "Zoom, Speed"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 793ee8c65e87..8d84508d4db8 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1001,6 +1001,8 @@ enum v4l2_auto_focus_range { #define V4L2_CID_FOCUS_STATUS (V4L2_CID_CAMERA_CLASS_BASE+38) #define V4L2_CID_ZOOM_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+39) #define V4L2_CID_ZOOM_STATUS (V4L2_CID_CAMERA_CLASS_BASE+40) +#define V4L2_CID_FOCUS_SPEED (V4L2_CID_CAMERA_CLASS_BASE+41) +#define V4L2_CID_ZOOM_SPEED (V4L2_CID_CAMERA_CLASS_BASE+42) /* FM Modulator class control IDs */ From patchwork Tue Apr 25 09:45:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677456 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 F20C9C6FD18 for ; Tue, 25 Apr 2023 09:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233754AbjDYJpn (ORCPT ); Tue, 25 Apr 2023 05:45:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233696AbjDYJph (ORCPT ); Tue, 25 Apr 2023 05:45:37 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2078.outbound.protection.outlook.com [40.107.21.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4F945BB2; Tue, 25 Apr 2023 02:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HszOafWLizJmLLAS0BeqYpPH5HJiV1hFD9FYCXcCPxt337+KntsR0VzZe2DATHJ3NlBSgkPkBkys7qhTlFMAFHZogA6Qzf5/NXTNT9spc0IWhmnlP/QpxuNNZsLV0C6Aigj/ga8PYQFwdJlK0GF2WsFcS9MKXs1gZznv6Fc3rw5oXr+YA5I/9DfVzwrymv27ORafTs7cSuw6xF32sQraVa3iI0OBqgY6deoQdRj4NToc0FlxcTKWLQBA+toaNkXHLcDn6zltE7210P55ntn/s8V2EjjLJ+BffvFiTV8/9Pgb0WWXsg9PzgReKoBlp7uLwgP2G2FzcEykNx9iCTojWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O9L4rxpaXgwZR1SpW0PhoeHRM5AL+j9I5cwCshNlZtQ=; b=hbN2EyOAncsVksHPzyCNv7DQ2lQGppo64m9vGATUzQUGJQwxevRNbpEQdjtLpAcA7W3awWO/9srOtlPQleq41R4lXYBkIoFbqwSXI2l/bZBAdY7GQuH1T60W6FOr89kSejhouYlWv40eRRL2BW00IgPjxuF+Yo9LyfmFXoykkx9/BXpKGmGP/VwI36yeMj9zzSfA/0fQETn8uYj/IplQluMzMrNp8ypjGpDI7pGVOEZRe469cwe3x5VURd4j3LigPHIjGCSivr7IKJv3dHpjhjo36eRnKP57L9VQav65WASIe39/ZXPWKVUzSqGQqPmNkMsnRCtumunW8nn1Rg+ICA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O9L4rxpaXgwZR1SpW0PhoeHRM5AL+j9I5cwCshNlZtQ=; b=a8QChJCEMmKr73zw2P2/l6GbvZOWwggbxSnSFBRwNWOMHhVRepHgllmsbisslsTbuIY7uPadr2bVmQRFU/UgRM0XCK6cvUjRrsemQwxpswzn0AgpWOSBqHFbGwGMhRk7dL4xgWnXYo6Ok+ghpikkeJQ1/q6ZPZEIjOw6SDsEOaM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:27 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:27 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:15 +0200 Subject: [PATCH RFC v2 5/6] media: v4l2-ctrls: add lens calibration controls Message-Id: <20230406-feature-controls-lens-v2-5-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=4669; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=eBONwYST4/o4m/pM3GiTe2/yHf9eJ+FpTy4YFguoSfM=; b=05kJGQQHrBJOZwxhgSBVMl05LtTi7ZYnhIqYBAA9ATK21S0LkL+mXt5n5zyx89NrQwFYRX5Kc /Yvljyu9qGPA6O+zzXPHpKTr7leFKi7qWjL31bs2YiphKJO/uGyh1bo X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: b12e232f-c01d-4f9a-6f6f-08db4571cca9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: idgigqa4YGrVoh1U/5n2R9ELYwHWXlGLq1oUqzrkfenjG4uiTH3OzhTPCKYBBC32dU8xDmw5XuyqpTgR+X5JA56PkFP2eMML61WoocJblnx1ysJIU9OvrMeg3sIQT9jGM7eOQkIN6QlbMKdqtlxBXpS3DF2Sj6/4mrvOiTiyuZUe6NkqzaSm4jWw9nSPTeVcl8JkKMlS9uF2kayeOAvCUA+eeGpC9XjwxeS+UaUO/tc2xSlrZBjHJd1hDpd4xl3f1k/5hSTZt/7EBzXEkeJRffysSlELpJSWn0CBR9dfHUYaRyqseMVYYSealGrt/fYJa+MteHP77ZVEgUqDSCS4HOmUdIYfT7bk/gstfUFRQhtiuN/4GcTcjQq97RCGjCJzK56LyCde4hT8Ebi7uql0uqT1O5ZpVIVAkSHHAeUAMkLTn0cxkHrMTy7Mirn5bvZzH+/HQrdKfyn5cxJj/wzSd1Kt1q5Jx1mynMmjFwqiIL+NbPK1EpFuZthCchlwN5zfxeiFGzCXzCHGmy4lU1hnIc55NjLj6CWR5emVcty7jssMPmVpek6q/h6PsXxXXxRG391tdCGiofMYUH253XpPPEx5MAKHlriZDzBLEezH3TQVAfpbHNsXNI6YHexKRrIr X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RmnyY4QgeKB/TD3I+xs24Ua+85ei?= =?utf-8?q?hh0ywXuJnMnxAbswlwkTPeO91atLd4WIcUgi02XOgz+NHkw49BTgvIQo8IbW/xIVW?= =?utf-8?q?us4n8SuAw7epkX7vl7DCejcm6++9Ng59l+s7pvDHVG5lbFo+N2qMknFCZGGAeRlSN?= =?utf-8?q?dapYYVVhwfo9V05X94N7lsM72nv+Y0mHGLQYfIXbVey5JYrfGObfWrL6uAVVjdUZ2?= =?utf-8?q?rkcDTlN3vCrUBn7n2cOmlGXcVby+2mNrW0UDu7Eb89uwtf5ftVvdKRS0pQXWbkPRL?= =?utf-8?q?kOyv75p6wMviOo36f7/gH9dbHrtKjrgeAw7f7WvQbZxdgNBWuCzY9Ad1WoylRAuMp?= =?utf-8?q?dewFrnY6xneC+dtYK2ULQDEm6Wzf+6D+4KONx8dSHZPrMJxn8vxBjjd3F2ufm4lRJ?= =?utf-8?q?814az1cXIqsRqf00tNHxwFHY2K6/E5pQ4OD+yd2Jmv3ZpE11pQq+3TgHWRsnB/RET?= =?utf-8?q?wZ7M3LA7dVaboB0W1LqBnLfu4kVgBZDmqk35GjjoXUuTVphp6dr8danRCzRzz3W48?= =?utf-8?q?AqnbIOrVOhyeuHqW9CVtJv7MhTETH7ns3rkrWnhvWPwYZawSQIVSfs/gZ0NZTXi1p?= =?utf-8?q?5jdoj/v6dMrYMVrN2tG+TZTfxD5rRyQsZBr2AJGGZvC5XFm+UyqoakJy3VrUjPJjb?= =?utf-8?q?AMIFeEesb3LNafeWnAqv8EgkMqU7uv9HYT0v5TLO8m5drR/1DUIiZIO59ajopVg9X?= =?utf-8?q?ii2KouHUaof2y2xUah+o3TfNJFJGlnmoOemTkUz/BXwHL3y/svzG+BHEW3gywHQ47?= =?utf-8?q?B1O/CHbxB9j57wlkU84o7cKZlY6uoOGJ7MZMU5OAzHEjoLQf0zdRrgVX88vjky5gs?= =?utf-8?q?jG2tLNo5VzaiKARyqRTtQj9nubgoRhm2Onf7sW8laDruNVNQ6Y95oNbsafdyS4838?= =?utf-8?q?Om9Xj446Eix3Lqa4feRzclecFM5YwVfUe/4ZGiDFY64qwWqMnzUOSeqj6Ldq5ZmUW?= =?utf-8?q?7dMLjZtZjb2IHK1Ckkk5m9oGkd24mWwF4M0Ip5kpnAIu/oAI2Zgwu4LksGI1lGFw8?= =?utf-8?q?22OFRrZEgaRgnn67x9uzWaUnk6tvJcjCzwLDwyx0NPSLxAMg6EXX0/t+oPtfroi13?= =?utf-8?q?wAn5erdIBPbRDLpgqDPfcz+fKmSTiZUr3QD/v+5CCkqNURoTCYfGBV1K+b1LMVIgT?= =?utf-8?q?0xTSnYTViIS2cy+hodoHSYiVfMOBAi1HB+ETK3ST/ixNS3pbFF3ECp/PpNq9paORL?= =?utf-8?q?QzvyOnWPSWYPw/iEAXjto1vWgtwmU5Dc2/MWFEANJu75Ky1v3rXhelBTi4SaFe6zG?= =?utf-8?q?4ce2YvNep1gyJjQPvr6kfHZHzYo6H0G12zZ0jP/n0R2IsH3veUfbZl0H2hTZ7mSEI?= =?utf-8?q?B/9FJk3S1wxXTRL2HlDGREgNelI3uJIp3U+iXhEs2t69BdLO2rdlOSnN1Rr4YM375?= =?utf-8?q?kuTyi1O1+zdvUsHEMZVa+iLb9xvpVtuuiDlXjNfiGB/5kfso3r6fsKZWIegPRWAtI?= =?utf-8?q?AMq854j5yXAFzCLW+3Y8ln0j6cHr0b91twVNVokgc43PHzsNpodjn4ahHngSX6LXS?= =?utf-8?q?ZP98mFeR5dyZGtUWfoz+kqe/FvfhpXtYqQ=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: b12e232f-c01d-4f9a-6f6f-08db4571cca9 X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:27.2013 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: p+XRvhBZV5u3cUQ+AyxExazL+pzJY/by/wOjuHVLUFyD4i0wrDfcu4RnZXLr2ibOE7+HouCBOQ5P687sYzLD7BZGrDoZ3REvmyNdoWpqdHE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add the controls V4L2_CID_LENS_CALIB_CONTROL and V4L2_CID_LENS_CALIB_STATUS that facilitate the control of the lens group calibration procedure. Signed-off-by: Michael Riesch --- .../userspace-api/media/v4l/ext-ctrls-camera.rst | 35 ++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 4 +++ include/uapi/linux/v4l2-controls.h | 12 ++++++++ 3 files changed, 51 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index a17620ab03b9..8b54a0f3a617 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -297,6 +297,41 @@ enum v4l2_auto_focus_range - (V4L2_CID_ZOOM_ABSOLUTE and V4L2_CID_ZOOM_RELATIVE). The unit is driver-specific. The value should be a positive integer. +``V4L2_CID_LENS_CALIB_CONTROL (bitmask)`` + Control the calibration procedure (or individual parts thereof) of the lens + groups. For example, this could include the mechanical range detection + of zoom lens motors. This is a write-only control. + +.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LENS_CALIB_STOP`` + - Stop the lens calibration procedure. + * - ``V4L2_LENS_CALIB_START`` + - Start the complete lens calibration procedure. + +``V4L2_CID_LENS_CALIB_STATUS (bitmask)`` + The status of the calibration procedure (or individual parts thereof) of + the lens groups. This is a read-only control. + +.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LENS_CALIB_IDLE`` + - Lens calibration procedure has not yet been started. + * - ``V4L2_LENS_CALIB_BUSY`` + - Lens calibration procedure is in progress. + * - ``V4L2_LENS_CALIB_COMPLETE`` + - Lens calibration procedure is complete. + * - ``V4L2_LENS_CALIB_FAILED`` + - Lens calibration procedure has failed. + ``V4L2_CID_IRIS_ABSOLUTE (integer)`` This control sets the camera's aperture to the specified value. The unit is undefined. Larger values open the iris wider, smaller values diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c index 3ef465ba73bd..faddfecba6d9 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -1050,6 +1050,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_ZOOM_STATUS: return "Zoom, Status"; case V4L2_CID_FOCUS_SPEED: return "Focus, Speed"; case V4L2_CID_ZOOM_SPEED: return "Zoom, Speed"; + case V4L2_CID_LENS_CALIB_CONTROL: return "Lens Calibration, Control"; + case V4L2_CID_LENS_CALIB_STATUS: return "Lens Calibration, Status"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ @@ -1596,6 +1598,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FOCUS_RELATIVE: case V4L2_CID_IRIS_RELATIVE: case V4L2_CID_ZOOM_RELATIVE: + case V4L2_CID_LENS_CALIB_CONTROL: *flags |= V4L2_CTRL_FLAG_WRITE_ONLY | V4L2_CTRL_FLAG_EXECUTE_ON_WRITE; break; @@ -1603,6 +1606,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FOCUS_STATUS: case V4L2_CID_ZOOM_CURRENT: case V4L2_CID_ZOOM_STATUS: + case V4L2_CID_LENS_CALIB_STATUS: *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_VOLATILE; break; case V4L2_CID_FLASH_STROBE_STATUS: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 8d84508d4db8..24c0eb5f4d29 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1004,6 +1004,18 @@ enum v4l2_auto_focus_range { #define V4L2_CID_FOCUS_SPEED (V4L2_CID_CAMERA_CLASS_BASE+41) #define V4L2_CID_ZOOM_SPEED (V4L2_CID_CAMERA_CLASS_BASE+42) +#define V4L2_LENS_CALIB_STOP (0 << 0) +#define V4L2_LENS_CALIB_START (1 << 0) + +#define V4L2_CID_LENS_CALIB_CONTROL (V4L2_CID_CAMERA_CLASS_BASE+43) + +#define V4L2_LENS_CALIB_IDLE (0 << 0) +#define V4L2_LENS_CALIB_BUSY (1 << 0) +#define V4L2_LENS_CALIB_COMPLETE (1 << 1) +#define V4L2_LENS_CALIB_FAILED (1 << 2) + +#define V4L2_CID_LENS_CALIB_STATUS (V4L2_CID_CAMERA_CLASS_BASE+44) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900) From patchwork Tue Apr 25 09:45:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Riesch X-Patchwork-Id: 677051 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 64A9EC6FD18 for ; Tue, 25 Apr 2023 09:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233772AbjDYJqE (ORCPT ); Tue, 25 Apr 2023 05:46:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233723AbjDYJpl (ORCPT ); Tue, 25 Apr 2023 05:45:41 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2075.outbound.protection.outlook.com [40.107.22.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55A06CC15; Tue, 25 Apr 2023 02:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nDWY2AqZVN1WaZ0NfJlBFbfwfiBNM+WEXDQSqSeLQ8R+9QJvHkTnXij54BC6ShlpIrC/0LQvmCVf9e44A715o+7Gnz10cRu2PaBoMJur791h1VU2JsY+uHJ4Pr2R43Xhe3iWrLQEBrHX9/6kKFcm9EZ05wPV2WLM4PjkpkzvBJ8LcGrrXNJixRNz7AYRjW9WJzgE+wm7htdONiw5CZ5HpZtMAhb+EuyhEKbbuYisHFLEiR6h5Mga5VWjZHE3ytJcZhIxzUsm6dgOOjRsnVATNYQUMvgK14ze8aLanYOrf2Ahry+C1XuPXEP1719+y67hHDQ4gz668yoJXmbWtw9j6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bVGzAIOKuT8PiHIjsfy7+8gDVMXb/GXNKV39YoMg2uY=; b=MFGSnnObpaTf84d1SO582OZ/UutbFBv/kC0SbNuBw3Y4198behVzv8vpV0+p3be2PkH3wj9bdULrwqyhBQv5Uk+TeyAZMp9LleLMUfqnUYVCvJShV4L6lS9J2PzMz99OKGx6hWe6XbyHgXZp8bPBx6fpK1EINTR7nGYsp8hso/7uEB6Oa0L60jskRCf3y4rHp7R16glQuFqSADNGocBKGQmAuwc+Tq6UDfQBSdQiJXWf3w0smQa5lE7p3RuBhuwkh1KQyjoLMZcSf4TeaXXa4yQEPRruNy+KYS2HdXGkluhwj/AcWGbfwuEptTWSWosZD9mctkhi5hbCuyE1UjPeLg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wolfvision.net; dmarc=pass action=none header.from=wolfvision.net; dkim=pass header.d=wolfvision.net; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wolfvision.net; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bVGzAIOKuT8PiHIjsfy7+8gDVMXb/GXNKV39YoMg2uY=; b=K9659784cy4vnfPFZ7Foflbpr5cHSgiPPhljG3DbuIhuWYxibUFVr9Ya7/Fqe8paMxBBr4C6qKznLU8os87+NMn3KlpZCyvmOBezPQWaYUESrWlGfZuJ0jqDpoxImjhghyvLOSlHTjfJ7Nj0LO4mpdJkdsjD22thyJEcpTWlogM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=wolfvision.net; Received: from GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) by DU0PR08MB7995.eurprd08.prod.outlook.com (2603:10a6:10:3e2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6319.33; Tue, 25 Apr 2023 09:45:28 +0000 Received: from GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54]) by GV1SPRMB0046.eurprd08.prod.outlook.com ([fe80::3734:409a:8031:4f54%3]) with mapi id 15.20.6319.034; Tue, 25 Apr 2023 09:45:28 +0000 From: Michael Riesch Date: Tue, 25 Apr 2023 11:45:16 +0200 Subject: [PATCH RFC v2 6/6] media: v4l2-ctrls: add controls for individual zoom lenses Message-Id: <20230406-feature-controls-lens-v2-6-faa8ad2bc404@wolfvision.net> References: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> In-Reply-To: <20230406-feature-controls-lens-v2-0-faa8ad2bc404@wolfvision.net> To: Mauro Carvalho Chehab Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Matthias Fend , Dave Stevenson , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1682415922; l=6440; i=michael.riesch@wolfvision.net; s=20230425; h=from:subject:message-id; bh=nqNQJR05ouemc8SeZlYTZLqLg/Oag/CugYO/mHK9Nxk=; b=I8PTDREyqsHC6mCfu8BfuO++6UCHtbLMVx4XJPANgzhyh5Dzk0FMX8TPi6efD2OlbdxDKCjk4 VnUeGknkP/WA95ewUc5ARo0gNJdPPG7X6W3W33hAa6YVqNBi8Tow62U X-Developer-Key: i=michael.riesch@wolfvision.net; a=ed25519; pk=1QQdXA2QbwdxaQn/VQK0hz04C8IBYhDowbK0hlNU4Ng= X-ClientProxiedBy: VI1PR0802CA0032.eurprd08.prod.outlook.com (2603:10a6:800:a9::18) To GV1SPRMB0046.eurprd08.prod.outlook.com (2603:10a6:150:84::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1SPRMB0046:EE_|DU0PR08MB7995:EE_ X-MS-Office365-Filtering-Correlation-Id: 141a057b-b329-4535-0303-08db4571cd23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V5Ho0wxXTszNVbSSp6RDRwj/JB7HdSIEzwIs/puPO9A/iHCyIOqWl34Ak0s9lq/AB8uPjWoWFdB9VShQkmI9PqahomtlJ5rnF6ZhRsOpEr/oHzFewtW+7fFJYzzXARO4ysrTbts1FjcG0P+U2x4wTrpibDlT3CxPLUsCx8Cw/0DUfffaUKZxXbM6WPrc0fTIMLXPT8vk0xcOZs1z8nnCkjJWme0i0UxcLfWAHJoM1tc/Z1SVA5RtOhS1nj1L1QO1QOmk0gQ51ue5gRJ0lSe1Ci8YrLSgAcrQwZEci8zkIV4Ksqbmi4AWdFo1tYYynqVcK403lA/3QWkdqnvLOwk/0aRsf6cjdHP1Pfc62uc+vY6L4S25OJHfMlaW+OtX2YPoyVDyN2i8sRPy0+UTjd6Ca6D8s6OkEmF6JGy0DuMAsG6bVe2EIJuS4IOdxMXVEG3bLj9aMtMrD2/QflqrNN0C0OlgCPccsX8UkvrY6cCKScJKieTJILLkonKcZ57sTnkDuYd8gGO62QIAamlMVxVH49S8ypFCMHWjN+QY5UZKrAa46SjiInWsjAvHQEATpJDQCwh2PQlwEBy/3zaF2eYJGmUqMnwrYxdjgnExLiRKmDSNgHx3kDuCitlYKqquXVky X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:GV1SPRMB0046.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(396003)(366004)(39850400004)(346002)(451199021)(38350700002)(38100700002)(6506007)(6512007)(26005)(186003)(8936002)(2616005)(83380400001)(107886003)(44832011)(2906002)(8676002)(5660300002)(36756003)(478600001)(54906003)(6486002)(52116002)(316002)(6666004)(4326008)(6916009)(66556008)(41300700001)(66946007)(86362001)(66476007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9L/MyxAFbqhIDN3AkOKSv4MO5LGh?= =?utf-8?q?OtB6DarN2kkiyAKEoOem+TVz+p/gjhGKB+BKi1vH8TP3zYx0kzlI70qHp3IEyvgxs?= =?utf-8?q?Xf5iVjddPkMlS7zP3WC6Rzq3yZznuT+/0JH2gkwWkhPqImsnJt7HW1vIg7HCO9AdC?= =?utf-8?q?U9BAZf+8WKmK4H5eOTrtLGEbMcKpA2raFLq8wicC/4qDiaaTUsepTc89nl+/vxtnQ?= =?utf-8?q?il3i6HIW3YkUHGbPVtaE0c57n5ok/iMqnivyGZIpIa7zpC38ymODQu+I0Z3p8PIpu?= =?utf-8?q?FcLV/D0Yo1GlH/raTjK7uAHiFUw8pGUAL57y6RkfG3yIbpaZGC1aSWgbruChuGiWm?= =?utf-8?q?zVDFhhpB5oyQ+8JKEc6WH415tQ95E4jCP67iH16V9WA8wJrrlGYhSIGJQ4486HTOv?= =?utf-8?q?LuTT4t/0rMwjE5Ft15ixCrVXtDMqOQsOYiLESUi44ayZwP1yWdGDpfSdfo/gKGyWI?= =?utf-8?q?dxNqTvzZocOnQzzeLjfb8m8PIrDJgGyj3+lK0L6YisSL1d/4Nl+TOw/gV9aOjhxty?= =?utf-8?q?O2LNatDbVsr9xc5QYxFiA9j54hxzgLa0qnloPal9VaZoHfTco7CuSRhFfyCymZ7Gs?= =?utf-8?q?WVpvnEuUDr5VA0ij8P5NFSkJlktSzuTawCfmbeGGLnl5fps6SHGd4/9/V2pynTJIV?= =?utf-8?q?160uOu1PnU7vPE2GLzog8pZcwehvo/z0iIXi6RozM8Hc5Haq7CgYX4/TgTXFolgz/?= =?utf-8?q?s44COGpSOr/ouWVoAJ5OzH55mdCUdSSLxtx9mTw4YT5tjVibGH2FMEBqNo7kGD4vg?= =?utf-8?q?apRGNxkUUFKS23Q8X36acP54oxN4wPRCVgaHBr88sX3Z/gLGJMSTpl030It9YO/7f?= =?utf-8?q?dzct1UWaaQ+FOrC1ZSTDdoQ7bt6S+ijb/rHZ8JUquoXEkZ2RpTozCNouqxc/nSNYa?= =?utf-8?q?w4wkVYcztBA/aX/Ve5ofGhM+uBouR4drt3TC8hI4EdVJOr2sL4Z1KFJ78lVgq3BqI?= =?utf-8?q?bzdXxKevmvtO5ujFliuHue6vLYJNo8tDR8TCg0tFQLeXU4vTLezgIfgCXFh0Vf9P1?= =?utf-8?q?AdrLuQ1+4/3+0yV9Yqcg7rkIXP13UW2Vxxk23NEpZaj3c0YtuVriYSW5x3sIA25Ys?= =?utf-8?q?+eQsTR1r1aHuek7XGrs6mskBpIQ+x4H8ZBtaPnFMEge2JdTbCHkPn5e7uoCv1/U5O?= =?utf-8?q?UFil7OrWV9oJT9vX6npnVGui2qy6mdDsoRPGnenMNpRnU2QHhU8F3jtEovYSPIrCD?= =?utf-8?q?9v6Omue+rGejjEmbWHbbj4da26p9kmrmTVZ9m+aESriAnbZTXNOpoYD7mryEC+qFc?= =?utf-8?q?b4UUTftUBo6RiPCiVR17clsi4oOrn1Z8jm3EQUTVEnWfYN6ppxG/nDEZa4xrBIv7i?= =?utf-8?q?fGQBHgOV6oP5tf+j2YeOAOAHnsx2Pu+/EgBOd62Pro+PXDWudhBHhlWBdkHRwHnUO?= =?utf-8?q?tjqJpUQ4wWErSw+fmzu9MGX/g3q9/BWzDweKoWfvJvB9BIap5Q9Q2r52nE5vdWxsA?= =?utf-8?q?IMvUSfKWRV8s6JKTvKuD5Nnf2A1EIehD/o2G1doVrfpHdKmJAmY2NuyEzg2BpYuyv?= =?utf-8?q?9UBONM3mXIs2vk7v+2q5LixIt6TtK2B/uw=3D=3D?= X-OriginatorOrg: wolfvision.net X-MS-Exchange-CrossTenant-Network-Message-Id: 141a057b-b329-4535-0303-08db4571cd23 X-MS-Exchange-CrossTenant-AuthSource: GV1SPRMB0046.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2023 09:45:27.9933 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: e94ec9da-9183-471e-83b3-51baa8eb804f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FgYCAOlYcfZIKXr4DbwXEae8SyFs/0qjwu21KxRMeVfFMXlRcchfaI6CRh1EsZ52GxC7gIuLTgxhqBJXgoo8q9u8zE1rcdMtntpjKZC7Yhs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7995 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org A zoom lens group may consist of several lenses, and in a calibration context it may be necessary to position the lenses individually. Add a tuple of V4L2_CID_LENS_CALIB_ZOOMx_{ABSOLUTE,CURRENT,STATUS} controls for each individual lens, where x = {1...5}. Signed-off-by: Michael Riesch --- .../userspace-api/media/v4l/ext-ctrls-camera.rst | 30 ++++++++++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls-defs.c | 25 ++++++++++++++++++ include/uapi/linux/v4l2-controls.h | 18 +++++++++++++ 3 files changed, 73 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst index 8b54a0f3a617..21391f076971 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst @@ -332,6 +332,36 @@ enum v4l2_auto_focus_range - * - ``V4L2_LENS_CALIB_FAILED`` - Lens calibration procedure has failed. +``V4L2_CID_LENS_CALIB_ZOOM{1...5}_ABSOLUTE`` (integer) + Set the absolute position of the individual lens of the zoom lens group. + Most likely, this is done in a calibration context. The unit is + driver-specific. + +``V4L2_CID_LENS_CALIB_ZOOM{1...5}_CURRENT`` (integer) + The current absolute position of the individual lens of the zoom lens group. + Most likely, this is done in a calibration context. The unit is + driver-specific. This is a read-only control. + +``V4L2_CID_LENS_CALIB_ZOOM{1...5}_STATUS`` (bitmask) + The current status of the individual lens of the zoom lens group. + Most likely, this is done in a calibration context. The possible flags are + described in the table below. This is a read-only control. + +.. tabularcolumns:: |p{6.8cm}|p{10.7cm}| + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + + * - ``V4L2_LENS_STATUS_IDLE`` + - Zoom lens is at rest. + * - ``V4L2_LENS_STATUS_BUSY`` + - Zoom lens is moving. + * - ``V4L2_LENS_STATUS_FAILED`` + - Zoom lens has failed to reach its target position. The driver will + not transition from this state until another action is performed by an + application. + ``V4L2_CID_IRIS_ABSOLUTE (integer)`` This control sets the camera's aperture to the specified value. The unit is undefined. Larger values open the iris wider, smaller values diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c index faddfecba6d9..8a78cffcd3e8 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c +++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c @@ -1052,6 +1052,21 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_ZOOM_SPEED: return "Zoom, Speed"; case V4L2_CID_LENS_CALIB_CONTROL: return "Lens Calibration, Control"; case V4L2_CID_LENS_CALIB_STATUS: return "Lens Calibration, Status"; + case V4L2_CID_LENS_CALIB_ZOOM1_ABSOLUTE: return "Zoom1, Absolute"; + case V4L2_CID_LENS_CALIB_ZOOM2_ABSOLUTE: return "Zoom2, Absolute"; + case V4L2_CID_LENS_CALIB_ZOOM3_ABSOLUTE: return "Zoom3, Absolute"; + case V4L2_CID_LENS_CALIB_ZOOM4_ABSOLUTE: return "Zoom4, Absolute"; + case V4L2_CID_LENS_CALIB_ZOOM5_ABSOLUTE: return "Zoom5, Absolute"; + case V4L2_CID_LENS_CALIB_ZOOM1_CURRENT: return "Zoom1, Current"; + case V4L2_CID_LENS_CALIB_ZOOM2_CURRENT: return "Zoom1, Current"; + case V4L2_CID_LENS_CALIB_ZOOM3_CURRENT: return "Zoom1, Current"; + case V4L2_CID_LENS_CALIB_ZOOM4_CURRENT: return "Zoom1, Current"; + case V4L2_CID_LENS_CALIB_ZOOM5_CURRENT: return "Zoom1, Current"; + case V4L2_CID_LENS_CALIB_ZOOM1_STATUS: return "Zoom1, Status"; + case V4L2_CID_LENS_CALIB_ZOOM2_STATUS: return "Zoom2, Status"; + case V4L2_CID_LENS_CALIB_ZOOM3_STATUS: return "Zoom3, Status"; + case V4L2_CID_LENS_CALIB_ZOOM4_STATUS: return "Zoom4, Status"; + case V4L2_CID_LENS_CALIB_ZOOM5_STATUS: return "Zoom5, Status"; /* FM Radio Modulator controls */ /* Keep the order of the 'case's the same as in v4l2-controls.h! */ @@ -1607,6 +1622,16 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_ZOOM_CURRENT: case V4L2_CID_ZOOM_STATUS: case V4L2_CID_LENS_CALIB_STATUS: + case V4L2_CID_LENS_CALIB_ZOOM1_CURRENT: + case V4L2_CID_LENS_CALIB_ZOOM2_CURRENT: + case V4L2_CID_LENS_CALIB_ZOOM3_CURRENT: + case V4L2_CID_LENS_CALIB_ZOOM4_CURRENT: + case V4L2_CID_LENS_CALIB_ZOOM5_CURRENT: + case V4L2_CID_LENS_CALIB_ZOOM1_STATUS: + case V4L2_CID_LENS_CALIB_ZOOM2_STATUS: + case V4L2_CID_LENS_CALIB_ZOOM3_STATUS: + case V4L2_CID_LENS_CALIB_ZOOM4_STATUS: + case V4L2_CID_LENS_CALIB_ZOOM5_STATUS: *flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_VOLATILE; break; case V4L2_CID_FLASH_STROBE_STATUS: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 24c0eb5f4d29..7c49c0ba23d4 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -1016,6 +1016,24 @@ enum v4l2_auto_focus_range { #define V4L2_CID_LENS_CALIB_STATUS (V4L2_CID_CAMERA_CLASS_BASE+44) +#define V4L2_CID_LENS_CALIB_ZOOM1_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+45) +#define V4L2_CID_LENS_CALIB_ZOOM2_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+46) +#define V4L2_CID_LENS_CALIB_ZOOM3_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+47) +#define V4L2_CID_LENS_CALIB_ZOOM4_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+48) +#define V4L2_CID_LENS_CALIB_ZOOM5_ABSOLUTE (V4L2_CID_CAMERA_CLASS_BASE+49) + +#define V4L2_CID_LENS_CALIB_ZOOM1_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+50) +#define V4L2_CID_LENS_CALIB_ZOOM2_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+51) +#define V4L2_CID_LENS_CALIB_ZOOM3_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+52) +#define V4L2_CID_LENS_CALIB_ZOOM4_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+53) +#define V4L2_CID_LENS_CALIB_ZOOM5_CURRENT (V4L2_CID_CAMERA_CLASS_BASE+54) + +#define V4L2_CID_LENS_CALIB_ZOOM1_STATUS (V4L2_CID_CAMERA_CLASS_BASE+55) +#define V4L2_CID_LENS_CALIB_ZOOM2_STATUS (V4L2_CID_CAMERA_CLASS_BASE+56) +#define V4L2_CID_LENS_CALIB_ZOOM3_STATUS (V4L2_CID_CAMERA_CLASS_BASE+57) +#define V4L2_CID_LENS_CALIB_ZOOM4_STATUS (V4L2_CID_CAMERA_CLASS_BASE+58) +#define V4L2_CID_LENS_CALIB_ZOOM5_STATUS (V4L2_CID_CAMERA_CLASS_BASE+59) + /* FM Modulator class control IDs */ #define V4L2_CID_FM_TX_CLASS_BASE (V4L2_CTRL_CLASS_FM_TX | 0x900)