From patchwork Fri Aug 9 10:03:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 1756 Return-Path: Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 377F160E2F for ; Fri, 9 Aug 2019 12:02:47 +0200 (CEST) X-Originating-IP: 79.51.24.150 Received: from uno.homenet.telecomitalia.it (host150-24-dynamic.51-79-r.retail.telecomitalia.it [79.51.24.150]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 802E4C0013; Fri, 9 Aug 2019 10:02:46 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 9 Aug 2019 12:03:59 +0200 Message-Id: <20190809100406.22559-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/6] android: Add initial Camera HAL implementation X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2019 10:02:47 -0000 Hello, third version of initial Android Camera HAL implementation. I addressed (most) of Laurent's comments on v2, except the one making the CameraHalManager a singleton and point the camera_module_t operations to its static methods. I think the result is almost ready for merge, one last thing is the deletion of the components created at CameraHalManager::init() time, such as proxies and their associated data. Valgrind shows a big leak of camera_metadata_t packages, created when static informations are required for the first time or when a template request is requested, and deleted at CameraDevice delete time. Being the CameraHalManager a static member of the camera module, its destructor does not called at library unload time, causing memory to be effectively leaked. While this might be a minor issue, as library unloading should only happens at system teardown time, this is something worth reporting and maybe investigating. Thanks j Jacopo Mondi (6): licenses: add Apache-2.0 license include: android: Add Android headers from Cros include: android: Add SPDX tags android: Add camera metadata library android: metadata: Add SPDX tag android: hal: Add Camera3 HAL .../libhardware/include/hardware/camera3.h | 3094 +++++++++++++++++ .../include/hardware/camera_common.h | 917 +++++ .../libhardware/include/hardware/fb.h | 174 + .../libhardware/include/hardware/gralloc.h | 385 ++ .../libhardware/include/hardware/hardware.h | 239 ++ include/android/meson.build | 5 + .../android/metadata/camera_metadata_hidden.h | 101 + .../android/metadata/system/camera_metadata.h | 581 ++++ .../metadata/system/camera_metadata_tags.h | 1006 ++++++ .../metadata/system/camera_vendor_tags.h | 159 + .../android/system/core/include/android/log.h | 145 + .../system/core/include/cutils/compiler.h | 45 + .../core/include/cutils/native_handle.h | 70 + .../system/core/include/system/camera.h | 299 ++ .../system/core/include/system/graphics.h | 764 ++++ .../system/core/include/system/window.h | 955 +++++ include/meson.build | 1 + licenses/apache-2.0.txt | 202 ++ meson_options.txt | 5 + src/android/camera3_hal.cpp | 111 + src/android/camera_device.cpp | 817 +++++ src/android/camera_device.h | 63 + src/android/camera_hal_manager.cpp | 142 + src/android/camera_hal_manager.h | 47 + src/android/camera_proxy.cpp | 199 ++ src/android/camera_proxy.h | 45 + src/android/meson.build | 15 + src/android/metadata/camera_metadata.c | 1205 +++++++ .../metadata/camera_metadata_tag_info.c | 2812 +++++++++++++++ src/android/thread_rpc.cpp | 42 + src/android/thread_rpc.h | 54 + src/libcamera/meson.build | 9 + src/meson.build | 4 + 33 files changed, 14712 insertions(+) create mode 100644 include/android/hardware/libhardware/include/hardware/camera3.h create mode 100644 include/android/hardware/libhardware/include/hardware/camera_common.h create mode 100644 include/android/hardware/libhardware/include/hardware/fb.h create mode 100644 include/android/hardware/libhardware/include/hardware/gralloc.h create mode 100644 include/android/hardware/libhardware/include/hardware/hardware.h create mode 100644 include/android/meson.build create mode 100644 include/android/metadata/camera_metadata_hidden.h create mode 100644 include/android/metadata/system/camera_metadata.h create mode 100644 include/android/metadata/system/camera_metadata_tags.h create mode 100644 include/android/metadata/system/camera_vendor_tags.h create mode 100644 include/android/system/core/include/android/log.h create mode 100644 include/android/system/core/include/cutils/compiler.h create mode 100644 include/android/system/core/include/cutils/native_handle.h create mode 100644 include/android/system/core/include/system/camera.h create mode 100644 include/android/system/core/include/system/graphics.h create mode 100644 include/android/system/core/include/system/window.h create mode 100644 licenses/apache-2.0.txt create mode 100644 src/android/camera3_hal.cpp create mode 100644 src/android/camera_device.cpp create mode 100644 src/android/camera_device.h create mode 100644 src/android/camera_hal_manager.cpp create mode 100644 src/android/camera_hal_manager.h create mode 100644 src/android/camera_proxy.cpp create mode 100644 src/android/camera_proxy.h create mode 100644 src/android/meson.build create mode 100644 src/android/metadata/camera_metadata.c create mode 100644 src/android/metadata/camera_metadata_tag_info.c create mode 100644 src/android/thread_rpc.cpp create mode 100644 src/android/thread_rpc.h --- 2.22.0