diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2023-11-09 11:31:31 +0000 |
---|---|---|
committer | Naushir Patuck <naush@raspberrypi.com> | 2023-11-29 09:05:39 +0000 |
commit | d3365b358f350931ce5b1e51c39c23fa47b4a7ca (patch) | |
tree | 862d514e07ca37747a271d58d295bcfa46557aef /src | |
parent | 0455bbbf518cc834bd72ac65e13c9ed40bf21f3c (diff) |
libcamera: control: Add vendor control id range reservation
Add a new control_ranges.yaml file that is used to reserve control id
ranges/offsets for libcamera and vendor specific controls. This file is
used by the gen-controls.py script to generate control id values for
each control.
Draft controls now have a separate range from core libcamera controls,
breaking the existing numbering behaviour.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/control_ranges.yaml | 18 | ||||
-rw-r--r-- | src/libcamera/meson.build | 4 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/libcamera/control_ranges.yaml b/src/libcamera/control_ranges.yaml new file mode 100644 index 00000000..d42447d0 --- /dev/null +++ b/src/libcamera/control_ranges.yaml @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# Copyright (C) 2023, Raspberry Pi Ltd +# +%YAML 1.1 +--- +# Specifies the control id ranges/offsets for core/draft libcamera and vendor +# controls and properties. +ranges: + # Core libcamera controls + libcamera: 0 + # Draft designated libcamera controls + draft: 10000 + # Raspberry Pi vendor controls + rpi: 20000 + # Next range starts at 30000 + +... diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 6d9902e6..45f63e93 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -141,11 +141,13 @@ foreach mode, input_files : controls_mode_files template_file = files('property_ids.cpp.in') endif + ranges_file = files('control_ranges.yaml') control_sources += custom_target(mode + '_cpp', input : input_files, output : mode + '_ids.cpp', command : [gen_controls, '-o', '@OUTPUT@', - '--mode', mode, '-t', template_file, '@INPUT@']) + '--mode', mode, '-t', template_file, + '-r', ranges_file, '@INPUT@']) endforeach libcamera_sources += control_sources |