[1/4] libipa: camera_sensor_helper: Add OV9734
diff mbox series

Message ID 20261105230708.14601-2-afonso.figuinha@gmail.com
State New
Headers show
Series
  • Support the OV9734 on the IPU3 (Surface Laptop 1)
Related show

Commit Message

Afonso Figuinha Nov. 5, 2026, 11:07 p.m. UTC
Add a camera sensor helper for the OmniVision OV9734. The Linux driver
exposes the analogue gain as V4L2_CID_ANALOGUE_GAIN in the range 16 to
248, with 16 as both the minimum and the default value.

The register description is not public. Model the gain as linear with
a code of 16 as 1x, which assumes 1/16 steps. On a Microsoft Surface
Laptop 1, cam and GNOME Snapshot show a normally exposed indoor scene
with the IPU3 IPA using this model.

No black level is set, because its value is not documented.

The change and this description were drafted with an AI coding
assistant (Claude Code, model Claude Opus 5.5). The author reviewed
them and tested them on a Microsoft Surface Laptop 1.

Signed-off-by: Afonso Figuinha <afonso.figuinha@gmail.com>
---
 src/ipa/libipa/camera_sensor_helper.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 359040ec..912b0247 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -877,6 +877,20 @@  public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("ov8865", CameraSensorHelperOv8865)
 
+class CameraSensorHelperOv9734 : public CameraSensorHelper
+{
+public:
+	CameraSensorHelperOv9734()
+	{
+		/*
+		 * The Linux kernel driver exposes gain codes 16 to 248. Assume
+		 * 16 is 1x, as it is the minimum and the default value.
+		 */
+		gain_ = AnalogueGainLinear{ 1, 0, 0, 16 };
+	}
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov9734", CameraSensorHelperOv9734)
+
 class CameraSensorHelperOv13858 : public CameraSensorHelper
 {
 public: