[libcamera-devel] [PATCH 4/5] ipa: ipu3: Send lens controls to pipeline handler

Daniel Scally djrscally at gmail.com
Fri Nov 26 01:31:17 CET 2021


Pick up the focus value from the AF algorithm and send lens controls
along in the frame context.

Signed-off-by: Daniel Scally <djrscally at gmail.com>
---
 src/ipa/ipu3/ipu3.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index 6c76193a..abdcd69d 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -173,6 +173,7 @@ private:
 	uint32_t gain_;
 	uint32_t minGain_;
 	uint32_t maxGain_;
+	uint32_t focus_;
 
 	utils::Duration lineDuration_;
 
@@ -671,6 +672,9 @@ void IPAIPU3::setControls(unsigned int frame)
 	ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));
 	op.sensorControls = ctrls;
 
+	focus_ = context_.frameContext.af.focus;
+	op.lensControls.set(V4L2_CID_FOCUS_ABSOLUTE, static_cast<int32_t>(focus_));
+
 	queueFrameAction.emit(frame, op);
 }
 
-- 
2.25.1



More information about the libcamera-devel mailing list