[{"id":27214,"web_url":"https://patchwork.libcamera.org/comment/27214/","msgid":"<20230602060916.GP22609@pendragon.ideasonboard.com>","date":"2023-06-02T06:09:16","subject":"Re: [libcamera-devel] [PATCH v1 1/3] libcamera: controls: Define a\n\tdefault lens position behaviour","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Naush,\n\nThank you for the patch.\n\nOn Thu, Jun 01, 2023 at 10:56:28AM +0100, Naushir Patuck via libcamera-devel wrote:\n> Update the LensPosition control description to explicitly define a\n> startup/default behaviour.\n> \n> On startup, the IPA will move the lens to the position given by the\n> default value of the LensPosition control. Typically this would be the\n> hyperfocal position of the lens.\n> \n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/control_ids.yaml | 5 +++++\n>  1 file changed, 5 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index adea5f90acc5..f6dbfd6c0bf0 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -610,6 +610,11 @@ controls:\n>          sharp). The minimum will often be zero (meaning infinity), and the\n>          maximum value defines the closest focus position.\n>  \n> +        On startup, the IPA will move the lens position to the default value of\n\nI would write \"the camera\", not \"the IPA\", as IPA modules are internal\nto libcamera, and this documentation relates to the public API. Writing\nthis made me realize we mention \"IPA\" in two locations in this file\nalready. I'll fix it.\n\nI would like to also document the default value for AfMode, as that also\ninfluences the default focus lens behaviour and is related to\nLensPosition. Actually, reading the whole documentation for the\nLensPosition control, I think AfMode is what we need to address.\nLensPosition already states\n\n        The default value of the control should indicate a good general position\n        for the lens, often corresponding to the hyperfocal distance (the\n        closest position for which objects at infinity are still acceptably\n        sharp). The minimum will often be zero (meaning infinity), and the\n        maximum value defines the closest focus position.\n\nThere shouldn't be a need to state that the default value is the default\nvalue :-) I'll send a proposal in reply to this e-mail.\n\n> +        this control. This can be overridden by the application providing an\n> +        alternative value though this control, or setting an appropriate AF mode\n> +        with controls::AfMode.\n> +\n>          \\todo Define a property to report the Hyperfocal distance of calibrated\n>          lenses.\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id E60F5C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  2 Jun 2023 06:09:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 78D33626F8;\n\tFri,  2 Jun 2023 08:09:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 06D4E61EA5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  2 Jun 2023 08:09:19 +0200 (CEST)","from pendragon.ideasonboard.com (om126156168104.26.openmobile.ne.jp\n\t[126.156.168.104])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 86324A39;\n\tFri,  2 Jun 2023 08:08:55 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685686160;\n\tbh=he3tpFgAfrLhnw6B22zSfUdZjDbd4Lky5Qu/t7fbeKo=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=jXZhxcLPZYLs85P1hKJSwd+NkKUP5I7nDBo0TUWlCGwN7wwGdVbg9MZAFUVM8EwCI\n\tZEgsqwDFL25j3IZtsyYDWIlnE5icy7jlhKj0R3IgaSGMp7rOz06Hqv6ZeV4JHP2d8F\n\t6B1Cu6LFiHtb3wOdWjYLbCXJA4s2UWuO08XTA1E0YblHL295eCSE2I1GU8T+NwuX1L\n\twL/9LfpoMZxOUbXQArKAVKo/cR6jcd+Rhhc8tNe60KoLIcVgIM8L/LgJuwwDaxY+uH\n\tW5YzGFNJCI+hVBmuIzLmU0wUeoewmebprRh4CUYOYFYnbnA8oZDk188Afk5dSkpDtn\n\tHEmhViGVunwzw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685686136;\n\tbh=he3tpFgAfrLhnw6B22zSfUdZjDbd4Lky5Qu/t7fbeKo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=UDKwEAfFW1J2HFzjAf0nv8mDGL91jKVx5h3/+uYjfReq9pEcClfOhhbgrfs52TU2h\n\tVWxflLGJnhGgRKl2zTXv6vssMzCxDM75IA98H64KrSZTpwlYKpVRS947VkBP5LbXO9\n\t0jUpad9Y9Aav8TLGlxD8gdc5+9NX4Fg7oDOMS6nM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"UDKwEAfF\"; dkim-atps=neutral","Date":"Fri, 2 Jun 2023 09:09:16 +0300","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<20230602060916.GP22609@pendragon.ideasonboard.com>","References":"<20230601095630.25443-1-naush@raspberrypi.com>\n\t<20230601095630.25443-2-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230601095630.25443-2-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH v1 1/3] libcamera: controls: Define a\n\tdefault lens position behaviour","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"nick.hollinghurst@raspberrypi.com, libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]