From patchwork Mon Feb 22 08:01:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 11353 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 50DC4BD1F6 for ; Mon, 22 Feb 2021 08:01:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 161AA68A01; Mon, 22 Feb 2021 09:01:37 +0100 (CET) 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="a9SFSctg"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB93E689EA for ; Mon, 22 Feb 2021 09:01:35 +0100 (CET) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 19D84344; Mon, 22 Feb 2021 09:01:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613980895; bh=hjzuJ8bvR9XmD/RkKVlB0p8PlG0TMS8+qNatkv9wm50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a9SFSctgRgmYeby/gLdorDSe9DaVBeogIDD05ToklcokLP5xqOizNsDPIvwJEt+yt hijEvL0MdcNp/M4TAqt9BAsF1cjBdwb22Dai4lXhkH2cPT+00CMGrt0TnunGGvhUxa qbGnhxdeWBc9PdyqyvOj7UCxnaCKrO6nYO+xV8hs= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 22 Feb 2021 17:01:12 +0900 Message-Id: <20210222080112.72521-3-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210222080112.72521-1-paul.elder@ideasonboard.com> References: <20210222080112.72521-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/2] android: camera_device: Set the camera location to Front if External 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" Our android HAL implementation currently does not support external cameras, so if the camera location property is external, set it to front. This allows the following CTS test to pass: - android.hardware.camera2.cts.CameraManagerTest#testCameraManagerGetDeviceIdList Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- No change in v2 --- src/android/camera_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 1e2a5b5f..16cb8c6d 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -405,7 +405,11 @@ int CameraDevice::initialize() facing_ = CAMERA_FACING_BACK; break; case properties::CameraLocationExternal: - facing_ = CAMERA_FACING_EXTERNAL; + /* + * \todo Set this to EXTERNAL once we support + * HARDWARE_LEVEL_EXTERNAL + */ + facing_ = CAMERA_FACING_FRONT; break; } }