summaryrefslogtreecommitdiff
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
commit53c8032efd3db0644a4c3695b64be771a56b084f (patch)
tree7102d180d38e03e69843f6f851ff60dc6f9f91ce
parent076a58aafbbb6e138d0842c44dd6b6df77cf1be9 (diff)
pipeline: raspberrypi: vc4: Use the CameraSensor embedded data API
Now that the CameraSensor class implements support for embedded data, use the corresponding API instead of retrieving the embedded data format from the subdev manually. 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>
-rw-r--r--src/libcamera/pipeline/rpi/vc4/vc4.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
index b0a5c31a..eb32f462 100644
--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp
+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp
@@ -573,9 +573,7 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi
* supports it.
*/
if (sensorMetadata_) {
- V4L2SubdeviceFormat embeddedFormat;
-
- sensor_->device()->getFormat(1, &embeddedFormat);
+ V4L2SubdeviceFormat embeddedFormat = sensor_->embeddedDataFormat();
V4L2DeviceFormat format{};
format.fourcc = V4L2PixelFormat(V4L2_META_FMT_SENSOR_DATA);
format.planes[0].size = embeddedFormat.size.width * embeddedFormat.size.height;