From 02eea043f2a4d976c2c40e5bc382096c3a536632 Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 18 Oct 2023 15:05:54 +0100 Subject: ipa: rpi: agc: Make AGC controls affect all channels We need to be able to do things like enable/disable AGC for all the channels, so most of the AGC controls are updated to be applied to all channels. There are a couple of exceptions, such as setting explicit shutter/gain values, which apply only to channel 0. Signed-off-by: David Plowman Signed-off-by: Naushir Patuck Reviewed-by: Naushir Patuck Signed-off-by: Kieran Bingham --- src/ipa/rpi/common/ipa_base.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ipa/rpi/common') diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 2583c622..a1fec3aa 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -702,9 +702,9 @@ void IpaBase::applyControls(const ControlList &controls) } if (ctrl.second.get() == false) - agc->disableAuto(0); + agc->disableAuto(); else - agc->enableAuto(0); + agc->enableAuto(); libcameraMetadata_.set(controls::AeEnable, ctrl.second.get()); break; @@ -773,7 +773,7 @@ void IpaBase::applyControls(const ControlList &controls) int32_t idx = ctrl.second.get(); if (ConstraintModeTable.count(idx)) { - agc->setConstraintMode(0, ConstraintModeTable.at(idx)); + agc->setConstraintMode(ConstraintModeTable.at(idx)); libcameraMetadata_.set(controls::AeConstraintMode, idx); } else { LOG(IPARPI, Error) << "Constraint mode " << idx @@ -793,7 +793,7 @@ void IpaBase::applyControls(const ControlList &controls) int32_t idx = ctrl.second.get(); if (ExposureModeTable.count(idx)) { - agc->setExposureMode(0, ExposureModeTable.at(idx)); + agc->setExposureMode(ExposureModeTable.at(idx)); libcameraMetadata_.set(controls::AeExposureMode, idx); } else { LOG(IPARPI, Error) << "Exposure mode " << idx @@ -836,12 +836,12 @@ void IpaBase::applyControls(const ControlList &controls) switch (mode) { case controls::FlickerOff: - agc->setFlickerPeriod(0, 0us); + agc->setFlickerPeriod(0us); break; case controls::FlickerManual: - agc->setFlickerPeriod(0, flickerState_.manualPeriod); + agc->setFlickerPeriod(flickerState_.manualPeriod); break; @@ -875,7 +875,7 @@ void IpaBase::applyControls(const ControlList &controls) * first, and the period updated after, or vice versa. */ if (flickerState_.mode == controls::FlickerManual) - agc->setFlickerPeriod(0, flickerState_.manualPeriod); + agc->setFlickerPeriod(flickerState_.manualPeriod); break; } -- cgit v1.2.1