From patchwork Thu Feb 6 18:52:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2800 Return-Path: Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 428046096F for ; Thu, 6 Feb 2020 19:50:21 +0100 (CET) X-Originating-IP: 93.34.114.233 Received: from uno.lan (93-34-114-233.ip49.fastwebnet.it [93.34.114.233]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 0FC46FF802 for ; Thu, 6 Feb 2020 18:50:20 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 6 Feb 2020 19:52:47 +0100 Message-Id: <20200206185247.202233-8-jacopo@jmondi.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200206185247.202233-1-jacopo@jmondi.org> References: <20200206185247.202233-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 7/7] DNI: libcamera: sensor: ov5670: Add lens properties 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-List-Received-Date: Thu, 06 Feb 2020 18:50:22 -0000 Register lens properties in the ov5670 sensor handler. This patch is not intended for merge as we know lens properties do no belong to the sensor handler, but I am including it anyhow to trigger discussions on where they would be more appropriately defined. Signed-off-by: Jacopo Mondi --- src/libcamera/sensor/ov5670.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libcamera/sensor/ov5670.cpp b/src/libcamera/sensor/ov5670.cpp index a49fcebb2d9d..1396e9fe94dc 100644 --- a/src/libcamera/sensor/ov5670.cpp +++ b/src/libcamera/sensor/ov5670.cpp @@ -75,6 +75,21 @@ int OV5670CameraSensor::initProperties(const ControlInfoMap &controlMap) properties_.set(properties::ISOSensitivityRange, Span{ isoSensitivities }); + /* Lens Properties. */ + std::array lensApertures = { 0.0f }; + properties_.set(properties::LensApertures, + Span{ lensApertures }); + + std::array lensFocalLengths = { 3.69f }; + properties_.set(properties::LensFocalLength, + Span{ lensFocalLengths }); + + std::array lensHyperfocalMinDistance = { 0.0f }; + properties_.set(properties::LensHyperfocalDistance, + Span{ lensHyperfocalMinDistance }); + + properties_.set(properties::LensMinimumFocusDistance, 3.69f); + return CameraSensor::initProperties(controlMap); }