[libcamera-devel,v3,02/13] libcamera: controls: Add AeEnable

Message ID 20190927024417.725906-3-niklas.soderlund@ragnatech.se
State Superseded
Headers show
Series
  • libcamera: ipa: Add basic IPA support
Related show

Commit Message

Niklas Söderlund Sept. 27, 2019, 2:44 a.m. UTC
Add a control to turn Auto Exposure on or off.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
---
 include/libcamera/control_ids.h |  1 +
 src/libcamera/controls.cpp      | 17 +++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

Comments

Laurent Pinchart Sept. 28, 2019, 5:28 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Fri, Sep 27, 2019 at 04:44:06AM +0200, Niklas Söderlund wrote:
> Add a control to turn Auto Exposure on or off.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
> ---
>  include/libcamera/control_ids.h |  1 +
>  src/libcamera/controls.cpp      | 17 +++++++++++++++--
>  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
> index 75b6a2d5cafeca72..8cd44e571f705ac5 100644
> --- a/include/libcamera/control_ids.h
> +++ b/include/libcamera/control_ids.h
> @@ -13,6 +13,7 @@
>  namespace libcamera {
>  
>  enum ControlId {
> +	AeEnable,
>  	AwbEnable,
>  	Brightness,
>  	Contrast,
> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
> index 727fdbd9450d2f40..44cb09d9102d93f6 100644
> --- a/src/libcamera/controls.cpp
> +++ b/src/libcamera/controls.cpp
> @@ -186,6 +186,13 @@ std::string ControlValue::toString() const
>   * \brief Numerical control ID
>   */
>  
> +/**
> + * \var AeEnable
> + * ControlType: Bool
> + *
> + * Enable or disable the auto-exposure algorithm. \sa ControlId::ManualExposure.

s/ \\sa/\r * \\sa/ (a.k.a. line break before \sa :-))

> + */
> +
>  /**
>   * \var AwbEnable
>   * ControlType: Bool
> @@ -218,14 +225,20 @@ std::string ControlValue::toString() const
>   * \var ManualExposure
>   * ControlType: Integer
>   *
> - * Specify a fixed exposure time in milli-seconds
> + * Specify a fixed exposure time in milli-seconds.
> + *
> + * This control is only considered if AeEnable is not enabled. If present at

s/is not enabled/is disabled/

> + * at the same time as AeEnable the value will be ignored.

Is it ignored but stored, in which case the value will take effect when
AeEnable is turned off, or is it ignored completely ? I think the
wording needs to be clarified a bit.

>   */
>  
>  /**
>   * \var ManualGain
>   * ControlType: Integer
>   *
> - * Specify a fixed gain parameter
> + * Specify a fixed gain parameter.
> + *
> + * This control is only considered if AeEnable is not enabled. If present at
> + * at the same time as AeEnable the value will be ignored.

Same here.

>   */
>  
>  /**

Patch

diff --git a/include/libcamera/control_ids.h b/include/libcamera/control_ids.h
index 75b6a2d5cafeca72..8cd44e571f705ac5 100644
--- a/include/libcamera/control_ids.h
+++ b/include/libcamera/control_ids.h
@@ -13,6 +13,7 @@ 
 namespace libcamera {
 
 enum ControlId {
+	AeEnable,
 	AwbEnable,
 	Brightness,
 	Contrast,
diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp
index 727fdbd9450d2f40..44cb09d9102d93f6 100644
--- a/src/libcamera/controls.cpp
+++ b/src/libcamera/controls.cpp
@@ -186,6 +186,13 @@  std::string ControlValue::toString() const
  * \brief Numerical control ID
  */
 
+/**
+ * \var AeEnable
+ * ControlType: Bool
+ *
+ * Enable or disable the auto-exposure algorithm. \sa ControlId::ManualExposure.
+ */
+
 /**
  * \var AwbEnable
  * ControlType: Bool
@@ -218,14 +225,20 @@  std::string ControlValue::toString() const
  * \var ManualExposure
  * ControlType: Integer
  *
- * Specify a fixed exposure time in milli-seconds
+ * Specify a fixed exposure time in milli-seconds.
+ *
+ * This control is only considered if AeEnable is not enabled. If present at
+ * at the same time as AeEnable the value will be ignored.
  */
 
 /**
  * \var ManualGain
  * ControlType: Integer
  *
- * Specify a fixed gain parameter
+ * Specify a fixed gain parameter.
+ *
+ * This control is only considered if AeEnable is not enabled. If present at
+ * at the same time as AeEnable the value will be ignored.
  */
 
 /**