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

Message ID 20230202111252.3366729-4-matthias.fend@emfend.at
State New
Headers show
Series
  • add support for more complex optics
Related show

Commit Message

Matthias Fend Feb. 2, 2023, 11:12 a.m. UTC
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@emfend.at>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Patch
diff mbox series

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)