From patchwork Thu Nov 26 12:32:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 10504 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 3BB5ABE176 for ; Thu, 26 Nov 2020 12:32:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 09A8363461; Thu, 26 Nov 2020 13:32:17 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="t63TEj00"; dkim-atps=neutral Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C7B9363463 for ; Thu, 26 Nov 2020 13:32:13 +0100 (CET) Received: by mail-ej1-x630.google.com with SMTP id oq3so2679690ejb.7 for ; Thu, 26 Nov 2020 04:32:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UvoJ3Ey4fzjxOq8S+86z4FWYBiIf60CMkrI83WlclDs=; b=t63TEj000IgAA9LZTgC1jRxJOaMa7Pix6NXnjSgvQOpfVpj7UjiP2nlseSSnQAAnaE dylUycMAU8M2EFNNvIj/4n7yAIHChz5FPvD1sVsG9fGFohegnUkSOU2Otqbnakv3oDks DxqbyMVlxTO5AxVa6ifLlZ9vV5mckzKLT+Ju3CRhUdHFGHvoKIajS4Z414Q1i2tU194f LZCiVyR6mCk4o5SXCDsdMK/tLx8gVTRRggtCo81yzJlXs+SO69i/Vv1Xhdp+XX3AUTaW fKMyAZf/njwNcRa2TQnkACYYOIrFDEhYnty4m7W7HU24CELmfrgkQRF3Qb1ceehfN0Mj L84w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UvoJ3Ey4fzjxOq8S+86z4FWYBiIf60CMkrI83WlclDs=; b=EPVCZAhJIwM5rr1H6BefOHYwr+t6igXa/XehSub/2KCY+ADC2qmRw8etugZmL9XkUD reycRLOi7Hkz/7Ouswq0WScTa4Ifwm1oor5s0JUJhgbf0wOOG0g2VBilEvx59tacW05c aS4WNOq21fTE8vwhT7OnYoHpvVnhWOlpBUFCdqZX7OE7H93rZupIIt55lXZOhw5Ci770 udr4OS+tObwzrxOL0N9fytJcrND2vrgCFdI4nGYLHHPnTIWDLIMsA3y4ycPCTCtHxg2E QEA7kViESw30TDTy2IBwyySQFZmkgGqoE8+EbNGxKSwnZdCxQyw78XXYGc5S74be1hMe RxbQ== X-Gm-Message-State: AOAM532qjcRU/ghEcHAORWYn+4keErvuBJBZ2j0twBMdCrYbCtXweHYn SGVFahyP8RV1IKfN+7T5ZVX8NBLHrBhazRI/ X-Google-Smtp-Source: ABdhPJz8rQqzvoZDkvDcwRvGWbl2C/bXH/YNowqGZ1iqrTN6J+PeXvS/4pU3cPgqYM7v42/63FRt1Q== X-Received: by 2002:a17:906:b003:: with SMTP id v3mr2483187ejy.290.1606393932879; Thu, 26 Nov 2020 04:32:12 -0800 (PST) Received: from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72]) by smtp.gmail.com with ESMTPSA id u5sm3064354edp.5.2020.11.26.04.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 04:32:12 -0800 (PST) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Thu, 26 Nov 2020 12:32:02 +0000 Message-Id: <20201126123203.19105-4-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201126123203.19105-1-david.plowman@raspberrypi.com> References: <20201126123203.19105-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/4] src: ipa: raspberrypi: Improve behaviour when AE disabled 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" AE/AGC "disabled" is now handled better by the algorithm for itself, so it no longer needs to be "resumed" before setting fixed shutter or gain values. Signed-off-by: David Plowman Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/raspberrypi/raspberrypi.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp index 9853a343..e437c626 100644 --- a/src/ipa/raspberrypi/raspberrypi.cpp +++ b/src/ipa/raspberrypi/raspberrypi.cpp @@ -495,6 +495,7 @@ void IPARPi::queueRequest(const ControlList &controls) case controls::AE_ENABLE: { RPiController::Algorithm *agc = controller_.GetAlgorithm("agc"); ASSERT(agc); + if (ctrl.second.get() == false) agc->Pause(); else @@ -512,10 +513,6 @@ void IPARPi::queueRequest(const ControlList &controls) /* This expects units of micro-seconds. */ agc->SetFixedShutter(ctrl.second.get()); - /* For the manual values to take effect, AGC must be unpaused. */ - if (agc->IsPaused()) - agc->Resume(); - libcameraMetadata_.set(controls::ExposureTime, ctrl.second.get()); break; } @@ -526,10 +523,6 @@ void IPARPi::queueRequest(const ControlList &controls) ASSERT(agc); agc->SetFixedAnalogueGain(ctrl.second.get()); - /* For the manual values to take effect, AGC must be unpaused. */ - if (agc->IsPaused()) - agc->Resume(); - libcameraMetadata_.set(controls::AnalogueGain, ctrl.second.get()); break;