Patch Detail
Show a patch.
GET /api/1.1/patches/11474/?format=api
{ "id": 11474, "url": "https://patchwork.libcamera.org/api/1.1/patches/11474/?format=api", "web_url": "https://patchwork.libcamera.org/patch/11474/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20210303095035.493648-1-paul.elder@ideasonboard.com>", "date": "2021-03-03T09:50:35", "name": "[libcamera-devel,v3] cros: Support the new cros camera API with set_up and tear_down", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "9ca0587756f9c6401fdd59a58aa82606a0fd4cde", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/1.1/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/11474/mbox/", "series": [ { "id": 1749, "url": "https://patchwork.libcamera.org/api/1.1/series/1749/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1749", "date": "2021-03-03T09:50:35", "name": "[libcamera-devel,v3] cros: Support the new cros camera API with set_up and tear_down", "version": 3, "mbox": "https://patchwork.libcamera.org/series/1749/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/11474/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/11474/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 04BAFBD80C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 3 Mar 2021 09:50:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 75C9B68A98;\n\tWed, 3 Mar 2021 10:50:53 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AEE6F68A69\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 3 Mar 2021 10:50:51 +0100 (CET)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B1DA5ED;\n\tWed, 3 Mar 2021 10:50:49 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"i4d7t7f4\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1614765051;\n\tbh=M1prSjZib5Qr7OJxo/ajImkaGnoC3t9Xl8kN4JUpUsU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=i4d7t7f4u3gjbayy+O9HwJuphiqNR/HQQ+MSssp5+loFmQNe6mLym0zsYenkLnk0I\n\tE1bWx6UHz5XV7woIhj0Ketr1GbfeAgrIDaVM0xwuYmNA2uspVT7W6yL0mdYF8fzEsw\n\t0pQuJBlAi0+ft/X6a6ciIg60DHT8i+WwuG7QG35U=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 3 Mar 2021 18:50:35 +0900", "Message-Id": "<20210303095035.493648-1-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH v3] cros: Support the new cros camera API\n\twith set_up and tear_down", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Implement and expose the symbol and functions that the new cros camera\nAPI requires. Since we don't actually need them, leave them empty.\nUpdate meson accordingly.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v3:\n- simplify meson\n\nChanges in v2:\n- simplified the whole thing a ton\n- use the android_platform meson option\n---\n src/android/cros/camera3_hal.cpp | 21 +++++++++++++++++++++\n src/android/cros/meson.build | 17 +++++++++++++++++\n src/android/meson.build | 2 ++\n src/libcamera/meson.build | 1 +\n src/meson.build | 2 ++\n 5 files changed, 43 insertions(+)\n create mode 100644 src/android/cros/camera3_hal.cpp\n create mode 100644 src/android/cros/meson.build", "diff": "diff --git a/src/android/cros/camera3_hal.cpp b/src/android/cros/camera3_hal.cpp\nnew file mode 100644\nindex 00000000..31ad36ac\n--- /dev/null\n+++ b/src/android/cros/camera3_hal.cpp\n@@ -0,0 +1,21 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Google Inc.\n+ *\n+ * camera3_hal.cpp - cros-specific components of Android Camera HALv3 module\n+ */\n+\n+#include <cros-camera/cros_camera_hal.h>\n+\n+static void set_up(cros::CameraMojoChannelManagerToken *token)\n+{\n+}\n+\n+static void tear_down()\n+{\n+}\n+\n+cros::cros_camera_hal_t CROS_CAMERA_EXPORT CROS_CAMERA_HAL_INFO_SYM = {\n+\t.set_up = set_up,\n+\t.tear_down = tear_down\n+};\ndiff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\nnew file mode 100644\nindex 00000000..4aab0f20\n--- /dev/null\n+++ b/src/android/cros/meson.build\n@@ -0,0 +1,17 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+if get_option('android_platform') != 'cros'\n+ subdir_done()\n+endif\n+\n+cros_hal_info_sources = files([\n+ 'camera3_hal.cpp',\n+])\n+\n+cros_hal_info = static_library('cros_hal_info',\n+ cros_hal_info_sources,\n+ dependencies : dependency('libcros_camera'),\n+ c_args : '-Wno-shadow',\n+ include_directories : android_includes)\n+\n+libcamera_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\ndiff --git a/src/android/meson.build b/src/android/meson.build\nindex 7004d32d..87d162c3 100644\n--- a/src/android/meson.build\n+++ b/src/android/meson.build\n@@ -37,6 +37,8 @@ if android_enabled\n android_deps += [libyuv_dep]\n endif\n \n+subdir('cros')\n+\n android_hal_sources = files([\n 'camera3_hal.cpp',\n 'camera_hal_manager.cpp',\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 4b5e33ce..815629db 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -149,6 +149,7 @@ libcamera = shared_library('camera',\n install : true,\n link_with : libcamera_link_with,\n include_directories : includes,\n+ objects : libcamera_objects,\n build_rpath : '/',\n dependencies : libcamera_deps)\n \ndiff --git a/src/meson.build b/src/meson.build\nindex 0b26ca70..c908b067 100644\n--- a/src/meson.build\n+++ b/src/meson.build\n@@ -11,6 +11,8 @@ else\n ipa_sign_module = false\n endif\n \n+libcamera_objects = []\n+\n # The 'android' subdir must be processed first, and the build targets\n # are included directly into the libcamera library when this is enabled.\n subdir('android')\n", "prefixes": [ "libcamera-devel", "v3" ] }