Merge branch 'dev_pasdk_frank_pasdk516AsotRefactoring' into dev_pasdk_pasdk29Integration
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / audioStreamInpDec.c
index 9dcad2802efaa57e7fcb0a262978240013cddc28..cc48d809c1e8f7b61042b22f8e5ee4d5da1a98e7 100644 (file)
@@ -417,7 +417,7 @@ static Int decodeInit(
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
-            // FL: send dec activate message to slave
+            // send dec activate message to slave
             argIdx = 0; // set decIdx (zone index)
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSend(ASP_SLAVE_DEC_ACTIVATE, ASP_MASTER_DEC_ACTIVATE_DONE,
             argIdx = 0; // set decIdx (zone index)
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSend(ASP_SLAVE_DEC_ACTIVATE, ASP_MASTER_DEC_ACTIVATE_DONE,
@@ -428,7 +428,7 @@ static Int decodeInit(
                 return ASIP_ERR_DECODE_MSG; // temporary
             }
 
                 return ASIP_ERR_DECODE_MSG; // temporary
             }
 
-            // FL: send dec reset message to slave
+            // send dec reset message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSend(ASP_SLAVE_DEC_RESET, ASP_MASTER_DEC_RESET_DONE,
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSend(ASP_SLAVE_DEC_RESET, ASP_MASTER_DEC_RESET_DONE,
@@ -444,7 +444,6 @@ static Int decodeInit(
                 errno = *(Int32 *)&decMsgBuf[argIdx];
             }
 
                 errno = *(Int32 *)&decMsgBuf[argIdx];
             }
 
-            // (***) FL: revisit
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
@@ -659,7 +658,7 @@ Int decInfoSnd(
                         pAstCfg->xInp[z].inpBufStatus.sampleRateStatus;
                 }
                 else {
                         pAstCfg->xInp[z].inpBufStatus.sampleRateStatus;
                 }
                 else {
-                    TRACE_TERSE1("AS%d: return error ASPERR_INFO_RATECHANGE", as+pAstCfg->masterStr);
+                    //TRACE_TERSE1("decDecodeInfo: AS%d: return error ASPERR_INFO_RATECHANGE", as+pAstCfg->masterStr);
                     TRACE_TERSE2("inpBufStatus.sampleRateStatus: 0x%x, decodeControl.sampleRate: 0x%x",
                         pAstCfg->xInp[z].inpBufStatus.sampleRateStatus,
                         pAstCfg->xDec[zD].decodeControl.sampleRate);
                     TRACE_TERSE2("inpBufStatus.sampleRateStatus: 0x%x, decodeControl.sampleRate: 0x%x",
                         pAstCfg->xInp[z].inpBufStatus.sampleRateStatus,
                         pAstCfg->xDec[zD].decodeControl.sampleRate);
@@ -700,20 +699,19 @@ Int decInfoSnd(
                 return DEC_ERR_INFO_SNDMSG;
             }
 
                 return DEC_ERR_INFO_SNDMSG;
             }
 
-            // debug, capture input buffer
-            //capIb(pAstCfg->xInp[zI].pInpBuf);
-            //gCapIb_cnt++;
+#if 0 // debug
+            // capture input buffer
+            capIb(pAstCfg->xInp[zI].pInpBuf);
+            gCapIb_cnt++;
+#endif
 
 
-#if 1
-            // (***) FL: revisit
             // write back Inp configuration
             Cache_wb(&pAstCfg->xInp[zI], sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
             // write back Inp configuration
             Cache_wb(&pAstCfg->xInp[zI], sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
-#endif
 
 
-            // FL: send info message to slave
+            // send info message to slave
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSnd(ASP_SLAVE_DEC_INFO, decMsgBuf) != ASP_MSG_NO_ERR)
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
             if(AspMsgSnd(ASP_SLAVE_DEC_INFO, decMsgBuf) != ASP_MSG_NO_ERR)
@@ -797,12 +795,9 @@ Int decInfoAck(
                 errno = *(Int32 *)&decMsgBuf[argIdx];
             }
 
                 errno = *(Int32 *)&decMsgBuf[argIdx];
             }
 
-#if 1
-            // (***) FL: revisit
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
-#endif
 
             if (errno) {
                 TRACE_TERSE1("decInfoAck return error errno 0x%x.", errno);
 
             if (errno) {
                 TRACE_TERSE1("decInfoAck return error errno 0x%x.", errno);
@@ -885,15 +880,16 @@ static Int decDecodeSnd(const PAF_ASIT_Params *pP, const PAF_ASIT_Patchs *pQ,
                     (IArg)pAstCfg->xInp[z].pInpBuf->base.pVoid,
                     (IArg)pAstCfg->xInp[z].pInpBuf->head.pVoid);
 
                     (IArg)pAstCfg->xInp[z].pInpBuf->base.pVoid,
                     (IArg)pAstCfg->xInp[z].pInpBuf->head.pVoid);
 
-            // FL: debug, capture input buffer
-            //capIbPcm(pAstCfg->xInp[z].pInpBuf);
-
-            // (***) FL: revisit
+#if 0 // debug
+            // capture input buffer
+            capIbPcm(pAstCfg->xInp[z].pInpBuf);
+#endif
+            
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
             // write back Dec configuration
             Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
 
-            // FL: send decode message to slave
+            // send decode message to slave
             errno  = 0;
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
             errno  = 0;
             argIdx = 0; // set decIdx
             *(Int32 *)&decMsgBuf[argIdx] = z;
@@ -986,7 +982,6 @@ static Int decDecodeAck(const PAF_ASIT_Params *pP, const PAF_ASIT_Patchs *pQ,
                 }
             }
 
                 }
             }
 
-            // (***) FL: revisit
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();
             // invalidate Dec configuration
             Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
             Cache_wait();