From patchwork Tue Mar 30 14:21:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11791 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 4B618C0DA3 for ; Tue, 30 Mar 2021 14:20:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1D54D68789; Tue, 30 Mar 2021 16:20:45 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1E6DE6877F for ; Tue, 30 Mar 2021 16:20:43 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id DE59E6000D; Tue, 30 Mar 2021 14:20:41 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Mar 2021 16:21:09 +0200 Message-Id: <20210330142113.37457-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210330142113.37457-1-jacopo@jmondi.org> References: <20210330142113.37457-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/5] libcamera: List dependency for Android Camera3 HAL 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" Add to the README.rst file the list of depdendencies for the Android Camera3 HAL. Reviewed-by: Hirokazu Honda Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Signed-off-by: Jacopo Mondi --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 1427c7143fa6..7a98164bbb0a 100644 --- a/README.rst +++ b/README.rst @@ -87,6 +87,9 @@ for qcam: [optional] for tracing with lttng: [optional] liblttng-ust-dev python3-jinja2 lttng-tools +for android: [optional] + libexif libjpeg + Using GStreamer plugin ~~~~~~~~~~~~~~~~~~~~~~ From patchwork Tue Mar 30 14:21:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11792 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 DECA8C0DA3 for ; Tue, 30 Mar 2021 14:20:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A5D7768789; Tue, 30 Mar 2021 16:20:48 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AFCB168787 for ; Tue, 30 Mar 2021 16:20:44 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 468806000C; Tue, 30 Mar 2021 14:20:44 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Mar 2021 16:21:11 +0200 Message-Id: <20210330142113.37457-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210330142113.37457-1-jacopo@jmondi.org> References: <20210330142113.37457-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/5] android: Add CameraHalConfig class 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" Add a CameraHalConfig class to the Android Camera3 HAL layer. Signed-off-by: Jacopo Mondi --- README.rst | 2 +- src/android/camera_hal_config.cpp | 407 ++++++++++++++++++++++++++++++ src/android/camera_hal_config.h | 36 +++ src/android/meson.build | 2 + 4 files changed, 446 insertions(+), 1 deletion(-) create mode 100644 src/android/camera_hal_config.cpp create mode 100644 src/android/camera_hal_config.h diff --git a/README.rst b/README.rst index 7a98164bbb0a..f68d435196de 100644 --- a/README.rst +++ b/README.rst @@ -88,7 +88,7 @@ for tracing with lttng: [optional] liblttng-ust-dev python3-jinja2 lttng-tools for android: [optional] - libexif libjpeg + libexif libjpeg libyaml Using GStreamer plugin ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp new file mode 100644 index 000000000000..b109ad24e1d1 --- /dev/null +++ b/src/android/camera_hal_config.cpp @@ -0,0 +1,407 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2021, Google Inc. + * + * camera_hal_config.cpp - Camera HAL configuration file manager + */ +#include "camera_hal_config.h" + +#include +#include +#include +#include + +#include + +#include "libcamera/internal/file.h" +#include "libcamera/internal/log.h" + +using namespace libcamera; + +LOG_DEFINE_CATEGORY(HALConfig) + +namespace { + +std::map cameras; + +std::string parseValue(yaml_parser_t *parser) +{ + yaml_token_t token; + + /* Make sure the token type is a value and get its content. */ + yaml_parser_scan(parser, &token); + if (token.type != YAML_VALUE_TOKEN) { + yaml_token_delete(&token); + return ""; + } + yaml_token_delete(&token); + + yaml_parser_scan(parser, &token); + if (token.type != YAML_SCALAR_TOKEN) { + yaml_token_delete(&token); + return ""; + } + + char *scalar = reinterpret_cast(token.data.scalar.value); + std::string value(scalar, token.data.scalar.length); + yaml_token_delete(&token); + + return value; +} + +std::string parseKey(yaml_parser_t *parser) +{ + yaml_token_t token; + + /* Make sure the token type is a key and get its value. */ + yaml_parser_scan(parser, &token); + if (token.type != YAML_SCALAR_TOKEN) { + yaml_token_delete(&token); + return ""; + } + + char *scalar = reinterpret_cast(token.data.scalar.value); + std::string key(scalar, token.data.scalar.length); + yaml_token_delete(&token); + + return key; +} + +int parseValueBlock(yaml_parser_t *parser) +{ + yaml_token_t token; + + /* Make sure the next token are VALUE and BLOCK_MAPPING_START. */ + yaml_parser_scan(parser, &token); + if (token.type != YAML_VALUE_TOKEN) { + yaml_token_delete(&token); + return -EINVAL; + } + yaml_token_delete(&token); + + yaml_parser_scan(parser, &token); + if (token.type != YAML_BLOCK_MAPPING_START_TOKEN) { + yaml_token_delete(&token); + return -EINVAL; + } + yaml_token_delete(&token); + + return 0; +} + +int parseCameraLocation(CameraProps *cameraProps, const std::string &location) +{ + if (location == "front") { + cameraProps->facing = CAMERA_FACING_FRONT; + } else if (location == "back") { + cameraProps->facing = CAMERA_FACING_BACK; + } else if (location == "external") { + cameraProps->facing = CAMERA_FACING_EXTERNAL; + } else { + cameraProps->facing = -EINVAL; + return -EINVAL; + } + + return 0; +} + +int parseCameraProps(yaml_parser_t *parser, const std::string &cameraID) +{ + int ret = parseValueBlock(parser); + if (ret) + return ret; + + /* + * Parse the camera properties and store them in a cameraProps instance. + * + * Add a safety counter to make sure we don't loop indefinitely in case + * the configuration file is malformed. + */ + unsigned int sentinel = 100; + CameraProps cameraProps{}; + bool blockEnd = false; + yaml_token_t token; + + do { + yaml_parser_scan(parser, &token); + switch (token.type) { + case YAML_KEY_TOKEN: { + yaml_token_delete(&token); + + /* + * Parse the camera property key and make sure it is + * valid. + */ + std::string key = parseKey(parser); + std::string value = parseValue(parser); + if (key.empty() || value.empty()) + return -EINVAL; + + if (key == "location") { + ret = parseCameraLocation(&cameraProps, value); + if (ret) { + LOG(HALConfig, Error) + << "Unupported location: " + << value; + return -EINVAL; + } + } else if (key == "rotation") { + cameraProps.rotation = strtoul(value.c_str(), + NULL, 10); + if (cameraProps.rotation < 0) { + LOG(HALConfig, Error) + << "Unknown rotation: " + << cameraProps.rotation; + return -EINVAL; + } + } else if (key == "model") { + cameraProps.model = value; + } else { + LOG(HALConfig, Error) + << "Unknown key: " << key; + return -EINVAL; + } + break; + } + case YAML_BLOCK_END_TOKEN: + blockEnd = true; + /* Fall-through */ + default: + yaml_token_delete(&token); + break; + } + + --sentinel; + } while (!blockEnd && sentinel); + if (!sentinel) + return -EINVAL; + + cameraProps.valid = true; + cameras[cameraID] = cameraProps; + + return 0; +} + +int parseCameras(yaml_parser_t *parser) +{ + int ret = parseValueBlock(parser); + if (ret) { + LOG(HALConfig, Error) << "Configuration file is not valid"; + return ret; + } + + /* + * Parse the camera properties. + * + * Each camera properties block is a list of properties associated + * with the ID (as assembled by CameraSensor::generateId()) of the + * camera they refer to. + * + * cameras: + * "camera0 id": + * key: value + * key: value + * ... + * + * "camera1 id": + * key: value + * key: value + * ... + */ + bool blockEnd = false; + yaml_token_t token; + do { + yaml_parser_scan(parser, &token); + switch (token.type) { + case YAML_KEY_TOKEN: { + yaml_token_delete(&token); + + /* Parse the camera ID as key of the property list. */ + std::string cameraId = parseKey(parser); + if (cameraId.empty()) + return -EINVAL; + + ret = parseCameraProps(parser, cameraId); + if (ret) + return -EINVAL; + break; + } + case YAML_BLOCK_END_TOKEN: + blockEnd = true; + /* Fall-through */ + default: + yaml_token_delete(&token); + break; + } + } while (!blockEnd); + + return 0; +} + +int parseEntry(yaml_parser_t *parser) +{ + int ret = -EINVAL; + + /* + * Parse each key we find in the file. + * + * The 'cameras' keys maps to a list of (lists) of camera properties. + */ + + std::string key = parseKey(parser); + if (key.empty()) + return ret; + + if (key == "cameras") { + ret = parseCameras(parser); + } else + LOG(HALConfig, Error) << "Unknown key: " << key; + + return ret; +} + +int parseConfigFile(yaml_parser_t *parser) +{ + yaml_token_t token; + int ret = 0; + + yaml_parser_scan(parser, &token); + if (token.type != YAML_STREAM_START_TOKEN) { + LOG(HALConfig, Error) << "Configuration file is not valid"; + yaml_token_delete(&token); + return -EINVAL; + } + yaml_token_delete(&token); + + yaml_parser_scan(parser, &token); + if (token.type != YAML_BLOCK_MAPPING_START_TOKEN) { + LOG(HALConfig, Error) << "Configuration file is not valid"; + yaml_token_delete(&token); + return -EINVAL; + } + yaml_token_delete(&token); + + /* Parse the file and parse each single key one by one. */ + do { + yaml_parser_scan(parser, &token); + switch (token.type) { + case YAML_KEY_TOKEN: + yaml_token_delete(&token); + ret = parseEntry(parser); + break; + + case YAML_STREAM_END_TOKEN: + ret = -ENOENT; + /* Fall-through */ + default: + yaml_token_delete(&token); + break; + } + } while (ret >= 0); + + if (ret && ret != -ENOENT) + LOG(HALConfig, Error) << "Configuration file is not valid"; + + return ret == -ENOENT ? 0 : ret; +} + +} /* namespace */ + +std::string CameraHalConfig::findFilePath(const std::string &filename) const +{ + static std::array searchPaths = { + LIBCAMERA_SYSCONF_DIR, + LIBCAMERA_DATA_DIR, + }; + + if (File::exists(filename)) + return filename; + + std::string root = utils::libcameraSourcePath(); + if (!root.empty()) { + std::string configurationPath = root + "data/" + filename; + if (File::exists(configurationPath)) + return configurationPath; + } + + for (std::string &path : searchPaths) { + std::string configurationPath = path + "/" + filename; + if (File::exists(configurationPath)) + return configurationPath; + } + + return ""; +} + +FILE *CameraHalConfig::openFile(const std::string &filename) +{ + const std::string filePath = findFilePath(filename); + if (filePath.empty()) { + LOG(HALConfig, Error) + << "Configuration file: \"" << filename << "\" not found"; + return nullptr; + } + + LOG(HALConfig, Debug) << "Reading configuration file from " << filePath; + + FILE *fh = fopen(filePath.c_str(), "r"); + if (!fh) { + int ret = -errno; + LOG(HALConfig, Error) << "Failed to open configuration file " + << filePath << ": " << strerror(-ret); + return nullptr; + } + + return fh; +} + +/* + * Open the HAL configuration file and validate its content. + * Return 0 on success, a negative error code otherwise + */ +int CameraHalConfig::open() +{ + yaml_parser_t parser; + int ret = yaml_parser_initialize(&parser); + if (!ret) { + LOG(HALConfig, Fatal) << "Failed to initialize yaml parser"; + return -EINVAL; + } + + FILE *fh = openFile("camera_hal.yaml"); + if (!fh) + return -ENOENT; + + yaml_parser_set_input_file(&parser, fh); + ret = parseConfigFile(&parser); + fclose(fh); + yaml_parser_delete(&parser); + if (ret) + return ret; + + for (const auto &c : cameras) { + const std::string &cameraId = c.first; + const CameraProps &camera = c.second; + LOG(HALConfig, Debug) << "'" << cameraId << "' " + << " model: " << camera.model + << "(" << camera.facing << ")[" + << camera.rotation << "]"; + } + + return 0; +} + +const CameraProps &CameraHalConfig::cameraProps(const std::string &cameraID) const +{ + static CameraProps empty; + + const auto &it = cameras.find(cameraID); + if (it == cameras.end()) { + LOG(HALConfig, Error) + << "Camera '" << cameraID + << "' not described in the HAL configuration file"; + return empty; + } + + return it->second; +} diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h new file mode 100644 index 000000000000..5491a12fdffd --- /dev/null +++ b/src/android/camera_hal_config.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2021, Google Inc. + * + * camera_hal_config.h - Camera HAL configuration file manager + */ +#ifndef __ANDROID_CAMERA_HAL_CONFIG_H__ +#define __ANDROID_CAMERA_HAL_CONFIG_H__ + +#include + +class CameraProps +{ +public: + CameraProps() + : valid(false) {} + + int facing; + std::string model; + unsigned int rotation; + + bool valid; +}; + +class CameraHalConfig +{ +public: + int open(); + const CameraProps &cameraProps(const std::string &cameraID) const; + +private: + std::string findFilePath(const std::string &filename) const; + FILE *openFile(const std::string &filename); +}; +#endif /* __ANDROID_CAMERA_HAL_CONFIG_H__ */ + diff --git a/src/android/meson.build b/src/android/meson.build index 8e7d07d9be3c..c0ede407bc38 100644 --- a/src/android/meson.build +++ b/src/android/meson.build @@ -3,6 +3,7 @@ android_deps = [ dependency('libexif', required : get_option('android')), dependency('libjpeg', required : get_option('android')), + dependency('yaml-0.1', required : get_option('android')), ] android_enabled = true @@ -41,6 +42,7 @@ android_hal_sources = files([ 'camera3_hal.cpp', 'camera_hal_manager.cpp', 'camera_device.cpp', + 'camera_hal_config.cpp', 'camera_metadata.cpp', 'camera_ops.cpp', 'camera_stream.cpp', From patchwork Tue Mar 30 14:21:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11793 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 6FE38C0DA3 for ; Tue, 30 Mar 2021 14:20:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 11EFF68793; Tue, 30 Mar 2021 16:20:49 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CA0E6878E for ; Tue, 30 Mar 2021 16:20:45 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D73796000C; Tue, 30 Mar 2021 14:20:44 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Mar 2021 16:21:12 +0200 Message-Id: <20210330142113.37457-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210330142113.37457-1-jacopo@jmondi.org> References: <20210330142113.37457-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 4/5] android: camera_device: Get properties from configuration 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" Open the HAL configuration file in the Camera HAL manager and get the camera properties for each created CameraDevice and initialize it with them. Signed-off-by: Jacopo Mondi Reviewed-by: Hirokazu Honda --- src/android/camera_device.cpp | 9 +++------ src/android/camera_device.h | 3 ++- src/android/camera_hal_manager.cpp | 21 +++++++++++++++++++-- src/android/camera_hal_manager.h | 3 +++ 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index eb327978c84e..e59f25c68d6b 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -6,6 +6,7 @@ */ #include "camera_device.h" +#include "camera_hal_config.h" #include "camera_ops.h" #include "post_processor.h" @@ -351,7 +352,7 @@ std::unique_ptr CameraDevice::create(unsigned int id, * Initialize the camera static information. * This method is called before the camera device is opened. */ -int CameraDevice::initialize() +int CameraDevice::initialize(const CameraProps &cameraProps) { /* Initialize orientation and facing side of the camera. */ const ControlList &properties = camera_->properties(); @@ -370,11 +371,7 @@ int CameraDevice::initialize() break; } } else { - /* - * \todo Retrieve the camera location from configuration file - * if not available from the library. - */ - facing_ = CAMERA_FACING_FRONT; + facing_ = cameraProps.facing; } /* diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 11bdfec8d587..ba3ec8770e11 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -29,6 +29,7 @@ #include "camera_worker.h" #include "jpeg/encoder.h" +class CameraProps; class CameraDevice : protected libcamera::Loggable { public: @@ -36,7 +37,7 @@ public: std::shared_ptr cam); ~CameraDevice(); - int initialize(); + int initialize(const CameraProps &cameraProps); int open(const hw_module_t *hardwareModule); void close(); diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp index bf3fcda75237..a517727ea0b8 100644 --- a/src/android/camera_hal_manager.cpp +++ b/src/android/camera_hal_manager.cpp @@ -39,13 +39,17 @@ CameraHalManager::~CameraHalManager() = default; int CameraHalManager::init() { + int ret = halConfig_.open(); + if (ret) + return ret; + cameraManager_ = std::make_unique(); /* Support camera hotplug. */ cameraManager_->cameraAdded.connect(this, &CameraHalManager::cameraAdded); cameraManager_->cameraRemoved.connect(this, &CameraHalManager::cameraRemoved); - int ret = cameraManager_->start(); + ret = cameraManager_->start(); if (ret) { LOG(HAL, Error) << "Failed to start camera manager: " << strerror(-ret); @@ -115,9 +119,22 @@ void CameraHalManager::cameraAdded(std::shared_ptr cam) } } + /* + * Get camera properties from the configuration file. + * + * The camera properties as recorded in the configuration file + * supplement information that cannot be retrieved from the + * libcamera::Camera at run time. + */ + const CameraProps &cameraProps = halConfig_.cameraProps(cam->id()); + if (!cameraProps.valid) { + LOG(HAL, Error) << "Failed to register camera: " << cam->id(); + return; + } + /* Create a CameraDevice instance to wrap the libcamera Camera. */ std::unique_ptr camera = CameraDevice::create(id, cam); - int ret = camera->initialize(); + int ret = camera->initialize(cameraProps); if (ret) { LOG(HAL, Error) << "Failed to initialize camera: " << cam->id(); return; diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h index d9bf27989965..af1581da6579 100644 --- a/src/android/camera_hal_manager.h +++ b/src/android/camera_hal_manager.h @@ -19,6 +19,8 @@ #include +#include "camera_hal_config.h" + class CameraDevice; class CameraHalManager @@ -50,6 +52,7 @@ private: CameraDevice *cameraDeviceFromHalId(unsigned int id); std::unique_ptr cameraManager_; + CameraHalConfig halConfig_; const camera_module_callbacks_t *callbacks_; std::vector> cameras_; From patchwork Tue Mar 30 14:21:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 11794 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 08566C0DA3 for ; Tue, 30 Mar 2021 14:20:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 966366878C; Tue, 30 Mar 2021 16:20:49 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3351568786 for ; Tue, 30 Mar 2021 16:20:46 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 6FD9460004; Tue, 30 Mar 2021 14:20:45 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 30 Mar 2021 16:21:13 +0200 Message-Id: <20210330142113.37457-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210330142113.37457-1-jacopo@jmondi.org> References: <20210330142113.37457-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 5/5] android: soraka: Add camera HAL configuration 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" Add camera HAL configuration file for IPU3 Soraka. Reviewed-by: Laurent Pinchart Reviewed-by: Hirokazu Honda Signed-off-by: Jacopo Mondi --- src/android/data/soraka/camera_hal.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/android/data/soraka/camera_hal.yaml diff --git a/src/android/data/soraka/camera_hal.yaml b/src/android/data/soraka/camera_hal.yaml new file mode 100644 index 000000000000..605f3096b726 --- /dev/null +++ b/src/android/data/soraka/camera_hal.yaml @@ -0,0 +1,10 @@ +cameras: + "\\_SB_.PCI0.I2C4.CAM1": + model: ov5670 + location: front + rotation: 0 + + "\\_SB_.PCI0.I2C2.CAM0": + model: ov13858 + location: back + rotation: 0