From patchwork Mon Jan 31 22:33:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15314 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 9445BBF415 for ; Mon, 31 Jan 2022 22:33:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 51A51609F1; Mon, 31 Jan 2022 23:33:52 +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="dQ5aFXyz"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B9724609C6 for ; Mon, 31 Jan 2022 23:33:49 +0100 (CET) Received: by mail-wm1-x32e.google.com with SMTP id m13-20020a05600c3b0d00b00353951c3f62so249044wms.5 for ; Mon, 31 Jan 2022 14:33:49 -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=H1K4rh3XrDJdstO3mn49jQZawu6BU349Dkl3P/8gIu8=; b=dQ5aFXyzsFf3fyIzko8eP0KPZbMUlcVzA4b7O4i6nC7aKdxfPzzNdTa4XjJEzVm7QI s6v5j51Uc0lsM49UbXBiQcpU0r+MWhvC2Tex+gOz9Pt3cwCJgRgN4DfqQl0ZDoYoI1w7 5vnIZdQGCAwakhSYI1U49hYpTONVh2xT17b7GJtkE+9JkR3N6zHFkox+SbI6mTcK4swg MHTklXR2UFeiP2q6iK2CGnGkAzzyTCTl6QXscQzpFwUbE/L+IUKG5X3QbTyQ5mFoZqLf KPJagKj82tFnQwRf+Eo0QhQZusuVRMMaVYlxQgvxLmQKJcwzFWvdYQy+Ok+wyroDWsow zQEQ== 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=H1K4rh3XrDJdstO3mn49jQZawu6BU349Dkl3P/8gIu8=; b=QRwDltn0SKxh5OTo4YdliLoGMgRT6AKs47RQT+0EQpe0akF2OtbmOTUDkB/munkckO D5o0yxOqhx1Rk8KdkjcSFNuR2lbMPfuTbdPeJCEoNToomLyFNV7j9d3OFqFm91H1jjW/ i9Sy+de4xuV/RjmMqSxJmdI/LwOVdvw4hFtR37F1dwtFSBvga3Pej6grU9Tg38/ntoMf XEk34Tc1hfVfDZ8sKmr9zaaLHPOz3pIxH6cklbcPRDjScjMJyMEGJegeUYSPTsb743UA nOcXZC70qTiDB8to16La2lCULnzV67gXBaacXL8gaKs+pWSbgu38Wnueu/dj2n5MfU7D B7Gw== X-Gm-Message-State: AOAM5306iHLdk1apjBNAXcpUE4BNI8u4woxUqxzGhMNC0XOTIHD7uBqV lMQ2/fZjHKN3O5mD0TZX+GAguHcg/Sc= X-Google-Smtp-Source: ABdhPJwPg9o5MNj3SC3CQKlKpQ77l5y8Swvi0aqeAGDTEXFc8FPBIlfPaPjOIyEl85toDTgpny8ZXQ== X-Received: by 2002:a05:600c:4fc7:: with SMTP id o7mr9979519wmq.184.1643668429506; Mon, 31 Jan 2022 14:33:49 -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 q2sm6986740wrw.14.2022.01.31.14.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 14:33:49 -0800 (PST) From: Daniel Scally To: libcamera-devel@lists.libcamera.org Date: Mon, 31 Jan 2022 22:33:30 +0000 Message-Id: <20220131223330.61563-10-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220131223330.61563-1-djrscally@gmail.com> References: <20220131223330.61563-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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 --- 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); }