From patchwork Fri Mar 19 13:01:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11625 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 2ACE8C32E1 for ; Fri, 19 Mar 2021 13:00:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87FED68D63; Fri, 19 Mar 2021 14:00:53 +0100 (CET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B77B968D5E for ; Fri, 19 Mar 2021 14:00:52 +0100 (CET) X-Originating-IP: 79.22.58.175 Received: from uno.homenet.telecomitalia.it (host-79-22-58-175.retail.telecomitalia.it [79.22.58.175]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B91F324000D; Fri, 19 Mar 2021 13:00:51 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 19 Mar 2021 14:01:17 +0100 Message-Id: <20210319130120.141563-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] libcamera: Do not default the location property 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" Hello we've been discussion about how to handle the camera location properly in libcamera and Android HAL. The current setup - defaults location to External in libcamera if the fw does not provide that - sets FRONT if location is External in Android Camera HAL This will make very complex to discern in future if a camera is actually external once the camera HAL will support the EXTERNAL HW level. To simplify this and make it easier to fallback to a getting location from a configuration file in the Camera HAL: - Do not report property::Location in libcamera if not available in fw - Do not default External to FRONT in HAL - To maintain compatibility with Android set location to FRONT if not available from the library in the Camera HAL. No regressions in CTS testing. v1->v2: - Add a patch for cam not to assume Location is available. The naming scheme now looks like (Soraka) Available cameras: 1: 'ov13858' (\_SB_.PCI0.I2C2.CAM0) 2: 'ov5670' (\_SB_.PCI0.I2C4.CAM1) While it was: Available cameras: 1: Internal front camera (\_SB_.PCI0.I2C2.CAM0) 2: Internal front camera (\_SB_.PCI0.I2C4.CAM1) - Patch 3/3 said "To maintain compatibility with CTS requirements, default location to FRONT only if the camera property is not available." Well, that hunk was missing in v1, sorry about that. I've kept Laurent's tag anyhow. Let me know if it's ok. Thanks j Jacopo Mondi (3): cam: Do not assume Location is available libcamera: camera_sensor: Do not register Location if not available android: camera_device: Do not default External to Front src/android/camera_device.cpp | 12 +++++++----- src/cam/main.cpp | 32 ++++++++++++++++++++------------ src/libcamera/camera_sensor.cpp | 6 ++---- 3 files changed, 29 insertions(+), 21 deletions(-) --- 2.30.0