From patchwork Thu Mar 3 23:49:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15416 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A166EBE08A for ; Thu, 3 Mar 2022 23:50:24 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 63DFD6117C; Fri, 4 Mar 2022 00:50:24 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="noxKmMvh"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 40F7E61185 for ; Fri, 4 Mar 2022 00:50:19 +0100 (CET) Received: by mail-wm1-x332.google.com with SMTP id l2-20020a7bc342000000b0037fa585de26so4609116wmj.1 for ; Thu, 03 Mar 2022 15:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xyaLrzB7F7z64em4nulRSPztY9ha3Adj1IEIasZ2qeM=; b=noxKmMvhdrMvAqmOaJ4fHQaBn3HXrGsPkKlj4Eu3MmkB76t3YDbaKsWFUcV4sgxDil Rd9FWvb6teDVU8G1ic1C7WIjnLpe+J8xE+Q9XDPF5vkZkbQBTg5fqRKxtrVcA3ZtwQf2 7ZQ52Tx5CECOA4L6kcHC/aEN8IK4e5/Ppyof3EWSD9PyTHpasJQWAGW+go5y4agD7pD6 RN3YR7xX9MS+HrxLn2EC213b6NaQIhNuIjSskTPPS1kNReBBCMt7TPUUIedX8Ml6eHR9 s17J4MBIbG3VlcVIPyxSJaciY4KqAepkCQI/sxglPKxJMjk7zt8SQNReHeWViPndMreS xn5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xyaLrzB7F7z64em4nulRSPztY9ha3Adj1IEIasZ2qeM=; b=5UUnWlc59Zo6zdNwCr/giwaU1lmQXd6c4tbOLMrAOQ+2YzyzJQJm6AZxU/McJszLMY 9xdXWT2+HOOA+ofmipcl24xwGQxUndZQ8W8XMkxt1G1i4iDmTGln/6dokvcXZr4/krOC +7rMEbNJAlahC/fHtOsacXZ+27IQedV4JjrGHQxKzZFpVreSdEKeY1YR5avOmXDUQkZA joDCujoALNvJzIwKswJUTuJ08hNGOTVXRy58GYGkeVYWuE+dvQbK/QpW5l2wjEf6EMUz hv9D/Rx5sbnla9KiPKkK9UzBOaO4q0Awh1wxeOgjIAJXUaZGaSuSXmt8R/uMyt2ZgILP wiHg== X-Gm-Message-State: AOAM532z4Z1qp9eTLlJ6vKrNqnaQyNhGOrocyeFcXLSWTQwChDJY/Rs6 HRP3rnyrTdW9EKYQIcxU9in3GvfT3SbIsQ== X-Google-Smtp-Source: ABdhPJzNcCWwn+b0N6IG1TPQJPDWsUOsQALcMlY6fxNARxRmAmCng35ePn0dypDV1fwRhkvOfCdpvQ== X-Received: by 2002:a1c:1907:0:b0:380:f6ec:4daa with SMTP id 7-20020a1c1907000000b00380f6ec4daamr5821262wmz.50.1646351419039; Thu, 03 Mar 2022 15:50:19 -0800 (PST) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id y4-20020adff144000000b001f022290737sm3079779wro.6.2022.03.03.15.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 15:50:18 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Thu, 3 Mar 2022 23:49:56 +0000 Message-Id: <20220303234956.1463551-10-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220303234956.1463551-1-djrscally@gmail.com> References: <20220303234956.1463551-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 9/9] ipa: ipu3: Send lens controls to pipeline handler X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Pick up the focus value from the AF algorithm and send lens controls along in the frame context. Reviewed-by: Laurent Pinchart Signed-off-by: Daniel Scally Reviewed-by: Jean-Michel Hautbois --- Changes in v5: - None Changes in v4: - Got rid of the focus variable (Laurent) Changes in v3: - Replaced the new focus_ member with a local variable. src/ipa/ipu3/ipu3.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index e539d875..b8c4b30f 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -704,6 +704,11 @@ void IPAIPU3::setControls(unsigned int frame) ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast(gain_)); op.sensorControls = ctrls; + ControlList lensCtrls(lensCtrls_); + lensCtrls.set(V4L2_CID_FOCUS_ABSOLUTE, + static_cast(context_.frameContext.af.focus)); + op.lensControls = lensCtrls; + queueFrameAction.emit(frame, op); }