summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: ef78e48)
raw | patch | inline | side by side (from parent 1: ef78e48)
author | Frank Livingston <frank-livingston@ti.com> | |
Tue, 11 Oct 2016 16:54:59 +0000 (11:54 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Tue, 11 Oct 2016 16:54:59 +0000 (11:54 -0500) |
pasdk/test_arm/framework/audioStreamDecodeProc.c | patch | blob | history |
diff --git a/pasdk/test_arm/framework/audioStreamDecodeProc.c b/pasdk/test_arm/framework/audioStreamDecodeProc.c
index 8b695a53ea61411e3df5473068f15856faf6d484..8f628d00cc209140d78af5491115ce1a0a0fd649 100644 (file)
MessageQ_QueueId queId;
Int status;
Int zI;
+ Int bufEnd, wrapSize, currentBufSize, chunkSize;
Log_info0("Enter taskAsdpFxn()");
{
size *= pIpBufConfig->stride;
}
- Cache_inv((Ptr)pIpBufConfig->pntr.pSmInt, size, Cache_Type_ALLD, 0);
+
+ bufEnd = (Int) pIpBufConfig->base.pVoid + pIpBufConfig->sizeofBuffer;
+ currentBufSize = (bufEnd - (Int)pIpBufConfig->pntr.pSmInt);
+ if (currentBufSize >= size)
+ {
+ chunkSize = size;
+ }
+ else
+ {
+ chunkSize = currentBufSize;
+ }
+ wrapSize = size - chunkSize;
+ // invalidate input data
+ Cache_inv((Ptr)pIpBufConfig->pntr.pSmInt, chunkSize, Cache_Type_ALLD, 0);
+ TRACE_MSG2("IBUF : pIpBufConfig->pntr.pSmInt: 0x%x and chunkSize: %d", pIpBufConfig->pntr.pSmInt, chunkSize);
// invalidate Dec configuration
Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
// status for selected decoder should be invalidated
Cache_wait();
-
+
+ /* Circular buffer wrap condition*/
+ //if(((Int) pIpBufConfig->head.pVoid + size) > bufEnd)
+ if(wrapSize > 0)
+ {
+ // invalidate input data
+ Cache_inv((Ptr)pIpBufConfig->base.pSmInt, wrapSize, Cache_Type_ALLD, 0);
+ TRACE_MSG2("IBUF : pIpBufConfig->base.pSmInt: 0x%x and wrapSize: %d",pIpBufConfig->base.pSmInt, wrapSize);
+ // status for selected decoder should be invalidated
+ Cache_wait();
+ }
+ /* Circular buffer wrap condition */
+
dec = (DEC_Handle)alg[z];
errno = 0;
if (dec->fxns->info)