[libcamera-devel] [PATCH v2 2/2] libcamera: pipeline: raspberrypi: Update ControlInfos after sensor format change

Naushir Patuck naush at raspberrypi.com
Wed Apr 14 10:51:24 CEST 2021


Hi David,

Thank you for your work.

On Tue, 6 Apr 2021 at 11:41, David Plowman <david.plowman at raspberrypi.com>
wrote:

> 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>

---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index f22e286e..bbcc15ec 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -608,6 +608,12 @@ 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.
> +        */
> +       data->sensor_->updateControlInfos();
> +
>         LOG(RPI, Info) << "Sensor: " << camera->id()
>                        << " - Selected mode: " << sensorFormat.toString();
>
> --
> 2.20.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20210414/eb467dd3/attachment.htm>


More information about the libcamera-devel mailing list