[v2,1/7] libcamera: Add debug control space
diff mbox series

Message ID 20241007095425.211158-2-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • Add support for IPA debugging metadata
Related show

Commit Message

Stefan Klug Oct. 7, 2024, 9:54 a.m. UTC
Add a new 'debug' controls namespace for the upcoming implementation of
debug metadata. While at it, sort the entries alphabetically.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

---
Changes in v2:
- Order lists in meson file alphabetically
- Fix wording in control-ranges
---
 include/libcamera/meson.build        | 5 +++--
 src/libcamera/control_ids_debug.yaml | 7 +++++++
 src/libcamera/control_ranges.yaml    | 4 +++-
 3 files changed, 13 insertions(+), 3 deletions(-)
 create mode 100644 src/libcamera/control_ids_debug.yaml

Patch
diff mbox series

diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build
index a969a95dbf7a..fd69a5172b6a 100644
--- a/include/libcamera/meson.build
+++ b/include/libcamera/meson.build
@@ -34,8 +34,9 @@  libcamera_headers_install_dir = get_option('includedir') / libcamera_include_dir
 
 controls_map = {
     'controls': {
-        'draft': 'control_ids_draft.yaml',
         'core': 'control_ids_core.yaml',
+        'debug': 'control_ids_debug.yaml',
+        'draft': 'control_ids_draft.yaml',
         'rpi/vc4': 'control_ids_rpi.yaml',
     },
 
@@ -55,7 +56,7 @@  foreach mode, entry : controls_map
     files_list = []
     input_files = []
     foreach vendor, header : entry
-        if vendor != 'core' and vendor != 'draft'
+        if vendor not in ['core', 'debug', 'draft']
             if vendor not in pipelines
                 continue
             endif
diff --git a/src/libcamera/control_ids_debug.yaml b/src/libcamera/control_ids_debug.yaml
new file mode 100644
index 000000000000..62f742c58129
--- /dev/null
+++ b/src/libcamera/control_ids_debug.yaml
@@ -0,0 +1,7 @@ 
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+%YAML 1.1
+---
+vendor: debug
+controls:
+
diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml
index d42447d04647..6752eb986ac6 100644
--- a/src/libcamera/control_ranges.yaml
+++ b/src/libcamera/control_ranges.yaml
@@ -13,6 +13,8 @@  ranges:
   draft: 10000
   # Raspberry Pi vendor controls
   rpi: 20000
-  # Next range starts at 30000
+  # Controls for debug metadata
+  debug: 30000
+  # Next range starts at 40000
 
 ...