[libcamera-devel] [PATCH 1/1] libipa: Add CameraSensorHelper for IMX258

Umang Jain umang.jain at ideasonboard.com
Mon Jul 19 12:14:36 CEST 2021


Extend the CameraSensorHelper factory with support for an
IMX258 sensor as found in the Nautilus Chromebook.

The values are read by hacking the IMX258 kernel driver.
The values for analog gain constants are obtained by reading the
register indexes, corresponding to the analog gain constants, as
mentioned in MIPI CCS v1.1 specification.

Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 709835a8..c43368df 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -295,6 +295,16 @@ public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx219", CameraSensorHelperImx219)
 
+class CameraSensorHelperImx258 : public CameraSensorHelper
+{
+public:
+        CameraSensorHelperImx258()
+        {
+                analogueGainConstants_ = { AnalogueGainLinear, 0, 512, -1, 512 };
+        }
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258)
+
 class CameraSensorHelperOv5670 : public CameraSensorHelper
 {
 public:
-- 
2.31.0



More information about the libcamera-devel mailing list