PASDK-71:Update PFP begin/end for ASIT decode processing & ASOT output processing
authorFrank Livingston <frank-livingston@ti.com>
Thu, 27 Apr 2017 17:05:02 +0000 (12:05 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 27 Apr 2017 17:05:02 +0000 (12:05 -0500)
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/audioStreamOutProc.c

index a381b908254b206198030f2b98e759239514e887..443428e698f10d4421950cdbd58db72dfe0ab6e9 100644 (file)
@@ -2092,11 +2092,6 @@ PAF_ASIT_decodeProcessing(
 
     for (;;) 
     {
-        // Measure cycles in decode processing loop.
-        // Only measures cycles spent in loop.
-        pfpEnd(PFP_ID_TASK0_1, PFP_FINISH_MEAS);
-        pfpBegin(PFP_ID_TASK0_1, pC->taskHandle);
-        
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
                     sizeof(tempVar8),
@@ -2148,53 +2143,12 @@ PAF_ASIT_decodeProcessing(
                 gAsipInitCnt++;
                 Log_info0("TaskAsip: state=INIT");               
 
-#if 0 // Not necessary since decoder status is in uncached memory
-                // status for shared beta units can change (e.g. at-boot or alpha)
-                
-                // 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_DDP]->size;
-                Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
-                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
-                Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
-                Cache_wait();
-#endif
-#if 0 // Not necessary since decoder status is in uncached memory
-                ////size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
-                ////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_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_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
-                //Cache_wait();                
-#endif                
-                
                 if (errno = pP->fxns->decodeInit(pP, pQ, pC, sourceSelect))
                 {
                     TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INIT, errno 0x%x.  break after decodeInit", errno);
                     break;
                 }
-                
-                //
-                // Not necessary since decoder status is in uncached memory
-                //
-               
-#if 0 // Not necessary since decoder status is in uncached memory
-                // 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;
-                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);
-                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
-                Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
-                Cache_wait();
-#endif
-                
+                               
                 frame = 0;
                 block = 0;
 
@@ -2206,19 +2160,6 @@ PAF_ASIT_decodeProcessing(
                 gAsipInfo1Cnt++;
                 Log_info0("TaskAsip: state=INFO1");
                 
-#if 0
-                //// (***) FL: revisit
-                //// write back Inp configuration
-                //Cache_wb(&gPAF_AST_config.xInp[0], INPUTN*sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
-                //// write back input data
-                //pIpBufConfig = &gPAF_AST_config.xInp[0].inpBufConfig;
-                //size = pIpBufConfig->frameLength * pIpBufConfig->sizeofElement;
-                //Cache_wb(pIpBufConfig->pntr.pLgInt, size, Cache_Type_ALLD, 0);
-                //// write back Dec configuration
-                //Cache_wb(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();            
-#endif                
-
                 // Establish primary timing
                 if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
                 {
@@ -2227,14 +2168,6 @@ PAF_ASIT_decodeProcessing(
                     break;
                 }
                 
-#if 0
-                //// (***) FL: revisit
-                //// invalidate Dec configuration
-                //Cache_inv(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();                            
-#endif                
-
-
 #ifdef NON_CACHE_STATUS
                 statusOp_read(&tempVar8,
                               &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
@@ -2306,19 +2239,6 @@ PAF_ASIT_decodeProcessing(
                 gAsipInfo2Cnt++;
                 Log_info0("TaskAsip: state=INFO2");
 
-#if 0            
-                //// (***) FL: revisit
-                //// write back Inp configuration
-                //Cache_wb(&gPAF_AST_config.xInp[0], INPUTN*sizeof(PAF_AST_InpBuf), Cache_Type_ALLD, 0);
-                //// write back input data
-                //pIpBufConfig = &gPAF_AST_config.xInp[0].inpBufConfig;
-                //size = pIpBufConfig->frameLength * pIpBufConfig->sizeofElement;
-                //Cache_wb(pIpBufConfig->pntr.pLgInt, size, Cache_Type_ALLD, 0);
-                //// write back Dec configuration
-                //Cache_wb(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();
-#endif                
-
                 // Establish primary timing
                 if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
                 {
@@ -2326,21 +2246,19 @@ PAF_ASIT_decodeProcessing(
                     gAsipInfo2_PrimaryErrCnt++;
                     break;
                 }
-
-#if 0            
-                //// (***) FL: revisit
-                //// invalidate Dec configuration
-                //Cache_inv(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();                                            
-#endif                
                 
+                // Measure cycles in decode processing loop.
+                // Only measures cycles spent in loop.
+                pfpEnd(PFP_ID_TASK0_1, PFP_FINISH_MEAS);
+                pfpBegin(PFP_ID_TASK0_1, pC->taskHandle);
+
                 if (errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block))
                 {
                     TRACE_TERSE1("PAF_ASIT_decodeProcessing. %d: INFO2 break on decodeInfo2. errno 0x%x", errno);
                     gAsipInfo2_ErrCnt++;
                     break;
                 }
-
+               
                 TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: state: INFO2->DECODE");
                 state = DECODE;
                 continue;
@@ -2349,26 +2267,12 @@ PAF_ASIT_decodeProcessing(
                 gAsipDecodeCnt++;
                 Log_info0("TaskAsip: state=DECODE");
 
-#if 0
-                //// (***) FL: revisit
-                //// write back Dec configuration
-                //Cache_wb(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();                        
-#endif
-            
                 if (errno = pP->fxns->decodeDecode(pP, pQ, pC, sourceSelect, frame, block))
                 {
                        gAsipDecodeErrCnt++;
                        TRACE_TERSE1("PAF_ASIT_decodeProcessing: state: DECODE.  decodeDecode err 0x%04x", errno);
                     break;
                 }
-      
-#if 0      
-                //// (***) FL: revisit
-                //// invalidate Dec configuration
-                //Cache_inv(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-                //Cache_wait();                                            
-#endif                
                 
                 TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: state: DECODE->FINAL");
                 state = FINAL;
index 41731b4933c5955aa38600b52939a4d7c1463691..416b56e1edf982dcfbef6ad5b3b6e360305949c0 100644 (file)
@@ -1349,11 +1349,6 @@ PAF_ASOT_decodeProcessing(
 
     for (;;) 
     {
-        // Measure cycles in output processing loop.
-        // Only measures cycles spent in loop.
-        pfpEnd(PFP_ID_TASK1_1, PFP_FINISH_MEAS);
-        pfpBegin(PFP_ID_TASK1_1, pC->taskHandle);
-
         // FL: Check if any change in output SIO, e.g. from Output shortcut.
         // Changes will break FSM and allow Output reconfiguration.
         if (errno = checkOutSio(pP, pC, &outSioUpdate))
@@ -1459,7 +1454,11 @@ PAF_ASOT_decodeProcessing(
                     TRACE_TERSE1("PAF_ASOT_decodeProcessing: state: ENCODE.  decodeEncode err 0x%x", errno);
                     break;
                 }
-
+                
+                // Measure cycles in output processing loop.
+                // Only measures cycles spent in loop.
+                pfpEnd(PFP_ID_TASK1_1, PFP_FINISH_MEAS);
+                pfpBegin(PFP_ID_TASK1_1, pC->taskHandle);
 
                 // (***) FL: do we need this? 
                 //       AF pointers come from CB read, any resets occur in Decoder AF.