From patchwork Tue Aug 3 14:02:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13184 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 0259CC3232 for ; Tue, 3 Aug 2021 14:02:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id B27F2687DC; Tue, 3 Aug 2021 16:02:51 +0200 (CEST) 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="EzE+JQR3"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3B58C687BC for ; Tue, 3 Aug 2021 16:02:50 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.238.109.12]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6376C3F0; Tue, 3 Aug 2021 16:02:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627999370; bh=JaHEGyTAkI24k/1Zc4mweJ7RHEON5+/GY352XRhGDBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EzE+JQR3wnkBz1rvwOov9/KDdlEl214sARWN+cRWa7sj6CbDuaBdAfAhvKGF+foZs yDF2pol9EBBUj53y2QDrVOEF4ufJcUekk7o0dmv/mdnHfmYY9ANvMcHldSsOokg0Cs DDDEbcFYhG5L8hYIlq6sYaI+CclcalGE+qDtvyK8= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Tue, 3 Aug 2021 19:32:35 +0530 Message-Id: <20210803140237.19302-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210803140237.19302-1-umang.jain@ideasonboard.com> References: <20210803140237.19302-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 2/4] android: Disallow external location in HAL config 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" Error out on any camera's location if set to "external", in the HAL configuration file. The HAL configuration file is meant to override the location property, and overriding an internal camera location to external doesn't make sense. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- src/android/camera_hal_config.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp index 833cf4ba..7126aba4 100644 --- a/src/android/camera_hal_config.cpp +++ b/src/android/camera_hal_config.cpp @@ -127,8 +127,6 @@ int CameraHalConfig::Private::parseCameraLocation(CameraConfigData *cameraConfig cameraConfigData->facing = CAMERA_FACING_FRONT; else if (location == "back") cameraConfigData->facing = CAMERA_FACING_BACK; - else if (location == "external") - cameraConfigData->facing = CAMERA_FACING_EXTERNAL; else return -EINVAL;