PASDK-218:Add debug counters
authorFrank Livingston <frank-livingston@ti.com>
Fri, 7 Jul 2017 17:25:52 +0000 (12:25 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Fri, 7 Jul 2017 17:25:52 +0000 (12:25 -0500)
pasdk/test_dsp/framework/audioStreamOutProc.c

index 975ea2753fba16d6244bc5f56368f07b833a1c7f..2dced74ccbaa07c5245b8be770ff037d18c68ce5 100644 (file)
@@ -237,13 +237,19 @@ UInt32 gMaxDecOpCbRdAfUnd   =0; // max (consecutive) decoder output circular buf
 UInt32 gMasterCbResetCnt    =0; // master circular buffer reset count
 
 // Global debug counters */
 UInt32 gMasterCbResetCnt    =0; // master circular buffer reset count
 
 // Global debug counters */
-UInt32 gTaskAsopCnt=0; // debug
-UInt32 gAsopInitCnt         =0;
-UInt32 gAsopStreamCnt       =0;
-UInt32 gAsopEncodeCnt       =0;
-UInt32 gAsopFinalCnt        =0;
-UInt32 gAsopQuitCnt         =0;
-UInt32 gAsopOutSioUpdateCnt =0;
+UInt32 gAsopInitOutProcCnt          =0;
+UInt32 gAsopInitSyncDecResetCnt     =0;
+UInt32 gAsopInitSyncDecInfo1Cnt     =0;
+UInt32 gAsopInitSyncDecDecode1Cnt   =0;
+UInt32 gAsopInitSyncResyncCnt       =0;
+UInt32 gAsopOutProcCnt              =0;
+UInt32 gAsopInitCnt                 =0;
+UInt32 gAsopStreamCnt               =0;
+UInt32 gAsopEncodeCnt               =0;
+UInt32 gAsopFinalCnt                =0;
+UInt32 gAsopOutSioUpdateCnt         =0;
+UInt32 gAsopQuitCnt                 =0;
+UInt32 gAsopTxSioReclaimCnt         =0;
 
 
 /*
 
 
 /*
@@ -422,6 +428,7 @@ Void taskAsopFxn(
         switch (state)
         {
             case INIT_OUT_PROC_STATE:
         switch (state)
         {
             case INIT_OUT_PROC_STATE:
+                gAsopInitOutProcCnt++;
                 Log_info0("TaskAsop: state=INIT_OUT_PROC_STATE");
                 
                 //
                 Log_info0("TaskAsop: state=INIT_OUT_PROC_STATE");
                 
                 //
@@ -440,6 +447,7 @@ Void taskAsopFxn(
                 break;
                 
             case INITSYNC_DEC_RESET_STATE:
                 break;
                 
             case INITSYNC_DEC_RESET_STATE:
+                gAsopInitSyncDecResetCnt++;
                 Log_info0("TaskAsop: state=INITSYNC_DEC_RESET_STATE");
 
                 //
                 Log_info0("TaskAsop: state=INITSYNC_DEC_RESET_STATE");
 
                 //
@@ -472,6 +480,7 @@ Void taskAsopFxn(
                 break;
             
             case INITSYNC_DEC_INFO1_STATE:
                 break;
             
             case INITSYNC_DEC_INFO1_STATE:
+                gAsopInitSyncDecInfo1Cnt++;
                 Log_info0("TaskAsop: state=INITSYNC_DEC_INFO1_STATE");
                 
                 //
                 Log_info0("TaskAsop: state=INITSYNC_DEC_INFO1_STATE");
                 
                 //
@@ -504,6 +513,7 @@ Void taskAsopFxn(
                 break;
             
             case INITSYNC_DEC_DECODE1_STATE:
                 break;
             
             case INITSYNC_DEC_DECODE1_STATE:
+                gAsopInitSyncDecDecode1Cnt++;
                 Log_info0("TaskAsop: state=INITSYNC_DEC_DECODE1_STATE");
                 
                 //
                 Log_info0("TaskAsop: state=INITSYNC_DEC_DECODE1_STATE");
                 
                 //
@@ -536,6 +546,7 @@ Void taskAsopFxn(
                 break;
             
             case INITSYNC_RESYNC_STATE:
                 break;
             
             case INITSYNC_RESYNC_STATE:
+                gAsopInitSyncResyncCnt++;
                 Log_info0("TaskAsop: state=INITSYNC_RESYNC_STATE");
 
                 //
                 Log_info0("TaskAsop: state=INITSYNC_RESYNC_STATE");
 
                 //
@@ -563,6 +574,7 @@ Void taskAsopFxn(
                 break;
             
             case OUT_PROC_STATE:        
                 break;
             
             case OUT_PROC_STATE:        
+                gAsopOutProcCnt++;
                 Log_info0("TaskAsop: state=OUT_PROC_STATE");
                 
                 //
                 Log_info0("TaskAsop: state=OUT_PROC_STATE");
                 
                 //
@@ -2386,11 +2398,12 @@ PAF_ASOT_decodeEncode(
             }
 #endif            
 
             }
 #endif            
 
+            gAsopTxSioReclaimCnt++;
+
             //
             // Simulate Tx SIO_reclaim() pend
             //
             //
             // Simulate Tx SIO_reclaim() pend
             //
-            //Semaphore_pend(semaphoreTxAudio, BIOS_WAIT_FOREVER); 
-            gTaskAsopCnt++;
+            //Semaphore_pend(semaphoreTxAudio, BIOS_WAIT_FOREVER);
             curTime = Clock_getTicks();
             //System_printf("System time in TaskAsipFxn Tx audio = %lu\n", (ULong)curTime);
             //Log_info1("outputEncode():Tx SIO reclaim(), system time = %u", curTime);
             curTime = Clock_getTicks();
             //System_printf("System time in TaskAsipFxn Tx audio = %lu\n", (ULong)curTime);
             //Log_info1("outputEncode():Tx SIO reclaim(), system time = %u", curTime);