Message ID | 20230406-feature-controls-lens-v2-2-faa8ad2bc404@wolfvision.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3288467vqo; Tue, 25 Apr 2023 02:57:57 -0700 (PDT) X-Google-Smtp-Source: AKy350aSX97n20PD4PDBixARum1aHMcZTJBOZekEorEMGu2EnLTsEhwL5tL3Oz4aK9N1fALJL+fa X-Received: by 2002:a17:903:64e:b0:1a1:a800:96a7 with SMTP id kh14-20020a170903064e00b001a1a80096a7mr16830596plb.8.1682416677310; Tue, 25 Apr 2023 02:57:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1682416677; cv=pass; d=google.com; s=arc-20160816; b=WwDOt4pT+FBuWnsCEGWg/EbmTYgtsZ/FZUBuJlwwJy4IzDp7BBqVyPQNgG7JO1YuPd krAATshNtgakJ9FznPmUXW5vcJVhglFvGlSVcLDdeF1sw2gigg3PrtjMarl0NvqwfOQQ 95OhNwQ3fNP7J+6NveqzfBZwSN/SxPJrESMmIaVe3fzaWOShlwiUsxmrWtEKHhyCAdbm V1yqgg3O7SfUEoLljKsiizCGBxp1CE7X0iGLPV+6m38gUnme0L9Wl/9sklhitCR89Z6E h9zYwsY8WhXc0/AROdB/ARaUrtbDiDP2W2C/C6XAti343zjIl9R8l2mkpKZTGdlEIl+g 4VsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:cc:to:in-reply-to:references :message-id:content-transfer-encoding:subject:date:from :dkim-signature; bh=XxXCNgexyIvBtPa5jGHwEJC7cJJJcsFJu/5pNRqjkZA=; b=RaXd4RvzemTv53uTunIJBejP5FEJfMxw2lYlxEt4ohgkme5aO+D5iyowVgq6bInsF6 BQfUxy1/WLGC1BoNd5qiKLfE+QAltsjQA9e4jr4zQSx1Ys+XQQJcpQzz0pl1vpg2cttD KBG+yXrSYRF3JYYaiYumWSJD1LvUGCvWQXRIKtqy72LV6EEkLgXfmSMxfNhuJsOe75c9 J9usIhlnETtqCCqp8xdqHD4IvNNoiUMMyWlr+k2OqpfJtkZtKeIKlJN5xwGyyAdTLkKP qo0iLr0H+M4+JIvCbzy4JYV+qXheM8VgUPH4AtTN8qCX2RSwnNU6rQ7xrOpuwuseEzE0 OfGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wolfvision.net header.s=selector2 header.b=2KIhX28F; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170902cccb00b001a66c437b2esi12745196ple.20.2023.04.25.02.57.44; Tue, 25 Apr 2023 02:57:57 -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=@wolfvision.net header.s=selector2 header.b=2KIhX28F; arc=pass (i=1 spf=pass spfdomain=wolfvision.net dkim=pass dkdomain=wolfvision.net dmarc=pass fromdomain=wolfvision.net); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wolfvision.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233698AbjDYJph (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Tue, 25 Apr 2023 05:45:37 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <michael.riesch@wolfvision.net> 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 <mchehab@kernel.org> Cc: libcamera-devel@lists.libcamera.org, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Hans Verkuil <hverkuil-cisco@xs4all.nl>, Matthias Fend <Matthias.Fend@wolfvision.net>, Dave Stevenson <dave.stevenson@raspberrypi.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Riesch <michael.riesch@wolfvision.net> 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764141749857057093?= X-GMAIL-MSGID: =?utf-8?q?1764141749857057093?= |
Series |
media: v4l2-ctrls: add controls for complex lens controller devices
|
|
Commit Message
Michael Riesch
April 25, 2023, 9:45 a.m. UTC
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 <michael.riesch@wolfvision.net>
---
Documentation/userspace-api/media/v4l/ext-ctrls-camera.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hi Michael, Thank you for the patch. On Tue, Apr 25, 2023 at 11:45:12AM +0200, Michael Riesch wrote: > 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 <michael.riesch@wolfvision.net> > --- > 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. > + Extra blank line. I don't think this is right. The control was added for the UVC driver, and there are devices that implement both absolute and relative focus. > > ``V4L2_CID_FOCUS_AUTO (boolean)`` > Enables continuous automatic focus adjustments. The effect of manual >
Hi Laurent, On 6/6/23 12:36, Laurent Pinchart wrote: > Hi Michael, > > Thank you for the patch. > > On Tue, Apr 25, 2023 at 11:45:12AM +0200, Michael Riesch wrote: >> 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 <michael.riesch@wolfvision.net> >> --- >> 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. >> + > > Extra blank line. Will fix that. > I don't think this is right. The control was added for the UVC driver, > and there are devices that implement both absolute and relative focus. I am by no means an expert here and just following Sakari's suggestion here (see [0]). I can drop the patch, leave it as-is, or modify it. Whatever makes sense to you guys. But maybe I should leave this to someone more knowledgeable in this area and drop the patch from my series. The changes above are completely orthogonal to my work. Best regards, Michael > >> >> ``V4L2_CID_FOCUS_AUTO (boolean)`` >> Enables continuous automatic focus adjustments. The effect of manual >> > [0] https://lore.kernel.org/all/ZDbChgZJHVaaX3%2Fx@kekkonen.localdomain/
Hi Michael, On Tue, Jun 06, 2023 at 03:15:33PM +0200, Michael Riesch wrote: > On 6/6/23 12:36, Laurent Pinchart wrote: > > On Tue, Apr 25, 2023 at 11:45:12AM +0200, Michael Riesch wrote: > >> 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 <michael.riesch@wolfvision.net> > >> --- > >> 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. > >> + > > > > Extra blank line. > > Will fix that. > > > I don't think this is right. The control was added for the UVC driver, > > and there are devices that implement both absolute and relative focus. > > I am by no means an expert here and just following Sakari's suggestion > here (see [0]). I can drop the patch, leave it as-is, or modify it. > Whatever makes sense to you guys. But maybe I should leave this to > someone more knowledgeable in this area and drop the patch from my > series. The changes above are completely orthogonal to my work. V4L2_CID_FOCUS_RELATIVE is an annoying control. It was introduced for UVC, and to my surprise, it turns out it has never been implemented in the uvcvideo driver. The 3 devices I know of that implement the UVC relative focus control also implement the UVC absolute focus control. I'm tempted to deprecate this control completely. Sakari, any opinion ? > >> > >> ``V4L2_CID_FOCUS_AUTO (boolean)`` > >> Enables continuous automatic focus adjustments. The effect of manual > >> > > > > [0] https://lore.kernel.org/all/ZDbChgZJHVaaX3%2Fx@kekkonen.localdomain/
On Wed, Jun 07, 2023 at 09:42:07AM +0300, Laurent Pinchart wrote: > On Tue, Jun 06, 2023 at 03:15:33PM +0200, Michael Riesch wrote: > > On 6/6/23 12:36, Laurent Pinchart wrote: > > > On Tue, Apr 25, 2023 at 11:45:12AM +0200, Michael Riesch wrote: > > >> 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 <michael.riesch@wolfvision.net> > > >> --- > > >> 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. > > >> + > > > > > > Extra blank line. > > > > Will fix that. > > > > > I don't think this is right. The control was added for the UVC driver, > > > and there are devices that implement both absolute and relative focus. > > > > I am by no means an expert here and just following Sakari's suggestion > > here (see [0]). I can drop the patch, leave it as-is, or modify it. > > Whatever makes sense to you guys. But maybe I should leave this to > > someone more knowledgeable in this area and drop the patch from my > > series. The changes above are completely orthogonal to my work. > > V4L2_CID_FOCUS_RELATIVE is an annoying control. It was introduced for > UVC, and to my surprise, it turns out it has never been implemented in > the uvcvideo driver. The 3 devices I know of that implement the UVC > relative focus control also implement the UVC absolute focus control. > > I'm tempted to deprecate this control completely. Sakari, any opinion ? This is how the UVC relative focus control is defined. 4.2.2.1.7 Focus (Relative) Control The Focus (Relative) Control is used to move the focus lens group to specify the distance to the optimally focused target. The bFocusRelative field indicates whether the focus lens group is stopped or is moving for near or for infinity direction. A value of 1 indicates that the focus lens group is moved for near direction. A value of 0 indicates that the focus lens group is stopped. And a value of 0xFF indicates that the lens group is moved for infinity direction. The GET_MIN, GET_MAX, GET_RES and GET_DEF requests will return zero for this field. The bSpeed field indicates the speed of the lens group movement. A low number indicates a slow speed and a high number indicates a high speed. The GET_MIN, GET_MAX and GET_RES requests are used to retrieve the range and resolution for this field. The GET_DEF request is used to retrieve the default value for this field. If the control does not support speed control, it will return the value 1 in this field for all these requests. If both Relative and Absolute Controls are supported, a SET_CUR to the Relative Control with a value other than 0x00 shall result in a Control Change interrupt for the Absolute Control at the end of the movement (see section 2.4.2.2, “Status Interrupt Endpoint”). The end of movement can be due to physical device limits, or due to an explicit request by the host to stop the movement. If the end of movement is due to physical device limits (such as a limit in range of motion), a Control Change interrupt shall be generated for this Relative Control. If there is no limit in range of motion, a Control Change interrupt is not required. It seems there's no way we can just map this to V4L2_CID_FOCUS_RELATIVE, making the V4L2 relative focus control quite useless. > > >> > > >> ``V4L2_CID_FOCUS_AUTO (boolean)`` > > >> Enables continuous automatic focus adjustments. The effect of manual > > >> > > > > [0] https://lore.kernel.org/all/ZDbChgZJHVaaX3%2Fx@kekkonen.localdomain/
Hi Laurent, On Wed, Jun 07, 2023 at 09:55:20AM +0300, Laurent Pinchart wrote: > On Wed, Jun 07, 2023 at 09:42:07AM +0300, Laurent Pinchart wrote: > > On Tue, Jun 06, 2023 at 03:15:33PM +0200, Michael Riesch wrote: > > > On 6/6/23 12:36, Laurent Pinchart wrote: > > > > On Tue, Apr 25, 2023 at 11:45:12AM +0200, Michael Riesch wrote: > > > >> 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 <michael.riesch@wolfvision.net> > > > >> --- > > > >> 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. > > > >> + > > > > > > > > Extra blank line. > > > > > > Will fix that. > > > > > > > I don't think this is right. The control was added for the UVC driver, > > > > and there are devices that implement both absolute and relative focus. > > > > > > I am by no means an expert here and just following Sakari's suggestion > > > here (see [0]). I can drop the patch, leave it as-is, or modify it. > > > Whatever makes sense to you guys. But maybe I should leave this to > > > someone more knowledgeable in this area and drop the patch from my > > > series. The changes above are completely orthogonal to my work. > > > > V4L2_CID_FOCUS_RELATIVE is an annoying control. It was introduced for > > UVC, and to my surprise, it turns out it has never been implemented in > > the uvcvideo driver. The 3 devices I know of that implement the UVC > > relative focus control also implement the UVC absolute focus control. > > > > I'm tempted to deprecate this control completely. Sakari, any opinion ? > > This is how the UVC relative focus control is defined. > > 4.2.2.1.7 Focus (Relative) Control > > The Focus (Relative) Control is used to move the focus lens group to > specify the distance to the optimally focused target. > > The bFocusRelative field indicates whether the focus lens group is > stopped or is moving for near or for infinity direction. A value of 1 > indicates that the focus lens group is moved for near direction. A > value of 0 indicates that the focus lens group is stopped. And a value > of 0xFF indicates that the lens group is moved for infinity direction. > The GET_MIN, GET_MAX, GET_RES and GET_DEF requests will return zero > for this field. > > The bSpeed field indicates the speed of the lens group movement. A low > number indicates a slow speed and a high number indicates a high > speed. The GET_MIN, GET_MAX and GET_RES requests are used to retrieve > the range and resolution for this field. The GET_DEF request is used > to retrieve the default value for this field. If the control does not > support speed control, it will return the value 1 in this field for > all these requests. > > If both Relative and Absolute Controls are supported, a SET_CUR to the > Relative Control with a value other than 0x00 shall result in a > Control Change interrupt for the Absolute Control at the end of the > movement (see section 2.4.2.2, “Status Interrupt Endpoint”). The end > of movement can be due to physical device limits, or due to an > explicit request by the host to stop the movement. If the end of > movement is due to physical device limits (such as a limit in range of > motion), a Control Change interrupt shall be generated for this > Relative Control. If there is no limit in range of motion, a Control > Change interrupt is not required. > > It seems there's no way we can just map this to V4L2_CID_FOCUS_RELATIVE, > making the V4L2 relative focus control quite useless. I'd deprecate this control as it doesn't have any use. The control documentation + other references in V4L2 control framework could be even removed but the control ID definition needs to stay as user space may refer to it.
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