[libcamera-devel] [PATCH v3 2/2] libcamera: pipeline: raspberrypi: Update ControlInfos after sensor format change
David Plowman
david.plowman at raspberrypi.com
Wed May 5 15:53:08 CEST 2021
The Raspberry Pi pipeline handler does not update the sensor format
using CameraSensor::setFormat, so it must manually force the update of
the associated ControlInfos.
Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
Reviewed-by: Naushir Patuck <naush at raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 2a917455..6288108d 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -608,6 +608,13 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
if (ret)
return ret;
+ /*
+ * The control ranges associated with the sensor may need updating
+ * after a format change.
+ * \todo Use the CameraSensor::setFormat API instead.
+ */
+ data->sensor_->updateControlInfo();
+
LOG(RPI, Info) << "Sensor: " << camera->id()
<< " - Selected mode: " << sensorFormat.toString();
--
2.20.1
More information about the libcamera-devel
mailing list