QCamera2: HAL3: Use cam_stream_ID_t for frame drop

Issue: Wait Until Idle error hits when frame drops
are reported by ISP to HAL, but HAL did not propagate the same
to frameworks

Description:
--ISP sends buffer frame drop in cam_stream_ID_t structure.
--HAL interprets the same cam_frame_dropped_t structure and missing
to report to frameworks

Fix:
--Removed obselete cam_frame_dropped_t structure
--Use cam_stream_ID_t in HAL to read frame drops

Ack-by: Susmitha Gummalla

Change-Id: I80833c6f4de5d2c47a01c49b129f537ba89a5986
diff --git a/QCamera2/HAL3/QCamera3HWI.cpp b/QCamera2/HAL3/QCamera3HWI.cpp
index db6fb29..d3e1b13 100644
--- a/QCamera2/HAL3/QCamera3HWI.cpp
+++ b/QCamera2/HAL3/QCamera3HWI.cpp
@@ -2816,7 +2816,7 @@
             POINTER_OF_META(CAM_INTF_META_URGENT_FRAME_NUMBER_VALID, metadata);
     uint32_t *p_urgent_frame_number =
             POINTER_OF_META(CAM_INTF_META_URGENT_FRAME_NUMBER, metadata);
-    IF_META_AVAILABLE(cam_frame_dropped_t, p_cam_frame_drop, CAM_INTF_META_FRAME_DROPPED,
+    IF_META_AVAILABLE(cam_stream_ID_t, p_cam_frame_drop, CAM_INTF_META_FRAME_DROPPED,
             metadata) {
         LOGD("Dropped frame info for frame_number_valid %d, frame_number %d",
                  *p_frame_number_valid, *p_frame_number);
@@ -2919,7 +2919,7 @@
         // Check whether any stream buffer corresponding to this is dropped or not
         // If dropped, then send the ERROR_BUFFER for the corresponding stream
         // The API does not expect a blob buffer to be dropped
-        if (p_cam_frame_drop && p_cam_frame_drop->frame_dropped) {
+        if (p_cam_frame_drop) {
             /* Clear notify_msg structure */
             camera3_notify_msg_t notify_msg;
             memset(&notify_msg, 0, sizeof(camera3_notify_msg_t));
@@ -2927,8 +2927,8 @@
                     j != i->buffers.end(); j++) {
                 QCamera3ProcessingChannel *channel = (QCamera3ProcessingChannel *)j->stream->priv;
                 uint32_t streamID = channel->getStreamID(channel->getStreamTypeMask());
-                for (uint32_t k = 0; k < p_cam_frame_drop->cam_stream_ID.num_streams; k++) {
-                    if (streamID == p_cam_frame_drop->cam_stream_ID.streamID[k]) {
+                for (uint32_t k = 0; k < p_cam_frame_drop->num_streams; k++) {
+                    if (streamID == p_cam_frame_drop->streamID[k]) {
                         // Send Error notify to frameworks with CAMERA3_MSG_ERROR_BUFFER
                         LOGE("%s: Start of reporting error frame#=%u, streamID=%u streamFormat=%d",
                                 __func__, i->frame_number, streamID, j->stream->format);
diff --git a/QCamera2/stack/common/cam_intf.h b/QCamera2/stack/common/cam_intf.h
index 6430b2b..925fbdc 100644
--- a/QCamera2/stack/common/cam_intf.h
+++ b/QCamera2/stack/common/cam_intf.h
@@ -763,7 +763,7 @@
     /* Specific to HAL3 */
     INCLUDE(CAM_INTF_META_FRAME_NUMBER_VALID,           int32_t,                     1);
     INCLUDE(CAM_INTF_META_URGENT_FRAME_NUMBER_VALID,    int32_t,                     1);
-    INCLUDE(CAM_INTF_META_FRAME_DROPPED,                cam_frame_dropped_t,         1);
+    INCLUDE(CAM_INTF_META_FRAME_DROPPED,                cam_stream_ID_t,             1);
     INCLUDE(CAM_INTF_META_FRAME_NUMBER,                 uint32_t,                    1);
     INCLUDE(CAM_INTF_META_URGENT_FRAME_NUMBER,          uint32_t,                    1);
     INCLUDE(CAM_INTF_META_COLOR_CORRECT_MODE,           uint32_t,                    1);
diff --git a/QCamera2/stack/common/cam_types.h b/QCamera2/stack/common/cam_types.h
index e391496..8197b14 100644
--- a/QCamera2/stack/common/cam_types.h
+++ b/QCamera2/stack/common/cam_types.h
@@ -2342,11 +2342,6 @@
 } cam_flash_ctrl_t;
 
 typedef struct {
-    uint8_t frame_dropped; /*  This flag indicates whether any stream buffer is dropped or not */
-    cam_stream_ID_t cam_stream_ID; /* if dropped, Stream ID of dropped streams */
-} cam_frame_dropped_t;
-
-typedef struct {
     uint8_t ae_mode;
     uint8_t awb_mode;
     uint8_t af_mode;