[{"id":25145,"web_url":"https://patchwork.libcamera.org/comment/25145/","msgid":"<20220928065205.vn2q6tzegyr2ybdo@uno.localdomain>","date":"2022-09-28T06:52:05","subject":"Re: [libcamera-devel] [PATCH 1/3] ipu3: Registering AF controls","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kate\n\nOn Fri, Sep 16, 2022 at 06:37:11PM +0800, Kate Hsuan via libcamera-devel wrote:\n> Regitering AF controls, including AF_MODE and LENS_POSITION.\n\nRegistering\n\n>\n> Signed-off-by: Kate Hsuan <hpa@redhat.com>\n> ---\n>  src/ipa/ipu3/ipu3.cpp                | 4 ++++\n>  src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++\n>  2 files changed, 6 insertions(+)\n>\n> diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\n> index e37b2fa0..ac0c42a7 100644\n> --- a/src/ipa/ipu3/ipu3.cpp\n> +++ b/src/ipa/ipu3/ipu3.cpp\n> @@ -277,6 +277,10 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,\n>  \t\t\t\t\t\t\t       frameDurations[1],\n>  \t\t\t\t\t\t\t       frameDurations[2]);\n>\n> +\t/* Af controls */\n> +\tcontrols[&controls::AfMode] = ControlInfo(controls::AfModeValues);\n> +\tcontrols[&controls::LensPosition] = ControlInfo(0.0f, 1.0f, 0.5f);\n> +\n>  \t*ipaControls = ControlInfoMap(std::move(controls), controls::controls);\n>  }\n>\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 93219a6c..2e35b9bc 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -43,6 +43,8 @@ LOG_DEFINE_CATEGORY(IPU3)\n>\n>  static const ControlInfoMap::Map IPU3Controls = {\n>  \t{ &controls::draft::PipelineDepth, ControlInfo(2, 3) },\n> +\t{ &controls::AfMode, ControlInfo(controls::AfModeValues) },\n> +\t{ &controls::LensPosition, ControlInfo(0.0f, 1.0f, 0.5f) }\n\nIsn't this a duplicate ?\n\nThe pipeline handler takes the ipa registered controls and adds them\nto the camera's controls\n\nint PipelineHandlerIPU3::updateControls(IPU3CameraData *data)\n{\n        ..\n\n\n\t/* Add the IPA registered controls to list of camera controls. */\n\tfor (const auto &ipaControl : data->ipaControls_)\n\t\tcontrols[ipaControl.first] = ipaControl.second;\n}\n\nI think it's enough to register the controls on the IPA side maybe ?\n\nThanks\n  j\n\n\n>  };\n>\n>  class IPU3CameraData : public Camera::Private\n> --\n> 2.37.3\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 7B951C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 28 Sep 2022 06:52:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B5FA962290;\n\tWed, 28 Sep 2022 08:52:09 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 89EA661F78\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 28 Sep 2022 08:52:07 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id CE2A220009;\n\tWed, 28 Sep 2022 06:52:06 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664347929;\n\tbh=W2NCamCh7eWwXpD4L1kYjQXff6ReuOx6SR3ii5vpo6o=;\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=A/tLMfe3WFtIF3+z2t2k6OqwdA7NU2IJJ/Fcvw3AARa5Ldz7hWoMi0aBN80+J+cty\n\t6aAMLF4mrZOThP3+0wk4DSJ2McGbx2c8RgXeC0lNyWT/TWobpq2Zo2NZe9FBRYvrGu\n\tPnPpPZpRCEib5qeKzay4OLVdqP3var1j8uOAR9Ki/Efepg5uqf3SHmx9SlZYP4jQaC\n\tbz6IYw7mq3nowBB9iQz93sIRM1rIhgeyE8sGCp0kh5fxKDgT+Y/M5GXbmwo9qyDttp\n\th09PpWi1kXPOQ2C/QmeoEFG1FJv1ls6ORxnZf2MkY+EIrXEtHk4hCMrXXuUK+9X3Au\n\tItcxDcZWmFbhA==","Date":"Wed, 28 Sep 2022 08:52:05 +0200","To":"Kate Hsuan <hpa@redhat.com>","Message-ID":"<20220928065205.vn2q6tzegyr2ybdo@uno.localdomain>","References":"<20220916103713.21132-1-hpa@redhat.com>\n\t<20220916103713.21132-2-hpa@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220916103713.21132-2-hpa@redhat.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] ipu3: Registering AF controls","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]