@@ -572,7 +572,6 @@ int CameraCapabilities::initializeStaticMetadata()
ANDROID_CONTROL_AE_MODE_OFF) == aeModes.end()) {
LOG(HAL, Info) << "AE cannot be turned off";
hwLevels.erase(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_FULL);
- /* \todo Double check if this is the correct capability */
capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
}
@@ -700,9 +699,17 @@ int CameraCapabilities::initializeStaticMetadata()
capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR);
}
- uint8_t awbLockAvailable = ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE;
- staticMetadata_->addEntry(ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
- awbLockAvailable);
+ uint8_t awbLockAvailable = setMetadata<uint8_t, bool>(
+ staticMetadata_.get(),
+ ANDROID_CONTROL_AWB_LOCK_AVAILABLE,
+ controlsInfo, &controls::AwbLock,
+ ControlRange::Max,
+ (uint8_t)ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE);
+ if (awbLockAvailable != ANDROID_CONTROL_AWB_LOCK_AVAILABLE_TRUE) {
+ LOG(HAL, Info) << "AWB lock is unavailable";
+ capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE);
+ capabilities.erase(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING);
+ }
char availableControlModes = ANDROID_CONTROL_MODE_AUTO;
staticMetadata_->addEntry(ANDROID_CONTROL_AVAILABLE_MODES,
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@ideasonboard.com> --- Changes in v3: - use new setMetadata - rebase on camera capabilities refactor TODO: plumb result metadata --- src/android/camera_capabilities.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)