@@ -675,10 +675,10 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
{
/*
* \todo Keep this in sync with the actual number of entries.
- * Currently: 54 entries, 874 bytes of static metadata
+ * Currently: 55 entries, 878 bytes of static metadata
*/
- uint32_t numEntries = 54;
- uint32_t byteSize = 874;
+ uint32_t numEntries = 55;
+ uint32_t byteSize = 878;
/*
* Calculate space occupation in bytes for dynamically built metadata
@@ -982,10 +982,20 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
exposureInfo->second.min().get<int32_t>() * 1000LL,
exposureInfo->second.max().get<int32_t>() * 1000LL,
};
+ /* min must be at most 100us, max at least 100ms */
+ if (exposureTimeRange[0] > 100000)
+ exposureTimeRange[0] = 100000;
+ if (exposureTimeRange[1] < 100000000)
+ exposureTimeRange[1] = 100000000;
staticMetadata_->addEntry(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE,
&exposureTimeRange, 2);
}
+ /* min at most 100, max at least 800 */
+ int32_t maxAnalogSensitivity = 800;
+ staticMetadata_->addEntry(ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,
+ &maxAnalogSensitivity, 1);
+
staticMetadata_->addEntry(ANDROID_SENSOR_ORIENTATION, &orientation_, 1);
std::vector<int32_t> testPatterModes = {
@@ -1270,6 +1280,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE,
ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,
ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE,
+ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,
ANDROID_SENSOR_ORIENTATION,
ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES,
ANDROID_STATISTICS_INFO_MAX_FACE_COUNT,
The exposure time range minimum must be at most 100us, and the maximum at least 100ms. Clamp these values. The maximum analog sensitivity is a required static metadata entry for hardware level FULL. Add it. This allows the following CTS test to pass: - android.hardware.camera2.cts.CaptureRequestTest#testFlashControl Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- src/android/camera_device.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)