PASDK-376:Compile out debug code for release
authorFrank Livingston <frank-livingston@ti.com>
Tue, 29 Aug 2017 02:26:48 +0000 (21:26 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Tue, 29 Aug 2017 02:26:48 +0000 (21:26 -0500)
pasdk/common/dbgCapAf.c
pasdk/common/dbgCapAf.h
pasdk/common/dbgDib.c
pasdk/common/dbgDib.h
pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
pasdk/test_arm/framework/audioStreamDecodeProc.c
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/audioStreamOutProc.c

index d689551c581acf400d62fa250c47b42bb623bb11..81d8c864461276bc1e1ee9703441eff77021e814 100644 (file)
@@ -37,6 +37,7 @@ All rights reserved.
 
 #include "dbgCapAf.h"
 
+#ifdef DBG_CAP_AF
 #ifdef _TMS320C6X
 #pragma DATA_SECTION(gCapAfBuf, ".gCapAfBuf");
 PAF_AudioData gCapAfBuf[CAP_AF_MAX_NUM_SAMP];
@@ -46,7 +47,9 @@ PAF_AudioData gCapAfBuf[CAP_AF_MAX_NUM_SAMP] __attribute__ ((section(".gCapAfBuf
 #endif
 Int32 gCapAfBufIdx=0;
 Int32 gCapAfBufWrapCnt=0;
+#endif // DBG_CAP_AF
 
+#ifdef DBG_CAP_AF
 // Reset audio frame capture buffer
 Int capAfReset(Void)
 {
@@ -90,3 +93,4 @@ Int capAfWrite(
     
     return CAP_AF_SOK;
 }
+#endif // DBG_CAP_AF
index eb666381a3dbf78fc879bb0ed30731fda50d352f..38a5c7ecf845d7f752754c2119d86e1d47bebf4e 100644 (file)
@@ -44,6 +44,8 @@ All rights reserved.
 #define CAP_AF_SOK         ( 0 )
 #define CAP_AF_INV_CHNUM   ( -1 )
 
+//#define DBG_CAP_AF
+#ifdef DBG_CAP_AF
 // buffer capture parameters
 #define CAP_AF_MAX_NUM_FRAME       ( 5625 ) //( 100 )
 #define CAP_AF_MAX_SAMP_PER_FRAME  ( PAF_SYS_FRAMELENGTH )
@@ -51,6 +53,7 @@ All rights reserved.
 
 extern PAF_AudioData gCapAfBuf[CAP_AF_MAX_NUM_SAMP];
 extern Int32 gCapAfBufIdx;
+#endif // DBG_CAP_AF
 
 // Reset audio frame capture buffer
 Int capAfReset(Void);
index 32816ccd9434339a093e886aa84499b4f91a6fb6..fbe0dd2cda8e0f7c80793e11b9aad896df6549c3 100644 (file)
@@ -73,7 +73,7 @@ float gSineProbeFreq[SINP_MAX_GEN]  = {440.0, 1004.0};  // sinusoid frequencies
 
 static double gSineProbeArg[SINP_MAX_GEN] = {0.0, 0.0};  // sinusoid function arguments
 
-#ifdef CAP_IB_PCM
+#ifdef DBG_CAP_IP_PCM
 // IB capture (PCM) buffer
 #ifdef _TMS320C6X
 #pragma DATA_SECTION(gCapIbPcmBuf, ".gCapIbPcmBuf");
@@ -84,9 +84,9 @@ Int32 gCapIbPcmBuf[CAP_IB_PCM_MAX_NUM_CH][CAP_IB_PCM_MAX_NUM_SAMP] __attribute__
 Int32 gCapIbPcmBufIdx=0;
 Int32 gCapIbPcmBufWrapCnt=0;
 static UInt32 capIbPcmStopCnt=5000;
-#endif // CAP_IB_PCM
+#endif // DBG_CAP_IP_PCM
 
-#ifdef CAP_IP
+#ifdef DBG_CAP_IP
 // IB capture buffer
 #ifdef _TMS320C6X
 #pragma DATA_SECTION(gCapIbBuf, ".gCapIbBuf");
@@ -100,8 +100,7 @@ Int32 gCapIbBufWrapCnt[2]={0,0};
 Int8 gCapIbBufPingPongSel=1;
 Int32 gCapIbAccBytes=0;
 Int32 gNumDiffFrame[2]={0,0};
-
-#endif // CAP_IP
+#endif // DBG_CAP_IP
 
 // Generate sinusoids in IB buffer
 Void genSinIb(
@@ -146,7 +145,7 @@ Void genSinIb(
     }
 }
 
-#ifdef CAP_IB_PCM
+#ifdef DBG_CAP_IP_PCM
 // Capture data in IB buffer to memory
 Void capIbPcm(
     PAF_InpBufConfig *pInpBufConfig
@@ -197,9 +196,10 @@ Void capIbPcm(
     }
     gCapIbPcmBufIdx += numSamp;
 }
-#endif // CAP_IB_PCM
 
-#ifdef CAP_IP
+#endif // DBG_CAP_IP_PCM
+
+#ifdef DBG_CAP_IP
 // Reset IB capture buffer
 Int capIbReset(Void)
 {
@@ -267,4 +267,4 @@ Void capIb(
        }
 }
 
-#endif // CAP_IP
+#endif // DBG_CAP_IP
index fa43f0fdaaedd385791acc7860f89ae6b4380fd3..649d1905bec07e856bec9b9f478d03aff6095964 100644 (file)
@@ -38,8 +38,8 @@ All rights reserved.
 
 #include "inpbuf.h"
 
-//#define CAP_IB_PCM
-#ifdef CAP_IB_PCM
+//#define DBG_CAP_IP_PCM
+#ifdef DBG_CAP_IP_PCM
 // IB capture (PCM) buffer parameters
 #define CAP_IB_PCM_MAX_NUM_CH           ( 8 )
 #define CAP_IB_PCM_MAX_NUM_FRAME        ( 100 )
@@ -50,10 +50,10 @@ All rights reserved.
 extern Int32 gCapIpPcmBuf[CAP_IB_PCM_MAX_NUM_CH][CAP_IB_PCM_MAX_NUM_SAMP];
 extern Int32 gCapIbPcmBufIdx;
 extern Int32 gCapIbPcmBufWrapCnt;
-#endif // CAP_IB_PCM
+#endif // DBG_CAP_IP_PCM
 
-#define CAP_IP
-#ifdef CAP_IP
+//#define DBG_CAP_IP
+#ifdef DBG_CAP_IP
 // IB capture buffer parameters
 //#define CAP_IB_MAX_NUM_FRAME        ( 938 )
 #define CAP_IB_MAX_NUM_FRAME        ( 2000 )
@@ -66,7 +66,7 @@ extern Int8 gCapIpBuf[2][CAP_IB_BUF_SZ];
 extern Int32 gCapIbBufIdx[2];
 extern Int32 gCapIbBufWrapCnt[2];
 extern Int8 gCapIbBufPingPongSel;
-#endif // CAP_IP
+#endif // DBG_CAP_IP
 
 // Generate sinusoids in IB buffer
 Void genSinIb(
index f82709b398c6b8e3d8c485615df90ca31c39e6b3..e1971cdaf7cfeb2c32d618d1496f09bc7b316c22 100644 (file)
@@ -441,7 +441,10 @@ Int cbWriteAf(
     PAF_ChannelMask_HD streamMask;
     Int8 i;
     Int16 j;
-    PAF_AudioData *pPcmBuf; UInt8 *pMetaBuf; int nextWrtIdx;PAF_AudioFrame *pAfCbNextAf; 
+    PAF_AudioData *pPcmBuf; 
+    UInt8 *pMetaBuf; 
+    //int nextWrtIdx;
+    //PAF_AudioFrame *pAfCbNextAf; 
     PAF_AudioFrame *pAfCbRd;
     PAF_AudioData *pPcmBufRd, *pPcmBufWrt;
     Int8 pcmOvr;
index 65ab36c70e03c92af5a2d0eae686f43016121c8f..bd6f0620197a7d13f950c68c24b3175a91940cbc 100644 (file)
@@ -398,11 +398,15 @@ Void taskAsdpFxn(
         }
         alg[zMD] = pAstCfg->xDec[zMD].decAlg[sourceSelect];
 
-        // Reset IB capture buffer (debug)
-        //capIbReset();
-        //Log_info0("capIbReset()");
-        // Reset audio frame capture buffer (debug)
-        //capAfReset();
+#if 0 // debug, reset IB capture buffer
+        capIbReset();
+        Log_info0("capIbReset()");
+#endif
+        
+#if 0 // debug, reset audio frame capture buffer
+        capAfReset();
+        Log_info0("capAfReset()");
+#endif
         
         decDone = FALSE;
         while (decDone==FALSE)
@@ -757,8 +761,9 @@ Void taskAsdpFxn(
                     cbErrno = 0;
                     if (dec->fxns->decode)
                     {
-                        // Capture input buffer (debug)
-                        //capIb(pAstCfg->xInp[z].pInpBuf);
+#if 0 // debug, capture input buffer
+                        capIb(pAstCfg->xInp[z].pInpBuf);
+#endif
                         
                         //
                         // Execute decode
@@ -776,11 +781,12 @@ Void taskAsdpFxn(
                         pAfWrt = pAstCfg->xDec[z].decodeOutStruct.pAudioFrame;                           
                         TRACE_TERSE2("Dec:pAfWrt=0x%04x, nSamples=%d", (IArg)pAfWrt, pAfWrt->data.nSamples);
                         
-                        // Capture audio frame (debug)
-                        //if (capAfWrite(pAfWrt, PAF_LEFT) != CAP_AF_SOK)
-                        //{
-                        //    Log_info0("capAfWrite() error");
-                        //}
+#if 0 // debug, capture audio frame
+                        if (capAfWrite(pAfWrt, PAF_LEFT) != CAP_AF_SOK)
+                        {
+                            Log_info0("capAfWrite() error");
+                        }
+#endif
 
                         #ifdef CAPTURE_DECODER_OUTSAMPLES_PP
                         if (tempCap_frameCnt < CAP_FRAME_MAX)
index 1bfeaa706a061f9a35c5bdabcc23a6c2eb9b7701..9d1bc0b91ac67cbe6a42fb34d93dc450c093c31d 100644 (file)
@@ -350,9 +350,9 @@ UInt32 gAsipInfo1_PrimaryErrCnt =0;
 UInt32 gAsipInfo1_ErrCnt        =0;
 UInt32 gAsipInfo2_PrimaryErrCnt =0;
 UInt32 gAsipInfo2_ErrCnt        =0;
+// debug
 UInt32 gCapIbReset_cnt          =0;
 UInt32 gCapIb_cnt               =0;
-// debug
 UInt32 gCbWrtAfErrCnt           =0; // decoder output circular buffer write error count (returned from ARM to DSP)
                                    
 
@@ -849,12 +849,13 @@ Void taskAsipFxn(
             continue;
         }
 
-        // FL: debug, reset IB capture buffer
+#if 0 // debug, reset IB capture buffer
         capIbReset();
         gCapIbReset_cnt++;
         Log_info0("capIbReset()");
+#endif
 
-        // FL: send source select message to slave
+        // send source select message to slave
         *(Int32 *)&asipMsgBuf[0] = sourceSelect;
         if(AspMsgSend(ASP_SLAVE_DEC_SOURCE_SELECT, ASP_MASTER_DEC_SOURCE_SELECT_DONE,
                       asipMsgBuf, NULL) != ASP_MSG_NO_ERR)
@@ -2709,9 +2710,10 @@ PAF_ASIT_decodeInfo(
             return ASPERR_RECLAIM;
         }
         
-        //// FL: debug, capture input buffer
-        //capIb(pAstCfg->xInp[zMI].pInpBuf);
-        //gCapIb_cnt++;
+#if 0 // debug, capture input buffer
+        capIb(pAstCfg->xInp[zMI].pInpBuf);
+        gCapIb_cnt++;
+#endif
         
 #if 0 // (***) FL: shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
         // (***) debug // B5
@@ -3056,8 +3058,9 @@ PAF_ASIT_decodeDecode(
                     (IArg)pAstCfg->xInp[z].pInpBuf->base.pVoid,
                     (IArg)pAstCfg->xInp[z].pInpBuf->head.pVoid);
 
-            // FL: debug, capture input buffer
-            //capIbPcm(pAstCfg->xInp[z].pInpBuf);
+#if 0 // debug, capture input buffer
+            capIbPcm(pAstCfg->xInp[z].pInpBuf);
+#endif
             
             // (***) FL: revisit
             // write back Dec configuration
index 63789bcc5f7093e56e425e6c5ce31c933c3e8846..6578b3a8d375f4426862e2df803081611685eb55 100644 (file)
@@ -2442,17 +2442,19 @@ PAF_ASOT_decodeStream(
             }
 #endif
 
-        // FL: debug
-        // Get circular buffer statistics (debug)
+        // debug, get circular buffer statistics
         //cbGetStats(pCbCtl, z, &cbStats);
         cbGetStats(pCbCtl, z, &gCbStats);
 
         // debug
         cbLog(pCbCtl, z, 1, "PAF_ASOT_decodeStream:cbReadAf");
-        //if (capAfWrite(pAfRd, PAF_LEFT) != CAP_AF_SOK)
-        //{
-        //    Log_info0("capAfWrite() error");
-        //}
+        
+#if 0 // debug, capture audio frame
+        if (capAfWrite(pAfRd, PAF_LEFT) != CAP_AF_SOK)
+        {
+            Log_info0("capAfWrite() error");
+        }
+#endif
     }
             
     TRACE_VERBOSE0("PAF_ASOT_outputStream: calling streamChainFunction.");