[libcamera-devel,11/12] android: camera_device: Support AWB_AUTO
diff mbox series

Message ID 20210105190522.682324-12-jacopo@jmondi.org
State Accepted
Delegated to: Jacopo Mondi
Headers show
Series
  • android: Exposure times + scaler crop + android metadata
Related show

Commit Message

Jacopo Mondi Jan. 5, 2021, 7:05 p.m. UTC
Claim support for the AWB_AUTO mode in the
ANDROID_CONTROL_AWB_AVAILABLE_MODES static metadata.

This fixes the CTS test error:
android.hardware.camera2.cts.CaptureRequestTest#testAwbModeAndLock fail
The static info key 'android.control.awbAvailableModes'
All camera devices must support AUTO mode

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/android/camera_device.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart Jan. 11, 2021, 12:13 a.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Tue, Jan 05, 2021 at 08:05:21PM +0100, Jacopo Mondi wrote:
> Claim support for the AWB_AUTO mode in the
> ANDROID_CONTROL_AWB_AVAILABLE_MODES static metadata.
> 
> This fixes the CTS test error:
> android.hardware.camera2.cts.CaptureRequestTest#testAwbModeAndLock fail
> The static info key 'android.control.awbAvailableModes'
> All camera devices must support AUTO mode
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  src/android/camera_device.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 5f5e6576365b..6eb3404739e8 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -802,7 +802,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
>  				  availableStabilizationModes.size());
>  
>  	std::vector<uint8_t> availableAwbModes = {
> -		ANDROID_CONTROL_AWB_MODE_OFF,
> +		ANDROID_CONTROL_AWB_MODE_AUTO,

I wonder if we should query the pipeline handler to only report auto
when supported. This would break CTS for devices that don't support AWB,
but it would be better than faking it.

We can decide to handle this later if it would be too much effort right
now.

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

>  	};
>  	staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES,
>  				  availableAwbModes.data(),
Niklas Söderlund Jan. 18, 2021, 3:40 p.m. UTC | #2
Hi Jacopo,

Thanks for your work.

On 2021-01-05 20:05:21 +0100, Jacopo Mondi wrote:
> Claim support for the AWB_AUTO mode in the
> ANDROID_CONTROL_AWB_AVAILABLE_MODES static metadata.
> 
> This fixes the CTS test error:
> android.hardware.camera2.cts.CaptureRequestTest#testAwbModeAndLock fail
> The static info key 'android.control.awbAvailableModes'
> All camera devices must support AUTO mode
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/android/camera_device.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 5f5e6576365b..6eb3404739e8 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -802,7 +802,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
>  				  availableStabilizationModes.size());
>  
>  	std::vector<uint8_t> availableAwbModes = {
> -		ANDROID_CONTROL_AWB_MODE_OFF,
> +		ANDROID_CONTROL_AWB_MODE_AUTO,
>  	};
>  	staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES,
>  				  availableAwbModes.data(),
> -- 
> 2.29.2
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch
diff mbox series

diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 5f5e6576365b..6eb3404739e8 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -802,7 +802,7 @@  const camera_metadata_t *CameraDevice::getStaticMetadata()
 				  availableStabilizationModes.size());
 
 	std::vector<uint8_t> availableAwbModes = {
-		ANDROID_CONTROL_AWB_MODE_OFF,
+		ANDROID_CONTROL_AWB_MODE_AUTO,
 	};
 	staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES,
 				  availableAwbModes.data(),