Show a patch.

GET /api/patches/16301/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16301,
    "url": "https://patchwork.libcamera.org/api/patches/16301/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16301/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20220621150337.47839-4-jacopo@jmondi.org>",
    "date": "2022-06-21T15:03:37",
    "name": "[libcamera-devel,3/3] libcamera: Introduce internal controls",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d8dd566e4b1300b7540d2c4858909e95febc0fac",
    "submitter": {
        "id": 3,
        "url": "https://patchwork.libcamera.org/api/people/3/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo@jmondi.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16301/mbox/",
    "series": [
        {
            "id": 3198,
            "url": "https://patchwork.libcamera.org/api/series/3198/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3198",
            "date": "2022-06-21T15:03:34",
            "name": "libcamera: Introduce internal controls",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3198/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16301/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16301/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 55591BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Jun 2022 15:03:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A557C65642;\n\tTue, 21 Jun 2022 17:03:50 +0200 (CEST)",
            "from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 59F4F65631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Jun 2022 17:03:47 +0200 (CEST)",
            "(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id 98C20FF80C;\n\tTue, 21 Jun 2022 15:03:46 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655823830;\n\tbh=WoNawazu4DtVo2a0TC6LniOF2ZiHITfjPBs4z2Ptau4=;\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=hm7lP23RTLcS8aI7yyQ/tgdRGyJ5XPZ5WWbgrDp04t5K2qdtisqg0Dp/7HRGFYBcH\n\tWcce+Fb0HqTXjYn+zEvXvgfGvBHfBZyz86BnQfSZ2ZLSXWCh9A9jsJVe4CEeZlG567\n\tq2AQBkOdvNpPjmqi0Vd3A4XjQAhsPzyKe4PE5tFcIvsWMImv/FR5VaSnh6azyyo/kx\n\tTVenOda9Ltbigs20M3e2DBTsrOHZk+ib/urCtsgmPhEHNxjDDHLvpIvQsL9mmXBkqu\n\tfsTUl265qul8nyHHLtBtk6blRAIzu6xze8e6DBUEkaHk5uBybOFfG/EyWTAbr50sHT\n\t+b+H+uCKIaqtQ==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 21 Jun 2022 17:03:37 +0200",
        "Message-Id": "<20220621150337.47839-4-jacopo@jmondi.org>",
        "X-Mailer": "git-send-email 2.36.1",
        "In-Reply-To": "<20220621150337.47839-1-jacopo@jmondi.org>",
        "References": "<20220621150337.47839-1-jacopo@jmondi.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 3/3] libcamera: Introduce internal controls",
        "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>\n---\n include/libcamera/internal/meson.build  | 18 +++++++++\n src/libcamera/internal_control_ids.yaml | 54 +++++++++++++++++++++++++\n src/libcamera/meson.build               | 16 ++++++++\n 3 files changed, 88 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..569940b0d2e8 100644\n--- a/include/libcamera/internal/meson.build\n+++ b/include/libcamera/internal/meson.build\n@@ -44,3 +44,21 @@ libcamera_internal_headers = files([\n     'v4l2_videodevice.h',\n     'yaml_parser.h',\n ])\n+\n+# Generate the list of internal controls identifiers\n+internal_control_source_files = ['control_ids']\n+\n+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+    internal_control_headers += custom_target('internal_' + header + '_h',\n+                                              input : input_files,\n+                                              output : header + '.h',\n+                                              command : [gen_controls, '--internal=True',\\\n+                                                                       '-o', '@OUTPUT@',\\\n+                                                                       '@INPUT@'],\n+                                              install : false)\n+endforeach\n+libcamera_internal_headers += internal_control_headers\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..4564d3dbb835 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -99,6 +99,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 +112,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",
        "3/3"
    ]
}