[libcamera-devel,v4,1/5] libcamera: control_ids: Add comment to specify control direction

Message ID 20200424104700.26819-2-naush@raspberrypi.com
State Accepted
Headers show
Series
  • Patchset for libcamera controls
Related show

Commit Message

Naushir Patuck April 24, 2020, 10:46 a.m. UTC
Document that controls are bi-directional by default. If a control
is only returned in metadata, this must be specified in the control's
description.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
---
 src/libcamera/control_ids.cpp.in | 3 +++
 src/libcamera/control_ids.yaml   | 2 ++
 2 files changed, 5 insertions(+)

Comments

Laurent Pinchart April 24, 2020, 10:54 a.m. UTC | #1
Hi Naush,

Thank you for the patch.

On Fri, Apr 24, 2020 at 11:46:56AM +0100, Naushir Patuck wrote:
> Document that controls are bi-directional by default. If a control
> is only returned in metadata, this must be specified in the control's
> description.
> 
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  src/libcamera/control_ids.cpp.in | 3 +++
>  src/libcamera/control_ids.yaml   | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/control_ids.cpp.in b/src/libcamera/control_ids.cpp.in
> index 99c511d0..cba6258d 100644
> --- a/src/libcamera/control_ids.cpp.in
> +++ b/src/libcamera/control_ids.cpp.in
> @@ -33,6 +33,9 @@ ${controls_def}
>  
>  /**
>   * \brief List of all supported libcamera controls
> + *
> + * Unless otherwise stated, all controls are bi-directional, i.e. they can be
> + * set through Request::controls() and returned out through Request::metadata().
>   */
>  extern const ControlIdMap controls {
>  ${controls_map}
> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> index 4befec74..bcbab195 100644
> --- a/src/libcamera/control_ids.yaml
> +++ b/src/libcamera/control_ids.yaml
> @@ -4,6 +4,8 @@
>  #
>  %YAML 1.2
>  ---
> +# Unless otherwise stated, all controls are bi-directional, i.e. they can be
> +# set through Request::controls() and returned out through Request::metadata().
>  controls:
>    - AeEnable:
>        type: bool

Patch

diff --git a/src/libcamera/control_ids.cpp.in b/src/libcamera/control_ids.cpp.in
index 99c511d0..cba6258d 100644
--- a/src/libcamera/control_ids.cpp.in
+++ b/src/libcamera/control_ids.cpp.in
@@ -33,6 +33,9 @@  ${controls_def}
 
 /**
  * \brief List of all supported libcamera controls
+ *
+ * Unless otherwise stated, all controls are bi-directional, i.e. they can be
+ * set through Request::controls() and returned out through Request::metadata().
  */
 extern const ControlIdMap controls {
 ${controls_map}
diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
index 4befec74..bcbab195 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -4,6 +4,8 @@ 
 #
 %YAML 1.2
 ---
+# Unless otherwise stated, all controls are bi-directional, i.e. they can be
+# set through Request::controls() and returned out through Request::metadata().
 controls:
   - AeEnable:
       type: bool