[libcamera-devel] [RFC PATCH 3/7] pipeline: rkisp1: transparently pass lens controls from the IPA to the lens

Matthias Fend matthias.fend at emfend.at
Thu Feb 2 12:12:48 CET 2023


Instead of parsing the values in the v4l2 controls from the IPA and passing
them to CameraLens (where they are then converted back to v4l2 controls),
the IPA v4l2 controls are reused directly.

Signed-off-by: Matthias Fend <matthias.fend at emfend.at>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index d4fbcf4b..e4f328cb 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -403,14 +403,8 @@ void RkISP1CameraData::setSensorControls([[maybe_unused]] unsigned int frame,
 	delayedCtrls_->push(sensorControls);
 
 	CameraLens *lens = sensor_->focusLens();
-	if (!lens)
-		return;
-
-	if (lensControls.contains(V4L2_CID_FOCUS_ABSOLUTE)) {
-		const ControlValue &focusValue = lensControls.get(V4L2_CID_FOCUS_ABSOLUTE);
-
-		lens->setFocusPosition(focusValue.get<int32_t>());
-	}
+	if (lens)
+		lens->setSubdevControls(lensControls);
 }
 
 void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &metadata)
-- 
2.25.1



More information about the libcamera-devel mailing list