From af088b88f50d4b1ba0e0688c18d561becefc5bbf Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Mon, 4 Jan 2021 18:26:28 +0100 Subject: android: camera_device: Support AWB_AUTO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- src/android/camera_device.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/android') diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index 9f045777..1a2e58c6 100644 --- a/src/android/camera_device.cpp +++ b/src/android/camera_device.cpp @@ -808,8 +808,12 @@ const camera_metadata_t *CameraDevice::getStaticMetadata() availableStabilizationModes.data(), availableStabilizationModes.size()); + /* + * \todo Inspect the Camera capabilities to report the available + * AWB modes. Default to AUTO as CTS tests require it. + */ std::vector availableAwbModes = { - ANDROID_CONTROL_AWB_MODE_OFF, + ANDROID_CONTROL_AWB_MODE_AUTO, }; staticMetadata_->addEntry(ANDROID_CONTROL_AWB_AVAILABLE_MODES, availableAwbModes.data(), -- cgit v1.2.1