From patchwork Thu Jul 15 10:13:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 12957 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 3B61BC3226 for ; Thu, 15 Jul 2021 10:13:21 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8F4D368525; Thu, 15 Jul 2021 12:13:20 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FUwlHe4R"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4DA7D6059F for ; Thu, 15 Jul 2021 12:13:19 +0200 (CEST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:fab7:64ae:4173:b5e8]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BC29B340; Thu, 15 Jul 2021 12:13:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626343998; bh=ccez79KUQgikbWV9j5/qQF8dYFROintQdId3CHBy/aw=; h=From:To:Cc:Subject:Date:From; b=FUwlHe4ROuNYlcIEOvp49RHTtbV8sSiz3Wz2tJINf6dWVS3pckFaiLVIKoqkZ5Ipd 2T2sE9rZ3wDnmj/1irKCVoy2f7ktAsIBRG80Al/azB4iN8nSAB88rtuEu3dtLB6lkw m7parBxoifaL86s14NNF/Elti8HrV2191UCPcMaM= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Thu, 15 Jul 2021 12:13:15 +0200 Message-Id: <20210715101315.199703-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2] libipa: Add CameraSensorHelper for OV13858 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Extend the CameraSensorHelper factory with support for an OV13858 sensor as found in the Soraka Chromebook. The datasheet states that low 7 bits are fraction bits, so the gain is calculated as gainCode=128*gain. According to the formula, it means m0=1 and c1=128. m1 then has to be 0, and c0=0. Signed-off-by: Kieran Bingham Signed-off-by: Jean-Michel Hautbois Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- 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 84d8ccf7..17e4f0b2 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -315,6 +315,16 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693) +class CameraSensorHelperOv13858 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv13858() + { + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov13858", CameraSensorHelperOv13858) + #endif /* __DOXYGEN__ */ } /* namespace ipa */