{"id":16384,"url":"https://patchwork.libcamera.org/api/1.1/patches/16384/?format=json","web_url":"https://patchwork.libcamera.org/patch/16384/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220627162732.33160-4-jacopo@jmondi.org>","date":"2022-06-27T16:27:20","name":"[libcamera-devel,03/15] libcamera: Introduce internal controls","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":true,"hash":"23dd72cd04060dab5306234d38cb851c6d7ad09d","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16384/mbox/","series":[{"id":3224,"url":"https://patchwork.libcamera.org/api/1.1/series/3224/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3224","date":"2022-06-27T16:27:17","name":"Internal controls, sensor delays and IPA init/configure rework","version":1,"mbox":"https://patchwork.libcamera.org/series/3224/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16384/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16384/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 3D56CBD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Jun 2022 16:27:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1904A6563A;\n\tMon, 27 Jun 2022 18:27:46 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[217.70.183.200])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EA0ED6059B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Jun 2022 18:27:42 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 02D8E20008;\n\tMon, 27 Jun 2022 16:27:41 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1656347266;\n\tbh=rfTtBwtUgSj9o+bJBAFXhooGsYV+I+gwNmqLZ6anrjI=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=W9tMASKV9lvqZSO1YiORjVcqI5vx/nliLaPC3iR3yqS/vuC1sorOFLIQGc8om+b3s\n\tzW1MlOTqCoxwW62qTN23+s6I0zeNWUy2esz3OOQkg7qHOgrkXkGtMBw6E1+mEdUG0h\n\tAgM09PDqds3Dhfu6E/G65gxna7mQkbyTm88hh/Sj+1NFCGZWj+xPt8rJhZJ65QKDaB\n\tXLTvPEhrOOHIMumNSDRT1SkLyleUY6L2mpfhGMcVe1cjp805kXvpzeRTxN6IHiaJLH\n\tmmYYsjmYsp6g3OxiHhe1CK5e5A12Qkw5uradX4cqaU/9VsT0Lpq8b5rhvAv79xNBCS\n\tlc5Ussoz7YYfw==","To":"libcamera-devel@lists.libcamera.org","Date":"Mon, 27 Jun 2022 18:27:20 +0200","Message-Id":"<20220627162732.33160-4-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.36.1","In-Reply-To":"<20220627162732.33160-1-jacopo@jmondi.org>","References":"<20220627162732.33160-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 03/15] libcamera: Introduce internal\n\tcontrols","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Introduce the enumeration of internal controls in\ninternal_control_ids.yaml.\n\nThe list of controls currently defines 4 draft controls which mirror the\ndefinition of the V4L2 control they map to.\n\nPlumb in the build system the command to generate the definition of\ninternal controls by re-using the same mechanism used for public\ncontrols to make it easy to extend it to also handle internal properties\nin future.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>\n---\n include/libcamera/internal/meson.build  | 15 +++++++\n src/libcamera/internal_control_ids.yaml | 54 +++++++++++++++++++++++++\n src/libcamera/meson.build               | 17 ++++++++\n 3 files changed, 86 insertions(+)\n create mode 100644 src/libcamera/internal_control_ids.yaml","diff":"diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\nindex 7a780d48ee57..1559c3c368c4 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -9,6 +9,21 @@ libcamera_tracepoint_header = custom_target(\n     command: [gen_tracepoints_header, '@OUTPUT@', '@INPUT@'],\n )\n \n+# Generate the list of internal controls identifiers\n+internal_control_source_files = ['control_ids']\n+\n+libcamera_internal_control_headers = []\n+\n+foreach header : internal_control_source_files\n+    input_files = files('../../../src/libcamera/internal_' + header +'.yaml',\\\n+                        '../' + header + '.h.in')\n+    libcamera_internal_control_headers += custom_target(\n+            'internal_' + header + '_h',\n+            input : input_files,\n+            output : header + '.h',\n+            command : [gen_controls, '--internal=True','-o', '@OUTPUT@', '@INPUT@'])\n+endforeach\n+\n libcamera_internal_headers = files([\n     'bayer_format.h',\n     'byte_stream_buffer.h',\ndiff --git a/src/libcamera/internal_control_ids.yaml b/src/libcamera/internal_control_ids.yaml\nnew file mode 100644\nindex 000000000000..e69e0d30657c\n--- /dev/null\n+++ b/src/libcamera/internal_control_ids.yaml\n@@ -0,0 +1,54 @@\n+# SPDX-License-Identifier: LGPL-2.1-or-later\n+#\n+# Copyright (C) 2022, Google Inc.\n+#\n+%YAML 1.2\n+---\n+# Enumeration of internal libcamera controls\n+# Not exposed to application, for library use only\n+\n+controls:\n+\n+  # ----------------------------------------------------------------------------\n+  # Draft controls section\n+\n+  - VBlank:\n+      type: int32_t\n+      draft: true\n+      description: |\n+        Vertical blanking. The idle period after every frame during which no\n+        image data is produced. The unit of vertical blanking is a line. Every\n+        line has length of the image width plus horizontal blanking at the pixel\n+        rate defined by V4L2_CID_PIXEL_RATE control in the same sub-device.\n+\n+        Currently identical to V4L2_CID_VBLANK.\n+\n+  - HBlank:\n+      type: int32_t\n+      draft: true\n+      description: |\n+        Horizontal blanking. The idle period after every line of image data\n+        during which no image data is produced. The unit of horizontal blanking\n+        is pixels.\n+\n+        Currently identical to V4L2_CID_HBLANK.\n+\n+  - SensorAnalogueGain:\n+      type: int32_t\n+      draft: true\n+      description: |\n+        Analogue gain is gain affecting all colour components in the pixel\n+        matrix. The gain operation is performed in the analogue domain before\n+        A/D conversion\n+\n+        Currently identical to V4L2_CID_ANALOGUE_GAIN.\n+\n+  - SensorExposure:\n+      type: int32_t\n+      draft: true\n+      description: |\n+        Exposure time, expressed in frame lines.\n+\n+        Currently identical to V4L2_CID_EXPOSURE.\n+\n+...\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex b57bee7ef6ca..89fdf347c708 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -52,6 +52,7 @@ libcamera_sources = files([\n libcamera_sources += libcamera_public_headers\n libcamera_sources += libcamera_generated_ipa_headers\n libcamera_sources += libcamera_tracepoint_header\n+libcamera_sources += libcamera_internal_control_headers\n \n includes = [\n     libcamera_includes,\n@@ -99,6 +100,7 @@ if not libyaml.found()\n     libyaml = libyaml_wrap.dependency('yaml')\n endif\n \n+# Generate control_ids.cpp and property_ids.cpp\n control_sources = []\n \n foreach source : control_source_files\n@@ -111,6 +113,21 @@ endforeach\n \n libcamera_sources += control_sources\n \n+# Generate internal_control_ids.cpp\n+internal_control_source_files = ['control_ids']\n+internal_control_sources = []\n+\n+foreach source : internal_control_source_files\n+    input_files = files('internal_' + source +'.yaml', source + '.cpp.in')\n+    internal_control_sources += custom_target('internal_' + source + '_cpp',\n+                                              input : input_files,\n+                                              output : 'internal_' + source + '.cpp',\n+                                              command : [gen_controls, '--internal=True',\\\n+                                                                       '-o', '@OUTPUT@',\\\n+                                                                       '@INPUT@'])\n+endforeach\n+libcamera_sources += internal_control_sources\n+\n gen_version = meson.project_source_root() / 'utils' / 'gen-version.sh'\n \n # Use vcs_tag() and not configure_file() or run_command(), to ensure that the\n","prefixes":["libcamera-devel","03/15"]}