[PATCH v1] ipa: mojom: Add sensor ID to IPACameraSensorInfo

Celine Laurencin celine.laurencin at nxp.com
Tue Dec 17 15:33:35 CET 2024


The sensor ID may be required from IPA to be able to select
specific tuning which can differ between sensors of the same model.
For instance, sensors from the same model may have different lens for
which different tuning is required.

Hence this patch provides the sensor ID part of the image sensor
characteristics IPACameraSensorInfo as defined in core.mojom IPA
interface.

Signed-off-by: Celine Laurencin <celine.laurencin at nxp.com>
---
 include/libcamera/ipa/core.mojom       | 9 +++++++++
 src/libcamera/sensor/camera_sensor.cpp | 1 +
 2 files changed, 10 insertions(+)

diff --git a/include/libcamera/ipa/core.mojom b/include/libcamera/ipa/core.mojom
index bce79724..0ff643d2 100644
--- a/include/libcamera/ipa/core.mojom
+++ b/include/libcamera/ipa/core.mojom
@@ -134,6 +134,14 @@ module libcamera;
  * sensor model.
  */
 
+/**
+ * \var IPACameraSensorInfo::id
+ * \brief The image sensor id name
+ *
+ * The sensor id name is a free-formed string that uniquely identifies the
+ * sensor in the system. The ID satisfies the requirements to be used as a camera ID.
+ */
+
 /**
  * \var IPACameraSensorInfo::bitsPerPixel
  * \brief The number of bits per pixel of the image format produced by the
@@ -239,6 +247,7 @@ module libcamera;
  */
 struct IPACameraSensorInfo {
 	string model;
+	string id;
 
 	uint32 bitsPerPixel;
 	uint32 cfaPattern;
diff --git a/src/libcamera/sensor/camera_sensor.cpp b/src/libcamera/sensor/camera_sensor.cpp
index 5c89da07..fb3e172a 100644
--- a/src/libcamera/sensor/camera_sensor.cpp
+++ b/src/libcamera/sensor/camera_sensor.cpp
@@ -914,6 +914,7 @@ int CameraSensor::sensorInfo(IPACameraSensorInfo *info) const
 		return -EINVAL;
 
 	info->model = model();
+	info->id = id();
 
 	/*
 	 * The active area size is a static property, while the crop
-- 
2.25.1



More information about the libcamera-devel mailing list