From patchwork Wed Jul 28 07:37:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13134 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 C1762C322E for ; Wed, 28 Jul 2021 07:38:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2856B687C4; Wed, 28 Jul 2021 09:38:10 +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="qcrDZpWJ"; 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 E283E687B6 for ; Wed, 28 Jul 2021 09:38:08 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B33D54FB; Wed, 28 Jul 2021 09:38:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627457888; bh=O4jpMnBnzFzWjeObj3rlQZpR+hGm3UyhFF4U7yj12uE=; h=From:To:Cc:Subject:Date:From; b=qcrDZpWJcwQq0yDQUHxHwlJyL/xiqAlHScpJf2kIEb7JpgNosAhT2gMwW3isPxVsg GPAmtc+OzL+Rz0OvHzfySSoAiJYdYEc1VVGq+DecOt4zE30zdaKLBmKblpz1jf12vw p4eMWSq3HRBVN35meM+Xvh2WSRJntVy0B8dl/Zl8= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Wed, 28 Jul 2021 13:07:57 +0530 Message-Id: <20210728073800.93745-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] android: Handle internal UVC cameras 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" libcamera-core all UVC cameras as 'external' (which makes sense as there is not much information to accurately determine location). However, in the HAL layer, we can probably determine accurately by looking at HAL config file camera entries. This series addresses the handling of such cameras, where the libcamera reports properties::CameraLocationExternal, but we know one of the UVC is internal/integrated to the system. It should be treated as internal. Testing: With nautilus, it has one UVC and one IPU3 cameras. With these patches applied, both these cameras have id as '0' & '1' (i.e. internal). With camera service still running, I hotplugged a external UVC camera, and it got the camera numerical id as '1000'. Change in v2: - Introduce a re-factor patch 1/3 - Change comments in 2/3 Umang Jain (3): android: Instantiate CameraDevice after checking HAL config validity android: Override camera is "Internal" provided if found on HAL config android: nautilus: Add camera HAL configuration src/android/camera_device.cpp | 10 +++++++++- src/android/camera_hal_manager.cpp | 24 ++++++++++++++++++++--- src/android/data/nautilus/camera_hal.yaml | 8 ++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 src/android/data/nautilus/camera_hal.yaml