Change Gate SR to 0, comment out debug traces
[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / test_arm / framework / aspDecOpCircBuf_slave.c
index ea6598d95a3d16ef933cb40a52b1c191090d2887..3545757375b0d9e634dd0ccd04b64b21dd25e132 100644 (file)
@@ -45,8 +45,6 @@ All rights reserved.
 //#include "pafsp.h"
 #include "aspDecOpCircBuf_slave.h"
 
-extern UInt32 gSlaveDecDecodeCnt;
-
 // Initialize circular buffer control
 Int cbCtlInit(
     PAF_AST_DecOpCircBufCtl *pCbCtl,    // decoder output circular buffer control
@@ -102,7 +100,7 @@ Int cbWriteStart(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
     
-    Log_info1("cbWriteStart:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbWriteStart:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
     
     // Invalidate AF circular buffer
     Cache_inv(pCb->afCb, pCb->maxNumAfCb*sizeof(PAF_AudioFrame), Cache_Type_ALLD, 0);
@@ -155,7 +153,7 @@ Int cbWriteStop(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    Log_info1("cbWriteStop:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbWriteStop:afCb=0x%04x", (IArg)pCb->afCb);  // FL: debug
     
     // update flags
     pCb->writerActiveFlag = 0;
@@ -192,11 +190,11 @@ Int cbWriteAf(
     // Enter gate
     key = GateMP_enter(gateHandle);
 
-    Log_info2("cbWriteAf:gate enter, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key);
+    //Log_info2("cbWriteAf:gate enter, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key); // FL: debug
     
     // Get circular buffer base pointer
     pCb = &((*pCbCtl->pXDecOpCb)[cbIdx]);
-    Log_info1("cbWriteAf:pCb=0x%04x", (IArg)pCb);
+    //Log_info1("cbWriteAf:pCb=0x%04x", (IArg)pCb); // FL: debug
 
     // (***) FL: revisit
     // Invalidate circular buffer configuration.
@@ -204,9 +202,8 @@ Int cbWriteAf(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
     
-    Log_info1("cbWriteAf:afCb=0x%04x", (IArg)pCb->afCb);   
-
-    Log_info2("cbWriteAf:pCb->readerActiveFlag=%d, pCb->writerActiveFlag=%d", (IArg)pCb->readerActiveFlag, (IArg)pCb->writerActiveFlag);
+    //Log_info1("cbWriteAf:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
+    //Log_info2("cbWriteAf:pCb->readerActiveFlag=%d, pCb->writerActiveFlag=%d", (IArg)pCb->readerActiveFlag, (IArg)pCb->writerActiveFlag); // FL: debug
 
     if (pCb->readerActiveFlag == 1)
     {
@@ -230,7 +227,7 @@ Int cbWriteAf(
         }
 #endif        
 
-        Log_info2("cbWriteAf:pCb->numAfCb=%d, pCb->maxNumAfCb=%d", (IArg)pCb->readerActiveFlag, (IArg)pCb->maxNumAfCb);
+        //Log_info2("cbWriteAf:pCb->numAfCb=%d, pCb->maxNumAfCb=%d", (IArg)pCb->readerActiveFlag, (IArg)pCb->maxNumAfCb); // FL: debug
     
         // check overflow
         if (pCb->numAfCb >= pCb->maxNumAfCb)
@@ -246,15 +243,15 @@ Int cbWriteAf(
             // Leave the gate
             GateMP_leave(gateHandle, key);
 
-            Log_info2("cbWriteAf:gate leave, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key);
+            //Log_info2("cbWriteAf:gate leave, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key); // FL: debug
             
             return ASP_DECOP_CB_WRITE_OVERFLOW;
         }
         
         // get pointer to current audio frame in circular buffer
-        Log_info2("cbWriteAf:afCb=0x%04x, pCb->afWrtIdx=%d", (IArg)pCb->afCb, (IArg)pCb->afWrtIdx);
+        //Log_info2("cbWriteAf:afCb=0x%04x, pCb->afWrtIdx=%d", (IArg)pCb->afCb, (IArg)pCb->afWrtIdx); // FL: debug
         pAfCb = &pCb->afCb[pCb->afWrtIdx];
-        Log_info1("cbWriteAf:pAfCb=0x%04x", (IArg)pAfCb);
+        //Log_info1("cbWriteAf:pAfCb=0x%04x", (IArg)pAfCb); // FL: debug
            
         // write audio frame information updated by decoder
         pAfCb->sampleDecode = pAfWrt->sampleDecode;
@@ -270,14 +267,10 @@ Int cbWriteAf(
         pAfCb->bsMetadata_offset   = pAfWrt->bsMetadata_offset;      /* offset into audio frame for change in bsMetadata_type field */
         // write PCM samples
         streamMask = pAfWrt->fxns->channelMask(pAfWrt, pAfCb->channelConfigurationStream);
-        Log_info1("cbWriteAf:streamMask=0x%04x", (IArg)streamMask);
-        Log_info1("cbWriteAf:pCb->decOpFrameLen=%d", (IArg)pCb->decOpFrameLen);
-        Log_info2("cbWriteAf:pAfCb->data.sample=0x%04x, pAfWrt->data.sample=0x%04x", (IArg)pAfCb->data.sample, (IArg)pAfWrt->data.sample);
-        Log_info2("cbWriteAf:pAfCb->data.samsiz=0x%04x, pAfWrt->data.samsiz=0x%04x", (IArg)pAfCb->data.samsiz, (IArg)pAfWrt->data.samsiz);
-        //if (gSlaveDecDecodeCnt == 7)
-        //{
-        //    Log_info1("gSlaveDecDecodeCnt=%d", (IArg)gSlaveDecDecodeCnt);
-        //}
+        //Log_info1("cbWriteAf:streamMask=0x%04x", (IArg)streamMask); // FL: debug
+        //Log_info1("cbWriteAf:pCb->decOpFrameLen=%d", (IArg)pCb->decOpFrameLen); // FL: debug
+        //Log_info2("cbWriteAf:pAfCb->data.sample=0x%04x, pAfWrt->data.sample=0x%04x", (IArg)pAfCb->data.sample, (IArg)pAfWrt->data.sample); // FL: debug
+        //Log_info2("cbWriteAf:pAfCb->data.samsiz=0x%04x, pAfWrt->data.samsiz=0x%04x", (IArg)pAfCb->data.samsiz, (IArg)pAfWrt->data.samsiz); // FL: debug
         for (i = 0; i < ASP_DECOP_CB_MAX_NUM_PCM_CH; i++)
         {
             if ((streamMask >> i) & 0x1)
@@ -291,7 +284,7 @@ Int cbWriteAf(
             }
         }
         
-        Log_info1("cbWriteAf:pAfCb->numPrivateMetadata=%d", (IArg)pAfCb->numPrivateMetadata);
+        //Log_info1("cbWriteAf:pAfCb->numPrivateMetadata=%d", (IArg)pAfCb->numPrivateMetadata); // FL: debug
         // Write metadata to circular buffer
         for (i = 0; i < pAfCb->numPrivateMetadata; i++) // FL: only copy numPrivateMetadata
         {
@@ -301,18 +294,18 @@ Int cbWriteAf(
         }
         
         // update audio frame write index
-        Log_info2("cbWriteAf:pCb->afWrtIdx=%d, pCb->maxNumAfCb", (IArg)pCb->afWrtIdx, (IArg)pCb->maxNumAfCb);
+        //Log_info2("cbWriteAf:pCb->afWrtIdx=%d, pCb->maxNumAfCb", (IArg)pCb->afWrtIdx, (IArg)pCb->maxNumAfCb); // FL: debug
         pCb->afWrtIdx++;
         if (pCb->afWrtIdx >= pCb->maxNumAfCb)
         {
             pCb->afWrtIdx = 0;
         }
-        Log_info2("cbWriteAf:pCb->afWrtIdx=%d, pCb->maxNumAfCb", (IArg)pCb->afWrtIdx, (IArg)pCb->maxNumAfCb);
+        //Log_info2("cbWriteAf:pCb->afWrtIdx=%d, pCb->maxNumAfCb", (IArg)pCb->afWrtIdx, (IArg)pCb->maxNumAfCb); // FL: debug
         
         // update number of audio frames in circular buffer
-        Log_info1("cbWriteAf:pCb->numAfCb=%d", (IArg)pCb->numAfCb);
+        //Log_info1("cbWriteAf:pCb->numAfCb=%d", (IArg)pCb->numAfCb); // FL: debug
         pCb->numAfCb++;
-        Log_info1("cbWriteAf:pCb->numAfCb=%d", (IArg)pCb->numAfCb);
+        //Log_info1("cbWriteAf:pCb->numAfCb=%d", (IArg)pCb->numAfCb); // FL: debug
 
         // (***) FL: revisit
         // Write back circular buffer configuration
@@ -341,7 +334,7 @@ Int cbWriteAf(
     // Leave the gate
     GateMP_leave(gateHandle, key);
 
-    Log_info2("cbWriteAf:gate leave, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key);
+    //Log_info2("cbWriteAf:gate leave, gateHandle=0x%04x, key=%d", (IArg)gateHandle, (IArg)key); // FL: debug
     
     return ASP_DECOP_CB_SOK;
 }