author | Chitresh Gupta <chitresh.g@pathpartnertech.com> | |
Wed, 21 Dec 2016 11:43:42 +0000 (17:13 +0530) | ||
committer | Chitresh Gupta <chitresh.g@pathpartnertech.com> | |
Wed, 21 Dec 2016 11:43:42 +0000 (17:13 +0530) |
1 | 2 | |||
---|---|---|---|---|
pasdk/test_arm/framework/audioStreamDecodeProc.c | patch | | diff1 | | diff2 | | blob | history |
pasdk/test_dsp/framework/alphaFuncProc.c | patch | | diff1 | | diff2 | | blob | history |
index a5ed04e8b177339107973f6d29a91ce54527a017,c73ae2a9fef4070a19937e38dda99c953ab75814..16ce49cf25446bbc36b9f78d1e308737020bc668
TRACE_TERSE2("slaveCmd=%d,decIdx=%d", slaveCmd, z);
// Get input associated w/ decoder
zI = pP->inputsFromDecodes[z];
--
- // invalidate Status structures for Beta Units initialized on Slave
- size = IACP_STD_BETA_TABLE.pStatus[pafBetaMap[sourceSelect]]->size;
- Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[pafBetaMap[sourceSelect]]), size, Cache_Type_ALLD, 0);
- Cache_wait();
+
// (***) FL: revisit
// invalidate Inp configuration
Cache_inv(&pAstCfg->xInp[zI], sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
diff --cc pasdk/test_dsp/framework/alphaFuncProc.c
index 133012e0bc0ec8a5d0131ca90e0ce13591f824a9,8e985b0c3d3ff18a3c36852532f2be107c6510d3..b7257d1be38a1f7a7a22a5a26875cfc3c7b5193c
#define AE_TRACE4(a,b,c,d,e)
#endif
-extern struct {
- Int size;
- IALG_Status *pStatus[512];
-} IACP_STD_BETA_TABLE;
-
+
// Global debug counters */
Uint32 gTaskAfpCnt=0;
return (void *)Memory_alloc((IHeap_Handle)hHeap, size, align, NULL);
}
-// Get the beta number from Alpha command
-Int32 AFP_getBeta(AFP_Handle handle, const ACP_Unit *from)
-{
- ACP_MDS_Obj *acp = (Void *)handle->acp;
-
- ACP_Union *x = (ACP_Union *)from;
-
- Uns write, series, type;
- Int subtype;
-
- Int beta;
-
- if ((x[0].byte.hi & 0xc0) != 0xc0)
- return -1; // legacy
- else if (x[0].word == 0xffff)
- return -1; // non-zero fill
-
- write = x[0].byte.hi & 0x08;
- series = (x[0].byte.hi >> 4) & 0x03;
- type = x[0].byte.hi & 0x07;
- subtype = -1;
-
- if (series >= 4 || ! acp->config.betaTable[series])
- {
- return -1; // No such series
- }
-
- beta = -1;
- switch (type)
- {
- case 0:
- if (!write)
- {
- beta = x[0].byte.lo;
- }
- break;
- case 2:
- case 6:
- beta = x[0].byte.lo;
- break;
- case 3:
- case 4:
- beta = x[0].byte.lo;
- break;
- case 5:
- subtype = x[0].byte.lo;
- switch (subtype)
- {
- case 0:
- type = subtype;
- if (!write)
- {
- beta = x[1].word;
- }
- break;
- case 6:
- case 10:
- beta = x[1].word;
- break;
- case 8:
- if (write)
- {
- return -1; // NO SUBTYPE error
- }
- else
- {
- beta = x[1].word;
- }
- break;
- default:
- return -1;
- }
- default:
- return -1;
- }
- return beta;
-}
-
+
Void AFP_process(
AFP_Handle handle
)
txIdx = 3;
txOffset = 0;
encap = 0;
- beta = -1;
- statusSize = 0;
++
/* Read the payload */
if (handle->dcs7->fxns->read(handle->dcs7,
rxOffset = 2;
}
- // Get beta number
- beta = AFP_getBeta(handle->acp,
- &handle->rxBuf[rxIdx]);
-
- // TODO: Add beta of all decoders on Slave
- // Invalidate Status structures for Beta Units initialized on Slave
- if ((beta == STD_BETA_PCM) ||
- (beta == STD_BETA_PCM2) ||
- (beta == STD_BETA_DDP) ||
- (beta == STD_BETA_DDP2) ||
- (beta == STD_BETA_THD) ||
- (beta == STD_BETA_THD2)
- )
- {
- statusSize = IACP_STD_BETA_TABLE.pStatus[beta]->size;
- Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[beta]), statusSize, Cache_Type_ALLD, 0);
- }
+
/* Process alpha command */
error = handle->acp->fxns->sequence(handle->acp,
&handle->rxBuf[rxIdx],
&handle->txBuf[txIdx]);
- // TODO: Add beta of all decoders on Slave
- // write back Status structures for Beta Units initialized on Slave
- if ((beta == STD_BETA_PCM) ||
- (beta == STD_BETA_PCM2) ||
- (beta == STD_BETA_DDP) ||
- (beta == STD_BETA_DDP2) ||
- (beta == STD_BETA_THD) ||
- (beta == STD_BETA_THD2)
- )
- {
- statusSize = IACP_STD_BETA_TABLE.pStatus[beta]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[beta]), statusSize, Cache_Type_ALLD, 0);
- }
+
+
if (error)
{
//handle->fxns->log(handle,handle->logObj,