[libcamera-devel,v2,2/6] android: camera_capabilities: Set read sensor settings capability
diff mbox series

Message ID 20211220232629.1485890-3-paul.elder@ideasonboard.com
State Accepted
Headers show
Series
  • android: Miscellaneous fixes
Related show

Commit Message

Paul Elder Dec. 20, 2021, 11:26 p.m. UTC
A libcamera camera that supports the manual sensor capability also
satisfies all the requirements for the read sensor settings capability.
Set it.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 src/android/camera_capabilities.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Jacopo Mondi Dec. 21, 2021, 8:48 a.m. UTC | #1
Hi Paul,

On Mon, Dec 20, 2021 at 05:26:25PM -0600, Paul Elder wrote:
> A libcamera camera that supports the manual sensor capability also
> satisfies all the requirements for the read sensor settings capability.
> Set it.
>

I'll copy the definition of READ_SENSOR_SETTINGS below for reference

READ_SENSOR_SETTINGS (v3.2) [optional] The camera device supports
accurately reporting the sensor settings for many of the sensor
controls while the built-in 3A algorithm is running. This allows
reporting of sensor settings even when these settings cannot be
manually changed.  The values reported for the following controls are
guaranteed to be available in the CaptureResult, including when 3A is
enabled:

Exposure control android.sensor.exposureTime Sensitivity control
android.sensor.sensitivity Lens controls (if the lens is adjustable)
android.lens.focusDistance android.lens.aperture This capability is a
subset of the MANUAL_SENSOR control capability, and will always be
included if the MANUAL_SENSOR capability is available.


> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/android/camera_capabilities.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> index 6ae2cd4d..6d383486 100644
> --- a/src/android/camera_capabilities.cpp
> +++ b/src/android/camera_capabilities.cpp
> @@ -339,8 +339,11 @@ CameraCapabilities::computeCapabilities()
>
>  	capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE);
>
> -	if (validateManualSensorCapability())
> +	if (validateManualSensorCapability()) {
>  		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
> +		/* The libcamera requirements cover this */
> +		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS);

So yes, it seems READ_SENSOR_SETTING < MANUAL_SENSOR.
If you want a comment, I would rather say that instead of mentioning
the 'libcamera requirements'.

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> +	}
>
>  	if (validateManualPostProcessingCapability())
>  		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING);
> --
> 2.27.0
>

Patch
diff mbox series

diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 6ae2cd4d..6d383486 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -339,8 +339,11 @@  CameraCapabilities::computeCapabilities()
 
 	capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE);
 
-	if (validateManualSensorCapability())
+	if (validateManualSensorCapability()) {
 		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
+		/* The libcamera requirements cover this */
+		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS);
+	}
 
 	if (validateManualPostProcessingCapability())
 		capabilities.insert(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING);