From fa77a02c0a099ad02ed55935bdbe8cd441a8d893 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Fri, 24 Apr 2020 11:46:57 +0100 Subject: libcamera: controls: Updates to gain and exposure controls Rename: ManualExposure -> ExposureTime ManualGain -> AnalogueGain Use micro-seconds units for ExposureTime. This is changed from milli- seconds. The latter would not allow very low exposure times. AnalogueGain switch to use a float to allow fractional gain adjustments. Update the uvcvideo pipeline handler to use the new exposure and gain units. For ExposureTime, UVC uses units of 100 micro-seconds, so map the values before setting V4L2_CID_EXPOSURE_ABSOLUTE. For AnalogueGain, UVC has no explicit gain units, so map the default gain value to 1.0 and linearly scale to the requested value. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- src/libcamera/control_ids.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/libcamera/control_ids.yaml') diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index bcbab195..d8bdb382 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -12,7 +12,7 @@ controls: description: | Enable or disable the AE. - \sa ManualExposure + \sa ExposureTime AnalogueGain - AeLocked: type: bool @@ -30,8 +30,6 @@ controls: description: | Enable or disable the AWB. - \sa ManualGain - - Brightness: type: int32_t description: Specify a fixed brightness parameter @@ -44,12 +42,20 @@ controls: type: int32_t description: Specify a fixed saturation parameter - - ManualExposure: + - ExposureTime: type: int32_t - description: Specify a fixed exposure time in milli-seconds + description: | + Exposure time (shutter speed) for the frame applied in the sensor + device. This value is specified in micro-seconds. - - ManualGain: - type: int32_t - description: Specify a fixed gain parameter + \sa AnalogueGain AeEnable + + - AnalogueGain: + type: float + description: | + Analogue gain value applied in the sensor device. + The value of the control specifies the gain multiplier applied to all + colour channels. This value cannot be lower than 1.0. + \sa ExposureTime AeEnable ... -- cgit v1.2.1