summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1e895bf)
raw | patch | inline | side by side (parent: 1e895bf)
author | Frank Livingston <frank-livingston@ti.com> | |
Fri, 16 Feb 2018 22:05:59 +0000 (16:05 -0600) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Fri, 16 Feb 2018 22:05:59 +0000 (16:05 -0600) |
diff --git a/pasdk/test_dsp/framework/audioStreamOutIo.c b/pasdk/test_dsp/framework/audioStreamOutIo.c
index 7c715ba59613a2a55338fb81459825d0e80cc0f3..a936b0ecbf8f74933651a696c5ff3c6dfbf32634 100644 (file)
pOutIo->phyXferSize = ioPhyParams.xferFrameSize;
- pOutIo->ioBuffNumOvr = 0; // initialize number of IO buff overflows
- pOutIo->ioBuffNumUnd = 0; // initialize number of IO buff underflows
+ pOutIo->ioBuffBuf2AllocCnt = 0; // initialize buffer2 alloc count (indicates Output buffer wrap)
+ pOutIo->errIoBuffOvrCnt = 0; // initialize IO buff overflow count
+ pOutIo->errIoBuffUndCnt = 0; // initialize IO buff underflow count
return 0;
} /* asopIoCompsInit */
pOutBufCfg->base.pLgInt = outBuffInfo.base;
pOutBufCfg->sizeofBuffer = outBuffInfo.size;
- pOutBuf->pOutBuf = &(pOutBuf->outBufConfig);
+ pOutBuf->pOutBuf = &(pOutBuf->outBufConfig);
return 0;
}
&buff1, &size1, &buff2, &size2);
if (status == IOBUFF_ERR_OVERFLOW)
{
- pOutIo->ioBuffNumOvr++;
+ pOutIo->errIoBuffOvrCnt++;
//System_printf ("asopUpdateOutBufConfig: output buff overflow\n"); // debug
// skip processing since output buffer overflows
}
else if (status == IOBUFF_ERR_UNDERFLOW)
{
- pOutIo->ioBuffNumUnd++;
+ pOutIo->errIoBuffUndCnt++;
//System_printf ("asopUpdateOutBufConfig: output buff underflow\n"); // debug
// already underflows and remain in underflow
// Update Output buffer pointer for Encoder
pOutBufCfg->pntr.pLgInt = buff1;
+ if ((buff2 != NULL) || (size2 != 0))
+ {
+ // buff2 should always be NULL for Output & size2 should always be 0 for Output.
+ // Track this here.
+ pOutIo->ioBuffBuf2AllocCnt++; // debug
+ }
// save buffer pointers & sizes for later write complete
pOutIo->buff1 = buff1;
pOutIo->size1 = size1;
- pOutIo->buff2 = buff2; // this should always be NULL for Output
- pOutIo->size2 = size2; // this should always be 0 for Output
+ pOutIo->buff2 = buff2;
+ pOutIo->size2 = size2;
return 0;
}
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.c b/pasdk/test_dsp/framework/audioStreamOutProc.c
index a4e9327dfd12af59a5d1c02298a944c9a6fcce64..34e9d73e006461ea60aa396798d1b54a7f93d347 100644 (file)
if (status == ASOP_SOK)
{
// Update Output buffer configuration
- errno = asopUpdateOutBufConfig(&pAstCfg->xOut[zO], &pAsotCfg->pIoOut[zO]);
- if (errno)
+ asopUpdateOutBufConfig(&pAstCfg->xOut[zO], &pAsotCfg->pIoOut[zO]);
+
+ // Execute encode
+ errno = asopDecOutProcEncode(pP, pQ, pAsotCfg, frame);
+ if (errno < 0)
{
status = errno;
}
- else
- {
- // Execute encode
- errno = asopDecOutProcEncode(pP, pQ, pAsotCfg, frame);
- if (errno < 0)
- {
- status = errno;
- }
- else
- {
- // Mark Output buffers write complete
- errno = asopMarkOutBuffsWriteComplete(&pAstCfg->xOut[zO], &pAsotCfg->pIoOut[zO]);
- if (errno)
- {
- status = errno;
- }
- }
- }
+
+ // Mark Output buffers write complete
+ asopMarkOutBuffsWriteComplete(&pAstCfg->xOut[zO], &pAsotCfg->pIoOut[zO]);
}
if (status == ASOP_SOK)
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.h b/pasdk/test_dsp/framework/audioStreamOutProc.h
index c3ba449de5ca79810c266995ab39b1766b60d534..ce37c3aaf49762e0e4521813e09500d218315378 100644 (file)
size_t size1; // size of 1st buffer in output memory pool
size_t size2; // size of 2nd buffer in output memory pool
- uint32_t ioBuffNumUnd;
- uint32_t ioBuffNumOvr;
+ uint32_t ioBuffBuf2AllocCnt;
+ uint32_t errIoBuffOvrCnt;
+ uint32_t errIoBuffUndCnt;
// debugging counters
uint32_t num_xfers;