From 48a380b389f32a672f3440b66f93de2eadcec022 Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Mon, 19 Jul 2021 15:27:24 +0530 Subject: libipa: Add CameraSensorHelper for IMX258 Extend the CameraSensorHelper factory with support for the IMX258 sensor found in the Nautilus Chromebook. The values are read by manually tweaking the IMX258 kernel driver. The IMX258 kernel driver hints that the sensor may be compatible with the MIPI CCS specification, as the register set matches. 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. The values have further been confirmed by Dave Stevenson as being those specified in the datasheet. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') 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: -- cgit v1.2.1