[libcamera-devel] [RFC PATCH v2 3/3] android: Plumb AwbLock control
Paul Elder
paul.elder at ideasonboard.com
Thu Jun 24 12:50:54 CEST 2021
Plumb the AwbLock control into the HAL for
CONTROL_AWB_LOCK_AVAILABLE_MODES for static metadata.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=45
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes in v2:
- use new setMetadata
- rebase on camera capabilities refactor
TODO: plumb result metadata
---
src/android/camera_capabilities.cpp | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 212d61d9..164006f2 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -602,9 +602,14 @@ int CameraCapabilities::initializeStaticMetadata()
staticMetadata_->addEntry(ANDROID_CONTROL_AE_LOCK_AVAILABLE,
aeLockAvailable);
- uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE;
- staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
- awbLockAvailable);
+ uint8_t awbLockAvailable =
+ setMetadata(staticMetadata_.get(), ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
+ controlsInfo, &controls::AwbLock,
+ (uint8_t)ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE, Max);
+ if (!awbLockAvailable) {
+ capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE] = false;
+ capabilities[ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING] = false;
+ }
char availableControlModes = ANDROID_CONTROL_MODE_AUTO;
staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_MODES,
--
2.27.0
More information about the libcamera-devel
mailing list