From patchwork Mon Jul 19 10:14:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13041 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 1EA56C322B for ; Mon, 19 Jul 2021 10:14:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B95AC68539; Mon, 19 Jul 2021 12:14:58 +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="ZtwgAOrA"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9665C6853C for ; Mon, 19 Jul 2021 12:14:57 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.64]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6EAD4465; Mon, 19 Jul 2021 12:14:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626689697; bh=QbA9EnvhHWA2aAAaqwmJvgxUV11yvNUeyty1RZN9eGY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZtwgAOrACtJfV2W0B0/nGDw+lbIa+4TBS9VRI6FtXzS5Drx1MR9oc14gvXSRvQDVZ Sqz51dfmZ//eoMXcJklDkPnB5fHy+0JOAuYqUXVC71Pk1qG6p52hBi/sV8NQSTkVgC ew0GOgMYlL68fBcfdRVWE9bLXYP8bcWVr3TtnOG0= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Mon, 19 Jul 2021 15:44:36 +0530 Message-Id: <20210719101437.326523-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210719101437.326523-1-umang.jain@ideasonboard.com> References: <20210719101437.326523-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/1] libipa: Add CameraSensorHelper for IMX258 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 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 --- 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: