Change Gate SR to 0, comment out debug traces
authorFrank Livingston <frank-livingston@ti.com>
Fri, 9 Sep 2016 23:22:22 +0000 (18:22 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Fri, 9 Sep 2016 23:22:22 +0000 (18:22 -0500)
processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h
processor_audio_sdk_1_00_00_00/pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
processor_audio_sdk_1_00_00_00/pasdk/test_dsp/framework/aspDecOpCircBuf_master.c

index d78cf5ce4570740dcf152571198bf52faf9aaa92..8b9994de3f27d28dd9d9f9690ddb1268ffc095ae 100644 (file)
@@ -51,7 +51,7 @@ All rights reserved.
 #define ASP_DECOP_CB_PCM_BUF_SZ             ( ASP_DECOP_CB_MAX_NUM_PCM_CH * ASP_DECOP_CB_MAX_NUM_PCM_FRAMES * ASP_DECOP_CB_MAX_PCM_FRAME_LEN )
 
 #define ASP_DECODE_CB_GATE_NAME             ( "AspDecOpCbGate" )
-#define ASP_DECODE_CB_GATE_REGION_ID        ( 1 )
+#define ASP_DECODE_CB_GATE_REGION_ID        ( 0 )
 
 
 // Decoder output circular buffer
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;
 }
index f5c0ebcf1b1c795d6e1f76b484fa159a08a4d845..dbeb8100e18af5609d522761c86df08c0586156a 100644 (file)
@@ -231,7 +231,7 @@ Int cbInitSourceSel(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    Log_info1("cbInitSourceSel:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbInitSourceSel:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
 
     // set source select
     pCb->sourceSel = sourceSelect;
@@ -390,7 +390,7 @@ Int cbReadStart(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
     
-    Log_info1("cbReadStart:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbReadStart:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
 
     // update flags
     pCb->readerActiveFlag = 1;
@@ -428,7 +428,7 @@ Int cbReadStop(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
     
-    Log_info1("cbReadStop:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbReadStop:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
 
     // update flags
     pCb->readerActiveFlag = 0;
@@ -472,13 +472,13 @@ Int cbReadAf(
     Cache_inv(pCb, sizeof(PAF_AST_DecOpCircBuf), Cache_Type_ALLD, 0);
     Cache_wait();
 
-    Log_info1("cbReadAf:afCb=0x%04x", (IArg)pCb->afCb);
+    //Log_info1("cbReadAf:afCb=0x%04x", (IArg)pCb->afCb); // FL: debug
 
     if ((pCb->writerActiveFlag == 1) && (pCb->emptyFlag == 1))
     {
         // This shouldn't occur:
         //  writer is active AND draining circular buffer
-        Log_info2("cbReadAf: ERROR: writerActiveFlag=%d, emptyFlag=%d", pCb->writerActiveFlag, pCb->emptyFlag);
+        //Log_info2("cbReadAf: ERROR: writerActiveFlag=%d, emptyFlag=%d", pCb->writerActiveFlag, pCb->emptyFlag); // FL: debug
         SW_BREAKPOINT; // FL: debug
         
         // Leave the gate