Camera3: Define and use upper bound on SYNC latency
Per-frame control is not supported on front sensor,
but sync value of 4 frames is a conservative and safe
estimate for front camera & is within the upperbound.
Use this upperbound to help with faster burst captures.
Bug: 18468006
Change-Id: Icf2a52d985bc17198a36d9afb9717697970ea457
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index 4f1962c..db14f0f 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -61,6 +61,7 @@
#define EMPTY_PIPELINE_DELAY 2
#define PARTIAL_RESULT_COUNT 2
#define FRAME_SKIP_DELAY 0
+#define CAM_MAX_SYNC_LATENCY 4
#define VIDEO_4K_WIDTH 3840
#define VIDEO_4K_HEIGHT 2160
@@ -4617,7 +4618,7 @@
staticInfo.update(ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP,
io_format_map, 0);
- int32_t max_latency = (facingBack)? ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL:ANDROID_SYNC_MAX_LATENCY_UNKNOWN;
+ int32_t max_latency = (facingBack)? ANDROID_SYNC_MAX_LATENCY_PER_FRAME_CONTROL:CAM_MAX_SYNC_LATENCY;
staticInfo.update(ANDROID_SYNC_MAX_LATENCY,
&max_latency,
1);