[libcamera-devel,4/8] pipeline: rkisp1: Add basic AF controls to the supported controls list
diff mbox series

Message ID 20220630143543.39599-5-dse@thaumatec.com
State Superseded
Headers show
Series
  • ipa: rkisp1: Add autofocus algorithm
Related show

Commit Message

Daniel Semkowicz June 30, 2022, 2:35 p.m. UTC
This will expose the AF controls and will allow controlling them using
the top level API.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 7ee80192..99d66b1d 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -958,10 +958,12 @@  int PipelineHandlerRkISP1::createCamera(MediaEntity *sensor)
 	std::unique_ptr<RkISP1CameraData> data =
 		std::make_unique<RkISP1CameraData>(this, &mainPath_, &selfPath_);
 
-	ControlInfoMap::Map ctrls;
-	ctrls.emplace(std::piecewise_construct,
-		      std::forward_as_tuple(&controls::AeEnable),
-		      std::forward_as_tuple(false, true));
+	ControlInfoMap::Map ctrls({
+		{ &controls::AeEnable, ControlInfo(false, true) },
+		{ &controls::AfMode, ControlInfo(controls::AfModeValues) },
+		{ &controls::AfTrigger, ControlInfo(controls::AfTriggerValues) },
+		{ &controls::AfPause, ControlInfo(controls::AfPauseValues) }
+	});
 
 	data->controlInfo_ = ControlInfoMap(std::move(ctrls),
 					    controls::controls);