From patchwork Fri Jul 30 11:01:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13170 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 C8EF8C3230 for ; Fri, 30 Jul 2021 11:02:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 828EC687C5; Fri, 30 Jul 2021 13:02:14 +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="I8mQ0X9q"; 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 05D9C687BF for ; Fri, 30 Jul 2021 13:02:13 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id F3D2C89B; Fri, 30 Jul 2021 13:02:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627642932; bh=zHHmGKmppvYvtnQwAHMpoVH/is8FPSbYqQfLb7uHY1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I8mQ0X9qGOUT1g5v1jV1JIUAf1KeST7hVjFjrrIeEgGllvFnTrBy/IN8bAhzddUD2 LADCK/fCCAu1ImDyxOARgp+VCZIuMoE7AMD4CxfuKKLG+oLWyBxXoyQ32fsodT5y5u scIyAh7i00CcLaeuGWBcmUMNzyQow/gwBJzAg+sY= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Fri, 30 Jul 2021 16:31:52 +0530 Message-Id: <20210730110154.181370-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210730110154.181370-1-umang.jain@ideasonboard.com> References: <20210730110154.181370-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 only meant for the integrated cameras present on the system. 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;