summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd0da05)
raw | patch | inline | side by side (parent: cd0da05)
author | Frank Livingston <frank-livingston@ti.com> | |
Fri, 20 Apr 2018 00:16:04 +0000 (19:16 -0500) | ||
committer | Frank Livingston <frank-livingston@ti.com> | |
Fri, 20 Apr 2018 00:16:04 +0000 (19:16 -0500) |
diff --git a/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c b/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
index ca3f92354170a5dd218501f5d3df0c32ee336956..0813dfb38e5af1856a4567916f28ade8eeb68039 100644 (file)
Int16 *pStrFrameLen // stream frame length
)
{
+ IArg key;
+ GateMP_Handle gateHandle;
PAF_AST_DecOpCircBuf *pCb;
- // CB stream frame length only updated on DSP,
- // so no need for GateMP protection
+ // Get gate handle
+ gateHandle = pCbCtl->gateHandle;
+ // Enter gate
+ key = GateMP_enter(gateHandle);
// Get circular buffer base pointer
pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]);
+ // Invalidate circular buffer configuration
+ Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
+ Cache_wait();
+
// Set output frame length
*pStrFrameLen = pCb->strFrameLen;
+ // Leave the gate
+ GateMP_leave(gateHandle, key);
+
return ASP_DECOP_CB_SOK;
}
diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.c b/pasdk/test_dsp/framework/audioStreamInpProc.c
index f03d8907e13ccfbe0f79c216463bf97584c2f3d5..6bad180a2819db6b1d66f734ff8e9cdc118cb9d0 100644 (file)
zMS = pAstCfg->masterStr;
// Decode output circular buffer memory
- if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_EXTERNAL_NONCACHED_SHM,
+ if (!(pAstCfg->xDecOpCb = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM,
DECODEN * sizeof (*pAstCfg->xDecOpCb), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
diff --git a/pasdk/test_dsp/framework/audioStreamOutProc.c b/pasdk/test_dsp/framework/audioStreamOutProc.c
index cfd43a2ed9b3809f17765472f74bed73e0c4888e..2302281b4fcdda81b2b75aca92fedb28477ea900 100644 (file)
PAF_AST_OutInitSyncCtl *pOutIsCtl; // Output Init-Sync control
Int8 decFlag; // dec stage flag
Int status; // status code
+ PAF_AST_DecOpCircBufCtl *pCbCtl; // Decoder output circular buffer control
pAstCfg = pAsotCfg->pAstCfg;
zMD = pAstCfg->masterDec;
}
else
{
- zMS = pAstCfg->masterStr;
- pStrAf = pAstCfg->xStr[zMS].pAudioFrame;
-
- // Set ASOT output frame length
- pDecInfo1Af->sampleCount = gOutFrameLen; // !!!! GJ: Revisit !!!!
-
// FL: moved to PAF_ASOT_initSyncDecDecode1()
// Decode parameters necessary for CB stream FL auto config are known at that time.
// CB stream FL used to configure Stream AF sample count.
// ASP chain reset can adjust Stream AF sample count, depending on whether SRC enabled & decimation factor.
#if 0
+ // Get pointer to circular buffer control
+ pCbCtl = &pAsotCfg->pAspmCfg->decOpCircBufCtl;
+
+ // Initialize decoder output circular buffer for stream reads
+ cbInitStreamRead(pCbCtl, zMD);
+
+ // Get pointer to stream audio frame
+ zMS = pAstCfg->masterStr;
+ pStrAf = pAstCfg->xStr[zMS].pAudioFrame;
+
+ // Set ASOT output frame length
+ //pDecInfo1Af->sampleCount = gOutFrameLen; // !!!! GJ: Revisit !!!!
+ cbReadStrFrameLen(pCbCtl, zMD, &pDecInfo1Af->sampleCount);
+
// Update Stream Audio Frame.
// Copy Dec Info1 AF to Stream AF.
outIsCpyAf(pDecInfo1Af, pStrAf);
}
else
{
+#if 1
// Get pointer to circular buffer control
pCbCtl = &pAsotCfg->pAspmCfg->decOpCircBufCtl;
{
return status;
}
+#endif
// Find first Output associated with Master Stream
zO = OUTPUT1;