summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: af2c893)
raw | patch | inline | side by side (parent: af2c893)
author | Chitresh Gupta <chitresh.g@pathpartnertech.com> | |
Tue, 29 Nov 2016 10:09:43 +0000 (15:39 +0530) | ||
committer | Chitresh Gupta <chitresh.g@pathpartnertech.com> | |
Tue, 29 Nov 2016 10:09:43 +0000 (15:39 +0530) |
index 5f4de546524c10519474e94703750a68f6b3927d..abae3ef3b86d0008777b6ecbd5b6fe74dd3a0623 100644 (file)
--- a/pasdk/test_arm/.cproject
+++ b/pasdk/test_arm/.cproject
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/f/include""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/f/alpha""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/util/c67x_cintrins""/>
+ <listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/util/statusop_common""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/common""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/shared""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_arm/framework""/>
index f5fe68203ac54718544ba262e140bfae450c1d71..7c5354e20f7769389a0c4fb5544d48edeee8a631 100644 (file)
SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dolby_ip\ddp\Dolby_Digital_Plus_Decoder_Imp\Source_Code\make\ddp_udc_wrapper\a15 )
INPUT ( c67x_cintrins_elf.lib simulate_dma_elf.lib )
-INPUT ( acp_elf.lib asp_std_elf.lib com_asp_elf.lib com_dec_elf.lib pcm1_elf.lib )
+INPUT ( acp_elf.lib asp_std_elf.lib com_asp_elf.lib com_dec_elf.lib pcm1_elf.lib statusop_common_elf.lib )
INPUT ( dlb_intrinsics_generic_float32_release.a )
INPUT ( ddp_dec_lib_generic_wrapper_release.a ddp_dec_lib_generic_float32_release.a )
diff --git a/pasdk/test_arm/framework/audioStreamDecodeProc.c b/pasdk/test_arm/framework/audioStreamDecodeProc.c
index b2e2703afdf3ca7eaf56e701892f8e18550455f7..8bca5546e3169a62aaefd14b56fbc5b736518ce5 100644 (file)
#include "audioStreamProc_common.h"
#include "audioStreamDecodeProc.h"
+#include "statusOp_common.h"
+
+#define CACHE_COHERENCE
// FL: debug
//#include "fwkSim.h"
#include "dbgCapAf.h"
Int status;
Int zI;
Int bufEnd, wrapSize, currentBufSize, chunkSize;
+ Int8 temp8;
Log_info0("Enter taskAsdpFxn()");
// (***) FL: revisit
// write back Status structures for Beta Units initialized on Slave
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM2]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM2]), size, Cache_Type_ALLD, 0);
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM2]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), size, Cache_Type_ALLD, 0);
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), size, Cache_Type_ALLD, 0);
Cache_wait();
// (***) FL: revisit
// write back Dec configuration
- Cache_wb(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
+ Cache_wbInv(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
// Send initialization complete message to master
// invalidate Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
- size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+ /*size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
- Cache_wait();
+ Cache_wait();*/
argIdx = 0; // get decIdx
z = *(Int32 *)&pAspMsg->buf[argIdx];
}
// write back Dec configuration
- Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
+ Cache_wbInv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
// (***) FL: revisit
// write back Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
- size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
+ /* size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
- Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
- Cache_wait();
+ Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
+ Cache_wait();*/
// send dec reset complete message to master
queId = MessageQ_getReplyQueue(pAspMsg);
}
// write back Dec configuration
- Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
+ Cache_wbInv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
- // Re-initialize audio frame if decoder is disabled or
- // doesn't have a valid input
+#ifdef CACHE_COHERENCE
+ statusOp_read(&(temp8), &(pAstCfg->xDec[z].decodeStatus.mode), sizeof(Int8));
+ // Re-initialize audio frame if decoder is disabled or
+ // doesn't have a valid input
+ if (!temp8 || !pAstCfg->xInp[zI].hRxSio)
+ {
+ pP->fxns->initFrame1(pP, pQ, pC, z, 0);
+ }
+#else
+ // Re-initialize audio frame if decoder is disabled or
+ // doesn't have a valid input
if (!pAstCfg->xDec[z].decodeStatus.mode || !pAstCfg->xInp[zI].hRxSio)
{
pP->fxns->initFrame1(pP, pQ, pC, z, 0);
}
+#endif
// send dec info complete message to master
queId = MessageQ_getReplyQueue(pAspMsg);
}
// write back Dec configuration
- Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
+ Cache_wbInv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
+#ifdef CACHE_COHERENCE
+ statusOp_read(&(temp8), &(pAstCfg->xDec[z].decodeStatus.mode), sizeof(Int8));
// Re-initialize audio frame if decoder is disabled or
// doesn't have a valid input
+ if (!temp8 || !pAstCfg->xInp[zI].hRxSio)
+ {
+ pP->fxns->initFrame1(pP, pQ, pC, z, 0);
+ }
+#else
+ // Re-initialize audio frame if decoder is disabled or
+ // doesn't have a valid input
if (!pAstCfg->xDec[z].decodeStatus.mode || !pAstCfg->xInp[zI].hRxSio)
{
pP->fxns->initFrame1(pP, pQ, pC, z, 0);
}
-
+#endif
// send dec info complete message to master
queId = MessageQ_getReplyQueue(pAspMsg);
pAspMsg->procId = hAspMsgSlave->slaveProcId;
index b38a62496da6aacfaa63a9b49a0cb9a2c5a31c00..e1dc75911372f0c56e13f900c13500cfdef5a3fd 100644 (file)
--- a/pasdk/test_dsp/.cproject
+++ b/pasdk/test_dsp/.cproject
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/f/s3""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/f/include""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/f/alpha""/>
+ <listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/util/statusop_common""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/application/itopo/evmk2g/alpha""/>
<listOptionValue builtIn="false" value=""${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/sio""/>
index 35473592f7990cc1ff5a8e519bf29957f9726b59..617499336f1459f71641aad37ab04c95ed9afe53 100644 (file)
-l"pce2_elf.lib"
-l"pcm1_elf.lib"
-l"dcs7_elf.lib"
+-l"statusop_common_elf.lib"
-l"dolby_oar_lib.lib"
-l"libcar_c66_float_release.lib"
diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.c b/pasdk/test_dsp/framework/audioStreamInpProc.c
index 9e06ee9d85e84deebd4353d75564bab8db3bb225..79bdaa143f91069cf7337b636c196edfca33018c 100644 (file)
// FL: debug
#include "dbgCapAf.h"
+#include "statusOp_common.h"
+
+#define CACHE_COHERENCE
+
// -----------------------------------------------------------------------------
// Debugging Trace Control, local to this file.
// Messaging
ASP_Msg *pAspMsg;
Int status;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
Log_info0("Enter taskAsipFxn()");
// so set to unknown and skip any remaining processing
if (!pAstCfg->xInp[zMI].hRxSio)
{
+#ifdef CACHE_COHERENCE
+ tempVar8 = PAF_SOURCE_UNKNOWN;
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &tempVar8,
+ sizeof(tempVar8));
+#else
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = PAF_SOURCE_UNKNOWN;
+#endif
TRACE_VERBOSE1("TaskAsip: AS%d: No input selected...", as+zMS);
continue;
}
continue;
}
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.mode),
+ sizeof(tempVar8));
+ // If master decoder is not enabled, or the input is unlocked, then do nothing
+ if (!tempVar8 || !pAstCfg->xInp[zMI].inpBufStatus.lock)
+ {
+ TRACE_VERBOSE0("TaskAsip: Not locked, continue");
+ continue;
+ }
+#else
// If master decoder is not enabled, or the input is unlocked, then do nothing
if (!pAstCfg->xDec[zMD].decodeStatus.mode || !pAstCfg->xInp[zMI].inpBufStatus.lock)
{
TRACE_VERBOSE0("TaskAsip: Not locked, continue");
continue;
}
+#endif
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8));
+ // If no source selected then do nothing
+ if (tempVar8 == PAF_SOURCE_NONE)
+ {
+ tempVar8 = PAF_SOURCE_NONE;
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &tempVar8,
+ sizeof(tempVar8));
+ TRACE_VERBOSE1("TaskAsip: AS%d: no source selected, continue", as+zMS);
+ continue;
+ }
+#else
// If no source selected then do nothing
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_NONE)
{
TRACE_VERBOSE1("TaskAsip: AS%d: no source selected, continue", as+zMS);
continue;
}
+#endif
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8));
+ // If we want pass processing then proceed directly
+ if (tempVar8 == PAF_SOURCE_PASS)
+ {
+ TRACE_VERBOSE1("TaskAsip: AS%d: Pass processing ...", as+zMS);
+
+ tempVar8 = PAF_SOURCE_PASS;
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &tempVar8,
+ sizeof(tempVar8));
+#else
// If we want pass processing then proceed directly
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_PASS)
{
TRACE_VERBOSE1("TaskAsip: AS%d: Pass processing ...", as+zMS);
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = PAF_SOURCE_PASS;
+#endif
pP->fxns->sourceDecode(pP, pQ, pC, PAF_SOURCE_PASS);
if (pP->fxns->passProcessing)
{
continue;
}
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8));
+ // .....................................................................
+ // At this point we have an enabled input and want to decode something.
+ // If no decoder selected then do nothing. Need to reset the sourceProgram, since
+ // when no decoder is selected there are no calls to IB
+ //if (errno = pP->fxns->autoProcessing(pP, pQ, pC, pC->xDec[zMD].decodeStatus.sourceSelect, pC->xDec[zMD].decAlg[PAF_SOURCE_PCM]))
+ if (errno = pP->fxns->autoProcessing(pP, pQ, pC, tempVar8, NULL)) // (***) FL: re-visit this, hard-coded to use PCM framelength inside function
+ {
+ TRACE_VERBOSE1("TaskAsip: autoProcessing returns 0x%x, continue", errno);
+ continue;
+ }
+#else
// .....................................................................
// At this point we have an enabled input and want to decode something.
// If no decoder selected then do nothing. Need to reset the sourceProgram, since
TRACE_VERBOSE1("TaskAsip: autoProcessing returns 0x%x, continue", errno);
continue;
}
+#endif
// query for input type
if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM, (Arg )&sourceProgram))
errno = ASPERR_AUTO_PROGRAM;
continue;
}
+#ifdef CACHE_COHERENCE
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &(sourceProgram),
+ sizeof(sourceProgram));
+#else
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = sourceProgram;
+#endif
// if input is unclassifiable then do nothing
if (sourceProgram == PAF_SOURCE_UNKNOWN)
// input frame, we determine whether or not to call decodeProcessing and with
// what decAlg.
sourceSelect = PAF_SOURCE_NONE;
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8));
+ switch (tempVar8)
+ {
+#else
switch (pAstCfg->xDec[zMD].decodeStatus.sourceSelect)
{
+#endif
// If autodetecting, decoding everything, and input is something
// (i.e. bitstream or PCM) then decode.
case PAF_SOURCE_AUTO:
// If user made specific selection then program must match select.
// (NB: this compare relies on ordering of PAF_SOURCE)
default:
+#ifdef CACHE_COHERENCE
+ sourceSelect = 0; // due to size difference
+ statusOp_read(&sourceSelect,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8));
+#else
sourceSelect = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
+#endif
if ((sourceSelect >= PAF_SOURCE_PCM) && (sourceSelect <= PAF_SOURCE_N))
{
if (sourceProgram != sourceSelect)
//PAF_InpBufConfig *pIpBufConfig;
Int frame; // decoder input frame count
Int block; // (***) FL: formerly -- decoder output block count / input frame
-
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
zMD = pAstCfg->masterDec;
state = INIT;
errno = 0; /* error number */
- TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", pAstCfg->xDec[zMD].decodeStatus.sourceSelect);
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8));
+ TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", tempVar8);
for (;;)
+ {
+ if (tempVar8 == PAF_SOURCE_NONE)
+ {
+#else
+ TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", pAstCfg->xDec[zMD].decodeStatus.sourceSelect);
+
+ for (;;)
{
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_NONE)
{
+#endif
TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: sourceSelect == PAF_SOURCE_NONE");
state = QUIT;
}
// write back Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
- size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+ /*size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
- Cache_wait();
+ Cache_wait();*/
#endif
#if 0
////size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
// invalidate Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
- size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
+ /* size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
- Cache_wait();
+ Cache_wait();*/
#endif
frame = 0;
//Cache_wait();
#endif
+
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
+ sizeof(tempVar8));
+ // Don't start decode until major access unit is found.
+ if (((tempVar8 == PAF_SOURCE_THD) ||
+ (tempVar8 == PAF_SOURCE_DXP) ||
+ (tempVar8 == PAF_SOURCE_DTSHD)) &&
+ (pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN))
+#else
// Don't start decode until major access unit is found.
if (((pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_THD) ||
(pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_DXP) ||
(pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_DTSHD)) &&
- (pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN))
+ (pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN))
+#endif
{
Int z;
for (z=DECODE1; z < DECODEN; z++)
{
Int zI = pP->inputsFromDecodes[z];
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8));
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_VERBOSE0("TaskAsip: PAF_ASIT_decodeProcessing: INFO1, SIO_issue");
if (SIO_issue(pAstCfg->xInp[zI].hRxSio, &pAstCfg->xInp[zI].inpBufConfig,
sizeof(pAstCfg->xInp[zI].inpBufConfig), PAF_SIO_REQUEST_NEWFRAME))
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* decode counter */
Int zS;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
for (z=DECODE1; z < DECODEN; z++)
{
zS = pP->streamsFromDecodes[z];
- if (!(pAstCfg->xDec[z].decodeStatus.command2 & 0x80))
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.command2),
+ sizeof(tempVar8));
+ if (!(tempVar8 & 0x80))
+ {
+ switch (tempVar8)
+ {
+ case 0: // command none - process
+ tempVar8 |= 0x80;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
+ &tempVar8,
+ sizeof(tempVar8));
+ break;
+ case 1: // command abort - leave now
+ TRACE_TERSE2("AS%d: PAF_ASIT_decodeCommand: decode command abort (0x%02x)", as+zS, 1);
+ tempVar8 |= 0x80;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
+ &tempVar8,
+ sizeof(tempVar8));
+ return (ASPERR_ABORT);
+ case 2: // command restart - leave later
+ TRACE_TERSE2("AS%d: PAF_ASIT_decodeCommand: decode command quit (0x%02x)", as+zS, 2);
+ tempVar8 |= 0x80;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
+ &tempVar8,
+ sizeof(tempVar8));
+ return (ASPERR_QUIT);
+ default: // command unknown - ignore
+ break;
+ }
+ }
+#else
+ if (!(pAstCfg->xDec[z].decodeStatus.command2 & 0x80))
{
- switch (pAstCfg->xDec[z].decodeStatus.command2)
+ switch (pAstCfg->xDec[z].decodeStatus.command2)
{
case 0: // command none - process
pAstCfg->xDec[z].decodeStatus.command2 |= 0x80;
break;
}
}
+#endif
}
return 0;
Int argIdx;
Int decErrno;
Int status;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
pCbCtl = &pC->pAspmCfg->decOpCircBufCtl; // get pointer to circular buffer control
+#ifdef CACHE_COHERENCE
+ // reset frameCount
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8));
+ if (tempVar8)
+ {
+ tempVar8 = 0;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
+ &tempVar8,
+ sizeof(tempVar8));
+ }
+ }
+
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ zI = pP->inputsFromDecodes[z];
+ zS = pP->streamsFromDecodes[z];
+ (void)zS; // clear compiler warning in case not used with tracing disabled
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8));
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
// reset frameCount
for (z=DECODE1; z < DECODEN; z++)
{
}
}
- for (z=DECODE1; z < DECODEN; z++)
+ for (z=DECODE1; z < DECODEN; z++)
{
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS; // clear compiler warning in case not used with tracing disabled
- if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
+ if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
Uns gear;
Int frameLength;
TRACE_VERBOSE1("AS%d: PAF_ASIT_decodeInit: initializing decode", as+zS);
return errno;
#endif
+#ifdef CACHE_COHERENCE
+ gear = 0; // due to size difference
+ statusOp_read(&gear,
+ &(pAstCfg->xDec[z].decodeStatus.aspGearControl),
+ sizeof(Int8));
+ tempVar8 = gear < GEARS ? gear : 0;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.aspGearStatus),
+ &tempVar8,
+ sizeof(tempVar8));
+#else
gear = pAstCfg->xDec[z].decodeStatus.aspGearControl;
pAstCfg->xDec[z].decodeStatus.aspGearStatus = gear < GEARS ? gear : 0;
+#endif
#if 0 // FL: change handle to decIdx (zone index)
frameLength = pP->fxns->computeFrameLength(decAlg[z],
}
}
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
+ sizeof(Int8));
+ if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_SOURCESELECT,
+ DECSIOMAP(tempVar8)))
+ {
+ return errno;
+ }
+#else
if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_SOURCESELECT,
DECSIOMAP(pAstCfg->xDec[z].decodeStatus.sourceSelect)))
{
return errno;
}
+#endif
if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_PCMFRAMELENGTH,
frameLength))
{
ASP_Msg *pAspMsg; /* Messaging */
Int argIdx;
Int status;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+ Int tempVar;
+#endif
// FL: revisit
//Int size;
//PAF_InpBufConfig *pIpBufConfig;
// return (ASPERR_INFO_RATECHANGE);
}
}
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zD].decodeStatus.sourceDecode),
+ sizeof(Int8));
pAstCfg->xDec[zD].decodeControl.emphasis =
+ tempVar8 != PAF_SOURCE_PCM
+ ? PAF_IEC_PREEMPHASIS_NO // fix for Mantis ID #119
+ : pAstCfg->xInp[z].inpBufStatus.emphasisStatus;
+#else
+ pAstCfg->xDec[zD].decodeControl.emphasis =
pAstCfg->xDec[zD].decodeStatus.sourceDecode != PAF_SOURCE_PCM
? PAF_IEC_PREEMPHASIS_NO // fix for Mantis ID #119
: pAstCfg->xInp[z].inpBufStatus.emphasisStatus;
+#endif
}
else
{
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS; // clear compiler warning in case not used with tracing disabled
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8));
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_GEN2("PAF_ASIT_decodeInfo: AS%d: processing frame %d -- info", as+zS, frame);
if (errno = pP->fxns->updateInputStatus(pAstCfg->xInp[zI].hRxSio,
TRACE_TERSE1("return error errno 0x%x.", errno);
return errno;
}
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar,
+ &(pAstCfg->xDec[z].decodeStatus.frameCount),
+ sizeof(Int));
+ // increment decoded frame count
+ tempVar += 1;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
+ &tempVar,
+ sizeof(Int));
+#else
// increment decoded frame count
pAstCfg->xDec[z].decodeStatus.frameCount += 1;
+#endif
}
} // z=DECODE1 to DECODEN
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.mode),
+ sizeof(Int8));
+ // query IB for latest sourceProgram (needed if we started decoding due to a force mode)
+ if (tempVar8)
+ {
+ XDAS_Int8 sourceProgram;
+ if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM,
+ (Arg)&sourceProgram))
+ {
+ TRACE_TERSE1("return error ASPERR_AUTO_PROGRAM. errno 0x%x.", errno);
+ return ASPERR_AUTO_PROGRAM;
+ }
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &(sourceProgram),
+ sizeof(Int8));
+ }
+
+ // since now decoding update decode status for all enabled decoders
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8));
+ if (tempVar8)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceProgram),
+ sizeof(Int8));
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8));
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
+ sizeof(Int8));
+ if (tempVar8 == PAF_SOURCE_SNG)
+ {
+ tempVar8 = PAF_SOURCE_SNG;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8));
+ }
+ }
+ }
+#else
// query IB for latest sourceProgram (needed if we started decoding due to a force mode)
if (pAstCfg->xDec[zMD].decodeStatus.mode)
{
}
}
}
+#endif
#if 0 // FL: ASDT (slave)
// TODO: move this to start of this function so that it doesn't affect IO timing
Int z; /* decode counter */
Int zI, zS;
Int zMD;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
(void)as; // clear compiler warning in case not used with tracing disabled
// Await slave inputs
- for (z=DECODE1; z < DECODEN; z++) {
+ for (z=DECODE1; z < DECODEN; z++)
+ {
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS;
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8));
+ if (z == zMD
+ || ! pAstCfg->xInp[zI].hRxSio
+ || ! tempVar8)
+ continue;
+#else
if (z == zMD
|| ! pAstCfg->xInp[zI].hRxSio
|| ! pAstCfg->xDec[z].decodeStatus.mode)
continue;
+#endif
TRACE_VERBOSE2("PAF_AST_decodeCont: AS%d: awaiting frame %d -- data", as+zS, frame);
if (SIO_reclaim(pAstCfg->xInp[zI].hRxSio, (Ptr)&pAstCfg->xInp[zI].pInpBuf, NULL)
!= sizeof (pAstCfg->xInp[zI].inpBufConfig))
Int zMD;
Int sourceSelect;
Int sourceProgram;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8, temp2Var8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
zMD = pAstCfg->masterDec;
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8));
+ sourceSelect = tempVar8;
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ sizeof(Int8));
+ sourceProgram = tempVar8;
+#else
sourceSelect = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
sourceProgram = pAstCfg->xDec[zMD].decodeStatus.sourceProgram;
+#endif
if ((sourceSelect == PAF_SOURCE_NONE) || (sourceSelect == PAF_SOURCE_PASS))
{
}
else
{
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
+ sizeof(Int8));
+ statusOp_read(&temp2Var8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8));
+ if (temp2Var8 != tempVar8)
+ {
+ return 1;
+ }
+#else
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect != pAstCfg->xDec[zMD].decodeStatus.sourceDecode)
{
return 1;
}
+#endif
}
}
Int argIdx;
Int errno; /* error number */
Int status;
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
DEC_Handle dec = (DEC_Handle )decAlg[z];
#endif /* PAF_ASP_FINAL */
Int zI = pP->inputsFromDecodes[z];
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8));
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_VERBOSE1("PAF_ASIT_decodeComplete: AS%d: finalizing decode", as+z);
#ifdef PAF_ASP_FINAL
if (dec->fxns->final)
{
PAF_AST_Config *pAstCfg;
Int z; /* decode counter */
+#ifdef CACHE_COHERENCE
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
for (z=DECODE1; z < DECODEN; z++)
{
+#ifdef CACHE_COHERENCE
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8));
+ if (tempVar8)
+ {
+ tempVar8 = x;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8));
+ }
+#else
if (pAstCfg->xDec[z].decodeStatus.mode)
{
pAstCfg->xDec[z].decodeStatus.sourceDecode = x;
}
+#endif
}
return 0;