From patchwork Fri Nov 26 00:31:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 14787 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 BFF45C324F for ; Fri, 26 Nov 2021 00:31:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7694C60490; Fri, 26 Nov 2021 01:31:36 +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="oeYwmFF/"; dkim-atps=neutral Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9D6A260491 for ; Fri, 26 Nov 2021 01:31:30 +0100 (CET) Received: by mail-wr1-x434.google.com with SMTP id d24so15035815wra.0 for ; Thu, 25 Nov 2021 16:31:30 -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=PtZtuMpNPvR4zJxo934IO/r140cDWkr6TO5+zilQ0qU=; b=oeYwmFF/1W4anK5mIK7EOGLnE1QOswf9CX+qWt7+yFHhWgyL+NkG2RP3BTCDRBSorB MiH55fubfzrmu/NFl0/s+z4ZNz3Uc6T3xgnLi0kkSvIjYo1sDiv5qqCwCoFhaRH8Fqxx dgGniQdmfat34GLKngfAz5HrHfGImb0jJ2QsKq9SlwbyTxrbKrnE3H/NKyit3cnBDayU J9rWEg1SflfrPuDBQPdIHgaxIvKeeR9mxyatGtmMDHPrlI1FI/0pKslXYgHL9SoNxUwA Af6lgJ02LtzR8TUZF6dL4RF6rA5PT6KlE2Sf/FWGL55mIbLMZASW95ePXmn1oljFtjz7 WLTA== 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=PtZtuMpNPvR4zJxo934IO/r140cDWkr6TO5+zilQ0qU=; b=nZsr4CNVj/1KirFCzeKa71WAHvgeIYfHg3xsk0BGXSPt+COdxEhm7KAyL9jKblMwRo tbnbfxufWa/PX1K+J2XVuDHc3netuDNmdfc8CRErU7e3vTvGzfUNRKfLxYIhXzOuEK7f Sb407lzOvS6T3tLBnD6PFvYlo71PK/Hu+rDJ4aIbb0gIXz4r+bnrj+sZVDeUGhTFsIlS BsqlacaelUS5LKD8QUUWrXznmh6U1oiJMXJebjyA5AYYgYx4Mhm97hgqsfQj0+FYVdsw nbCtJH1WzF3B/4Y0nltl4/iR5jT9TthIqEQQnybRTGeaSiem/c0RLJbJHorQ5ONPWRZO 3mfw== X-Gm-Message-State: AOAM531xXVLuuBTGKXh+d1JtHqD7oE32/qMNoIuFgPbnd4TqEn2d9grJ T6ZDZ8WSx+jxZWQc1MF1GsoiAJodADk= X-Google-Smtp-Source: ABdhPJykaSBCktMhps4b4TPBDk32AcY47Zt5Io6iHb4MPBzbt0UtwGvxCYOwTP1EmWHTXv7A9NrF7w== X-Received: by 2002:a5d:584c:: with SMTP id i12mr10803741wrf.95.1637886690460; Thu, 25 Nov 2021 16:31:30 -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 b188sm4381455wmd.45.2021.11.25.16.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 16:31:30 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Fri, 26 Nov 2021 00:31:17 +0000 Message-Id: <20211126003118.42356-5-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211126003118.42356-1-djrscally@gmail.com> References: <20211126003118.42356-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 4/5] 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. Signed-off-by: Daniel Scally --- src/ipa/ipu3/ipu3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 6c76193a..abdcd69d 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -173,6 +173,7 @@ private: uint32_t gain_; uint32_t minGain_; uint32_t maxGain_; + uint32_t focus_; utils::Duration lineDuration_; @@ -671,6 +672,9 @@ void IPAIPU3::setControls(unsigned int frame) ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast(gain_)); op.sensorControls = ctrls; + focus_ = context_.frameContext.af.focus; + op.lensControls.set(V4L2_CID_FOCUS_ABSOLUTE, static_cast(focus_)); + queueFrameAction.emit(frame, op); }