summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 1215bdb8..16380d20 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -1242,13 +1242,19 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
const ControlList &sensorControls = action.sensorControls;
delayedCtrls_->push(sensorControls);
+ CameraLens *focusLens = cio2_.sensor()->focusLens();
+ if (!focusLens)
+ break;
+
const ControlList lensControls = action.lensControls;
+ if (!lensControls.contains(V4L2_CID_FOCUS_ABSOLUTE))
+ break;
+
const ControlValue &focusValue =
lensControls.get(V4L2_CID_FOCUS_ABSOLUTE);
- CameraLens *focusLens = cio2_.sensor()->focusLens();
- if (focusLens && !focusValue.isNone())
- focusLens->setFocusPostion(focusValue.get<int32_t>());
+ focusLens->setFocusPostion(focusValue.get<int32_t>());
+
break;
}
case ipa::ipu3::ActionParamFilled: {