From patchwork Wed Mar 16 22:22:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scally X-Patchwork-Id: 15462 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 51C15BF415 for ; Wed, 16 Mar 2022 22:23:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E6CA5610F8; Wed, 16 Mar 2022 23:23:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647469388; bh=AavhEJBaaEFiZvXfiSzgvvaZn3Bp+oqgIWqFDpkeX54=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=tRyl55HUThEe5ijLspRZWHl7rKCRPsJuffpZW1GlP2x+NxtXGKypdZKjccWelmSlM 5XPVQ0q8NRllXNKyXcc1O1lII6YUTg7MPhhIrCIpEyKcrxTUepQ7p7LH5Zwfbw0d1y GEeajvb18ZVNTVcATlt4qbycypRB4NKqu8wLgKB2hjr3og07KLitU8nu+L8mP3zWYO 88kfRL+EZwwGQ2vJJHFSoa7ifUm44G1cUmrJYti4nu4b/XAbKev0UDkotvKl/bUgLA MIFFoEyettkqygFks7oHoC4geURnMxC9Mbst83zMoDxkkGun7EI4pksnaNSn7DXl/U 5AbOtE7btYMyg== Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C4210610F8 for ; Wed, 16 Mar 2022 23:23:06 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hwDFQsOK"; dkim-atps=neutral Received: by mail-wr1-x42e.google.com with SMTP id u10so4887833wra.9 for ; Wed, 16 Mar 2022 15:23:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HaX2Mqb30RxFycSjHLK1+3M+WLZBfYfkjiqsCZa0byk=; b=hwDFQsOK3UTivLS49XL/vW4WqyPDzRDhrHF4YADiih4i4s2uKEuBdKpNm+tH4g07bH 4C3gOy7G88binje9MaIGKFzGj3jQki8+QLSW9MDhUW6sTF6S8gBCQmXChSlEwrRjCqun WTO6+hsTOI8QHYk/FyZt/4Kt/dEuGWwauUrhBI3fGmzo11eNKyZgK0iu/eIrq3o343D8 rzIDtRkhCVZy7vQ2fBfY0ndFnYUguzXStRE/hvnw7u3giUyKRyrvozCy+kgxovEBDSiy cxfEo49hDUIBGcSUZXsiZEtmoCI+G8rDAORoKgRPSX7buTNQQ++ha+3REjJhrrRt0M28 RrIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HaX2Mqb30RxFycSjHLK1+3M+WLZBfYfkjiqsCZa0byk=; b=nDh9aczsA6JplGtOfdCmkK0dZOL/8CyLcptYIXYlIIq7HHrF539WyRnA/AcS7Y5Hct c6OAqgFg1UYoJCYsKLBkMwarOhvRo7+1cvS2FFOzX493uVs5UWCduTk2JWb4G0mIOjzl ydDrolRxOQ+lPF+8DhieNozikKYOva7NguDft2HEEEHqviKmCOr5YGHhJhBWXmo88tql /JRm0L87i0imQsPI8plwNv/kqO0F1BppZJrqjM3+wRVjLDh2QFTF+3RNw2cEKo9uGJ8G n1StWXpcAtdhUDtAw+CIkBJI6tB7w0gfd18MTRDgxk+wnTp+i8p9RFx9p9x8AfTGK0Rb PMag== X-Gm-Message-State: AOAM531pmFzn4NXcDDcRsc8Njuj2vRIITRqKFBJ7nD1voQAAvfvJh8N8 dHEd77ABDkIfeVZsBuL0oV8v0M0Xyi0= X-Google-Smtp-Source: ABdhPJx+0Mnj9+5g+1A1hxeI933HxNLYtT4f27UelvDe0y4XOQA70ighOgir0XiYYPLCsQEZeWQLdg== X-Received: by 2002:a5d:5846:0:b0:203:6b34:37af with SMTP id i6-20020a5d5846000000b002036b3437afmr1691332wrf.58.1647469385474; Wed, 16 Mar 2022 15:23:05 -0700 (PDT) Received: from localhost.localdomain (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net. [86.13.91.161]) by smtp.gmail.com with ESMTPSA id 185-20020a1c19c2000000b0038a1d06e862sm6050969wmz.14.2022.03.16.15.23.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 15:23:05 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 16 Mar 2022 22:22:45 +0000 Message-Id: <20220316222245.132315-3-djrscally@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220316222245.132315-1-djrscally@gmail.com> References: <20220316222245.132315-1-djrscally@gmail.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libipa: Add CameraSensorHelper for OV2740 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: , X-Patchwork-Original-From: Daniel Scally via libcamera-devel From: Daniel Scally Reply-To: Daniel Scally Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The datasheet for the OV2740 gives 0x80 as 1x gain, so real gain is GainCode / 128. Signed-off-by: Daniel Scally Acked-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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 5d052612..c953def0 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -305,6 +305,16 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258) +class CameraSensorHelperOv2740 : public CameraSensorHelper +{ +public: + CameraSensorHelperOv2740() + { + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("ov2740", CameraSensorHelperOv2740) + class CameraSensorHelperOv5670 : public CameraSensorHelper { public: