diff --git a/pasdk/test_dsp/framework/audioStreamInpProcNewIO.c b/pasdk/test_dsp/framework/audioStreamInpProcNewIO.c
index 1ce5608d32efdafd040b152b3849b7e90198dad9..4d95b8b4bd579144d7b9c4d114d1a59a57157707 100644 (file)
Int inputReadyForProcessing;
#endif
+ Int firstTimeInit = TRUE;
+
Log_info0("Enter taskAsipFxn()");
taskAsipFxnInit(pP, pQ); // initialization of input task
inputReadyForProcessing = asipPrepareProcessing(pP, pQ, pAsitCfg, &asipErrno);
if (inputReadyForProcessing) {
- // Input is ready for processing, so we initialize the I/O components
- asipIoCompsInit(&pAstCfg->xInp[zMI], pInp);
+ // Input is ready for processing, so we initialize the I/O components.
+ // Note that the I/O components init. and I/O PHY prime are performed only at the
+ // first time. This should be changed later - init. and prime should be done whenever
+ // input interface has changed.
+ if(firstTimeInit) {
+ asipIoCompsInit(&pAstCfg->xInp[zMI], pInp);
+
+ // Start I/O physical layer by priming McASP LLD for input
+ asipIoPhyPrime(pInp);
+
+ firstTimeInit = FALSE;
+ }
// Initialize ASIP processing
asipProcInit(pInp, &pAsitCfg->inpDec);
- // Start I/O physical layer by priming McASP LLD for input
- asipIoPhyPrime(pInp);
-
pInp->asipState = ASIP_INPUT_PROCESSING;
}
break;
}
// Inform decoder to complete decoding previous frame
- pInp->sourceSelect = PAF_SOURCE_UNKNOWN;
+ pInp->sourceSelect = PAF_SOURCE_NONE;
pInp->numFrameReceived = 0;
pInp->asipProcState = ASIP_SOURCE_DETECTION;
#ifndef PCM_LOOPBACK_TEST
asipStatus = asipDecodeProcessing(pP, pQ, pAsitCfg, pInp->sourceSelect);
if(asipStatus != ASIP_NO_ERR) {
+
+ // FL: send dec exit message to slave
+ if( AspMsgSend(ASP_SLAVE_DEC_EXIT, ASP_MASTER_DEC_EXIT_DONE, NULL, NULL)
+ != ASP_MSG_NO_ERR)
+ {
+ TRACE_VERBOSE0("TaskAsip: error in sending DEC_EXIT message");
+ SW_BREAKPOINT;
+ }
+
return asipStatus;
}
#else