summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/common
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2023-10-18 15:05:54 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-10-24 14:11:33 +0100
commit02eea043f2a4d976c2c40e5bc382096c3a536632 (patch)
tree077095349fcb1d29ac8de1eae6e591a7ecd45937 /src/ipa/rpi/common
parent78a2d00c79b22445b5ad0f57dda3947d9bcd005b (diff)
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 <david.plowman@raspberrypi.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi/common')
-rw-r--r--src/ipa/rpi/common/ipa_base.cpp14
1 files changed, 7 insertions, 7 deletions
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<bool>() == false)
- agc->disableAuto(0);
+ agc->disableAuto();
else
- agc->enableAuto(0);
+ agc->enableAuto();
libcameraMetadata_.set(controls::AeEnable, ctrl.second.get<bool>());
break;
@@ -773,7 +773,7 @@ void IpaBase::applyControls(const ControlList &controls)
int32_t idx = ctrl.second.get<int32_t>();
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<int32_t>();
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;
}