{"id":11628,"url":"https://patchwork.libcamera.org/api/1.1/patches/11628/?format=json","web_url":"https://patchwork.libcamera.org/patch/11628/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210319130120.141563-4-jacopo@jmondi.org>","date":"2021-03-19T13:01:20","name":"[libcamera-devel,v2,3/3] android: camera_device: Do not default External to Front","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"e5c7e5ed1e0dabcb57490dbfbeadfedcbfc5f52c","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11628/mbox/","series":[{"id":1804,"url":"https://patchwork.libcamera.org/api/1.1/series/1804/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1804","date":"2021-03-19T13:01:17","name":"libcamera: Do not default the location property","version":2,"mbox":"https://patchwork.libcamera.org/series/1804/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11628/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11628/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EC527C32E1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Mar 2021 13:00:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B4EA068D63;\n\tFri, 19 Mar 2021 14:00:58 +0100 (CET)","from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net\n\t[217.70.183.193])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8694668D60\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Mar 2021 14:00:55 +0100 (CET)","from uno.homenet.telecomitalia.it\n\t(host-79-22-58-175.retail.telecomitalia.it [79.22.58.175])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B07C024000B;\n\tFri, 19 Mar 2021 13:00:54 +0000 (UTC)"],"X-Originating-IP":"79.22.58.175","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 19 Mar 2021 14:01:20 +0100","Message-Id":"<20210319130120.141563-4-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.30.0","In-Reply-To":"<20210319130120.141563-1-jacopo@jmondi.org>","References":"<20210319130120.141563-1-jacopo@jmondi.org>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v2 3/3] android: camera_device: Do not\n\tdefault External to Front","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Now that the camera location is not defaulted anymore in the library but\ndoesn't get registered if the firmware interface does not provide the\ninformation, do not default it to FRONT if LocationExternal is reported.\n\nTo maintain compatibility with CTS requirements, default location to\nFRONT only if the camera property is not available.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_device.cpp | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)","diff":"diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex a81e3c905d6c..72a89258386d 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -376,13 +376,15 @@ int CameraDevice::initialize()\n \t\t\tfacing_ = CAMERA_FACING_BACK;\n \t\t\tbreak;\n \t\tcase properties::CameraLocationExternal:\n-\t\t\t/*\n-\t\t\t * \\todo Set this to EXTERNAL once we support\n-\t\t\t * HARDWARE_LEVEL_EXTERNAL\n-\t\t\t */\n-\t\t\tfacing_ = CAMERA_FACING_FRONT;\n+\t\t\tfacing_ = CAMERA_FACING_EXTERNAL;\n \t\t\tbreak;\n \t\t}\n+\t} else {\n+\t\t/*\n+\t\t * \\todo Retrieve the camera location from configuration file\n+\t\t * if not available from the library.\n+\t\t */\n+\t\tfacing_ = CAMERA_FACING_FRONT;\n \t}\n \n \t/*\n","prefixes":["libcamera-devel","v2","3/3"]}