merge in lmp-mr1-release history after reset to lmp-mr1-dev
diff --git a/camera/QCamera2/HAL3/QCamera3HWI.cpp b/camera/QCamera2/HAL3/QCamera3HWI.cpp
index abe29da..c04a00e 100644
--- a/camera/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/camera/QCamera2/HAL3/QCamera3HWI.cpp
@@ -1301,8 +1301,24 @@
&(i->request_id), 1);
result.result = dummyMetadata.release();
} else {
- result.result = translateFromHalMetadata(metadata,
- i->timestamp, i->request_id, i->jpegMetadata, i->pipeline_depth);
+ uint8_t bufferStalled = *((uint8_t *)
+ POINTER_OF(CAM_INTF_META_FRAMES_STALLED, metadata));
+
+ if (bufferStalled) {
+ result.result = NULL; //Metadata should not be sent in this case
+ camera3_notify_msg_t notify_msg;
+ memset(¬ify_msg, 0, sizeof(camera3_notify_msg_t));
+ notify_msg.type = CAMERA3_MSG_ERROR;
+ notify_msg.message.error.frame_number = i->frame_number;
+ notify_msg.message.error.error_code = CAMERA3_MSG_ERROR_REQUEST;
+ notify_msg.message.error.error_stream = NULL;
+ ALOGE("%s: Buffer stall observed reporting error", __func__);
+ mCallbackOps->notify(mCallbackOps, ¬ify_msg);
+ } else {
+ result.result = translateFromHalMetadata(metadata,
+ i->timestamp, i->request_id, i->jpegMetadata,
+ i->pipeline_depth);
+ }
if (i->blob_request) {
{
diff --git a/camera/QCamera2/stack/common/cam_intf.h b/camera/QCamera2/stack/common/cam_intf.h
index 37ca1ac..83236b0 100644
--- a/camera/QCamera2/stack/common/cam_intf.h
+++ b/camera/QCamera2/stack/common/cam_intf.h
@@ -430,6 +430,7 @@
INCLUDE(CAM_INTF_META_URGENT_FRAME_NUMBER, uint32_t, 1);
INCLUDE(CAM_INTF_META_COLOR_CORRECT_MODE, uint8_t, 1);
INCLUDE(CAM_INTF_META_AWB_REGIONS, cam_area_t, 5);
+ INCLUDE(CAM_INTF_META_FRAMES_STALLED, uint8_t, 1);
/* HAL1 only control */
INCLUDE(CAM_INTF_PARM_SHARPNESS, int32_t, 1);
INCLUDE(CAM_INTF_PARM_CONTRAST, int32_t, 1);
diff --git a/camera/QCamera2/stack/common/cam_types.h b/camera/QCamera2/stack/common/cam_types.h
index 791ea1f..9c3194e 100644
--- a/camera/QCamera2/stack/common/cam_types.h
+++ b/camera/QCamera2/stack/common/cam_types.h
@@ -1097,6 +1097,9 @@
CAM_INTF_META_PROFILE_TONE_CURVE,
CAM_INTF_META_NEUTRAL_COL_POINT,
+ CAM_INTF_META_FRAMES_STALLED,
+ /* Buffer Circulation stopped */
+
CAM_INTF_PARM_MAX
} cam_intf_parm_type_t;