From patchwork Tue Jul 27 13:54:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13130 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 78CA3C322C for ; Tue, 27 Jul 2021 13:54:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D1E65687BE; Tue, 27 Jul 2021 15:54:50 +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="SMdmyGxD"; 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 7C9FC60272 for ; Tue, 27 Jul 2021 15:54:49 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5B298EE; Tue, 27 Jul 2021 15:54:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1627394089; bh=Cy8jvfND07EJrwnww+uxAIEqOrivBO//nfi3CxOkX/o=; h=From:To:Cc:Subject:Date:From; b=SMdmyGxD8xk/ebg2OTheR/QFovyeC3Gl9ks/i4siVICFEd+KzHhzX1fJ71cj5/N0Q 7PUl5DZcnCPYq/+kluXLGTOW6Kmyl4irjqlxcCSxGfgNcXc+Zod6/gw1juokVeehhn kkqUWYEQ4NiF9Cikk3RzHQ+0Dvh0cZSa9/4Y6OlM= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Tue, 27 Jul 2021 19:24:38 +0530 Message-Id: <20210727135440.53640-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] 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 defaults 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'. Umang Jain (2): 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 | 14 ++++++++++++++ src/android/data/nautilus/camera_hal.yaml | 8 ++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 src/android/data/nautilus/camera_hal.yaml