am a7ccfa60: OMX_GetState() always timeout after OMX_StateIdle to OMX_StateLoaded transition. The timeout duration is 3 seconds, which slows down the shutdown of the audio omx encoder component
diff --git a/omx/audio/src/openmax_il/aac_dec/inc/OMX_AacDec_Utils.h b/omx/audio/src/openmax_il/aac_dec/inc/OMX_AacDec_Utils.h
index d4ddeed..6b51fd7 100644
--- a/omx/audio/src/openmax_il/aac_dec/inc/OMX_AacDec_Utils.h
+++ b/omx/audio/src/openmax_il/aac_dec/inc/OMX_AacDec_Utils.h
@@ -537,6 +537,10 @@
IUALG_CMD_USERCMDSTART_AACDEC = 100
}IUALG_Cmd_AAC_DEC;
+typedef enum{
+ IAAC_WARN_DATA_CORRUPT = 0x0804
+}IAAC_WARN_MSG;
+
#ifdef UNDER_CE
#ifndef _OMX_EVENT_
#define _OMX_EVENT_
diff --git a/omx/audio/src/openmax_il/aac_dec/src/OMX_AacDec_Utils.c b/omx/audio/src/openmax_il/aac_dec/src/OMX_AacDec_Utils.c
index 02c1911..f8fc446 100644
--- a/omx/audio/src/openmax_il/aac_dec/src/OMX_AacDec_Utils.c
+++ b/omx/audio/src/openmax_il/aac_dec/src/OMX_AacDec_Utils.c
@@ -3834,6 +3834,9 @@
}
#endif
break;
+ case IAAC_WARN_DATA_CORRUPT:
+ OMX_ERROR4(pComponentPrivate->dbg, "LCML_Callback: Algorithm error, stream corrupt\n");
+ break;
case IUALG_WARN_CONCEALED:
case IUALG_WARN_UNDERFLOW:
case IUALG_WARN_OVERFLOW:
diff --git a/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c b/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c
index 7a25564..c74082a 100644
--- a/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c
+++ b/omx/system/src/openmax_il/lcml/src/LCML_DspCodec.c
@@ -1853,13 +1853,21 @@
{
char *tmp2 = NULL;
- status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, tmpDspStructAddress, sizeof(TArmDspCommunicationStruct));
- if(DSP_FAILED(status))
+ status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc,
+ tmpDspStructAddress, sizeof(TArmDspCommunicationStruct));
+ if (DSP_FAILED(status)) {
LOGE("Invalidate for communication structure failed. status = 0x%x\n", status);
+ }
- status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc, tmpDspStructAddress->iArmParamArg, tmpDspStructAddress->iParamSize);
- if(DSP_FAILED(status))
- LOGE("Invalidate for arm parameter arguments failed. status = 0x%x\n", status);
+ // Only invalidate the memory when the pointer points to some valid memory region
+ // otherwise, we will get logging spam
+ if (tmpDspStructAddress->iArmParamArg != NULL && tmpDspStructAddress->iParamSize > 0) {
+ status = DSPProcessor_InvalidateMemory(hDSPInterface->dspCodec->hProc,
+ tmpDspStructAddress->iArmParamArg, tmpDspStructAddress->iParamSize);
+ if (DSP_FAILED(status)) {
+ LOGE("Invalidate for arm parameter arguments failed. status = 0x%x\n", status);
+ }
+ }
event = EMMCodecBufferProcessed;
args[0] = (void *) bufType;