From 82e4a9802608f5d3d36958985afffafc4a80d24e Mon Sep 17 00:00:00 2001 From: David Plowman Date: Wed, 5 May 2021 14:53:08 +0100 Subject: libcamera: pipeline: raspberrypi: Update ControlInfoMap after sensor format change The Raspberry Pi pipeline handler does not update the sensor format using CameraSensor::setFormat(), so it must manually force the update of the associated ControlInfoMap. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libcamera/pipeline') diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index b2256493..82ae0482 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(); -- cgit v1.2.1