[libcamera-devel] [PATCH 11/12] android: camera_device: Support AWB_AUTO

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jan 11 01:13:12 CET 2021


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 at 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 at ideasonboard.com>

>  	};
>  	staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES,
>  				  availableAwbModes.data(),

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list