summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-02-29 02:32:34 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2024-06-25 14:38:48 +0300
commit47be1f6afcd4d4a88de156fd310c5f029b296de8 (patch)
treed109f3ab8a2b8ede0245afa79bc672c8a1f8382b /src/libcamera/pipeline/rpi/common/pipeline_base.cpp
parent83d28df00874e824b6bb45301d64787fa0c34fdf (diff)
pipeline: raspberrypi: common: Configure sensor embedded data
Now that the CameraSensor class implements support for embedded data, use the corresponding API to enable or disable the embedded data stream. This changes requires sensor kernel drivers that implement the upstream embedded data API based on V4L2 streams. As the API is under development and not merged in the upstream kernel yet, this breaks compatibility with the downstream Raspberry Pi kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rpi/common/pipeline_base.cpp')
-rw-r--r--src/libcamera/pipeline/rpi/common/pipeline_base.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index 4f56bd33..496f35cc 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -530,6 +530,18 @@ int PipelineHandlerBase::configure(Camera *camera, CameraConfiguration *config)
return ret;
/*
+ * Configure embedded data on the sensor. Only check for errors when
+ * enabling embedded data, as some sensors don't support disabling it,
+ * and Unicam will simply drop the embedded data packets if we don't
+ * capture them.
+ */
+ ret = data->sensor_->setEmbeddedDataEnabled(data->sensorMetadata_);
+ if (ret && data->sensorMetadata_) {
+ LOG(RPI, Error) << "Unable to enable embedded data: " << ret;
+ return ret;
+ }
+
+ /*
* Platform specific internal stream configuration. This also assigns
* external streams which get configured below.
*/