[libcamera-devel] [PATCH v2 3/4] src: ipa: raspberrypi: Improve behaviour when AE disabled

David Plowman david.plowman at raspberrypi.com
Thu Nov 26 13:32:02 CET 2020


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 <david.plowman at raspberrypi.com>
---
 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<bool>() == 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<int32_t>());
 
-			/* For the manual values to take effect, AGC must be unpaused. */
-			if (agc->IsPaused())
-				agc->Resume();
-
 			libcameraMetadata_.set(controls::ExposureTime, ctrl.second.get<int32_t>());
 			break;
 		}
@@ -526,10 +523,6 @@ void IPARPi::queueRequest(const ControlList &controls)
 			ASSERT(agc);
 			agc->SetFixedAnalogueGain(ctrl.second.get<float>());
 
-			/* For the manual values to take effect, AGC must be unpaused. */
-			if (agc->IsPaused())
-				agc->Resume();
-
 			libcameraMetadata_.set(controls::AnalogueGain,
 					       ctrl.second.get<float>());
 			break;
-- 
2.20.1



More information about the libcamera-devel mailing list