[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_dsp / framework / audioStreamInpProc.c
diff --git a/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c b/processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/audioStreamInpProc.c
index 6fe77021fc1ad1480c67e75bc94a079f34004ba2..e1952fe9625f1bfaf6a2b95b3c02e106908a4693 100644 (file)
}
// (***) FL: revisit
- // write back configuration
+ // write back AST shared configuration
Cache_wb(pAstCfg, sizeof(PAF_AST_Config), Cache_Type_ALLD, 0);
// FL: no need to share this pointer, can be local
//Cache_wb(&pC, sizeof(PAF_AST_Config *), Cache_Type_ALLD, 0);
Cache_wait();
// (***) FL: revisit
- // write Dec configuration
+ // write back Dec configuration
Cache_wb(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
)
{
PAF_AST_Config *pAstCfg;
- Int as; /* Audio Stream Number (1, 2, etc.) */
+ PAF_AST_DecOpCircBuf *pCb; /* Decoder output circular buffer */
+ Int as; /* Audio Stream Number (1, 2, etc.) */
Int zMS;
- Int z; /* decode counter */
- PAF_AST_DecOpCircBuf *pCb; /* Decoder output circular buffer */
- Int errno; /* error number */
+ Int z; /* decode counter */
+ Int errno; /* error number */
Error_Block eb;
Int i;
// FL: (***)revisit
-
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
zMS = pAstCfg->masterStr;
-
+
/* Decode output circular buffer memory */
if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
DECODEN * sizeof (*pAstCfg->xDecOpCb), 4, &eb)))
// (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length
// Initialize decoder output circular buffer for PCM
- errno = cbInit(PAF_SOURCE_PCM, 256, FRAMELENGTH, pCb, 1);
+ errno = cbInit(pCb);
if (errno)
{
SW_BREAKPOINT; // FL: debug
return errno;
}
- // FL: debug
- cbLog(pCb, 1, "PAF_ASIT_initPhaseDecOpCircBuf:cbInit");
}
return 0;
)
{
PAF_AST_Config *pAstCfg;
- Int as; /* Audio Stream Number (1, 2, etc.) */
- Int z; /* decode/encode counter */
- Int errno; /* error number */
+ PAF_AST_DecOpCircBufCtl *pCbCtl; /* Decoder output circular buffer control */
+ Int as; /* Audio Stream Number (1, 2, etc.) */
+ Int z; /* decode/encode counter */
+ Int errno; /* error number */
Int zI, zS;
Int zMD;
Int zMI;
- ASP_Msg* pAspMsg; /* Messaging */
+ ASP_Msg* pAspMsg; /* Messaging */
Int argIdx;
Int decErrno;
Int status;
- PAF_AST_DecOpCircBuf *pCb; /* Decoder output circular buffer */
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
zMI = pP->zone.master;
(void)as; // clear compiler warning in case not used with tracing disabled
+ pCbCtl = &pC->pAspmCfg->decOpCircBufCtl; // get pointer to circular buffer control
+
// reset frameCount
for (z=DECODE1; z < DECODEN; z++)
{
//pC->xDec[z].decodeControl.rdSampleCount = 0;
// Initialize decoder output circular buffer for selected source
- pCb = &pAstCfg->xDecOpCb[z];
- errno = cbInit(sourceSelect, frameLength, FRAMELENGTH, pCb, 0);
+ errno = cbInitSourceSel(pCbCtl, z, sourceSelect, frameLength, FRAMELENGTH, 0);
if (errno)
{
SW_BREAKPOINT; // FL: debug
return errno;
}
// FL: debug
- cbLog(pCb, 1, "PAF_ASIT_decodeInit:cbInit");
+ cbLog(pCbCtl, z, 1, "PAF_ASIT_decodeInit:cbInitSourceSel");
if (z != zMD)
{
pC->xDec[z].decodeStatus.bufferRatio);
#else
if (sourceSelect == PAF_SOURCE_PCM)
+ {
frameLength = 256;
+ }
else if (sourceSelect == PAF_SOURCE_DDP)
+ {
frameLength = 1536;
+ }
else
+ {
frameLength = 256;
+ }
#endif
// ............................................................................