]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
PASDK-277: Added GPIO for timestamping CB operation.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Mon, 29 May 2017 15:26:35 +0000 (20:56 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Mon, 29 May 2017 15:26:35 +0000 (20:56 +0530)
pasdk/test_arm/framework/aspDecOpCircBuf_slave.c
pasdk/test_arm/framework/audioStreamDecodeProc.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/audioStreamOutProc.c

index f07e65d5db010974a1559ec78db67d4e5a04f852..8ea3696703fd05a6decb2c16b6c1c9514559642e 100644 (file)
@@ -411,6 +411,15 @@ Int cbWriteAf(
             }
         }
         Cache_wait();
+
+        {
+            static Uint8 toggleState = 0;
+           if (toggleState == 0)
+               GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_99);
+           else
+               GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_99);
+           toggleState = ~(toggleState);
+        }
         Log_info3("wrote %d samples into AF %d sourceSel: %d", pAfCb->sampleCount, pCb->afWrtIdx, pCb->sourceSel);
         // write back private metadata // QIN
         Log_info4("CBWMETA num=%d  size=%d  offset=%d chrequest=0x%04x", pAfCb->numPrivateMetadata, pAfCb->pafPrivateMetadata[0].size, pAfCb->pafPrivateMetadata[0].offset, pAfCb->channelConfigurationRequest.full);
index 6eb6d2f861082eab761bfed0243422fd62e0cbcf..760598eb899e3b36e4fae693f65471134c588377 100644 (file)
@@ -736,7 +736,7 @@ Void taskAsdpFxn(
                         }
                         #endif
 
-                        GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_107);
+                        //GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_107);
                         cbErrno = cbWriteAf(pCbCtl, z, pAfWrt);
                         if ((cbErrno < 0) && (cbErrno != ASP_DECOP_CB_WRITE_OVERFLOW))
                         {
@@ -771,7 +771,7 @@ Void taskAsdpFxn(
                             
                             cbErrno = 0; // don't return error condition
                         }
-                        GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_107);
+                        //GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_107);
                         TRACE_TERSE0("Dec:cbWriteAf() complete");
                         
 #if 0 // (***) FL: shows timing of CB write
index f726fc3b076e57e69c932ba4811c5d9dd27b86fd..2c6c2853ed079e00fa1df0c460c169c45ac6e56c 100644 (file)
@@ -609,6 +609,15 @@ Int cbReadAf(
             cbReadMuteWithLastAfInfo(pCb, pAfRd);
             //SW_BREAKPOINT; // FL: debug
             
+            {
+                static Uint8 toggleState = 0;
+                if (toggleState == 0)
+                    GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_107);
+                else
+                    GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_107);
+                toggleState = ~(toggleState);
+            }
+
             #ifdef CB_RW_OP_CAP_PP
             if (pCb->cb_opCnt < CB_OP_COUNT_MAX)
             {
@@ -778,6 +787,15 @@ Int cbReadAf(
             pCb->numAfCb--;
         }
         memcpy (&pCb->lastAf, pAfRd, sizeof(PAF_AudioFrame));
+
+        {
+            static Uint8 toggleState = 0;
+            if (toggleState == 0)
+                GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106);
+            else
+                GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_106);
+            toggleState = ~(toggleState);
+        }
     }
     
     if (pCb->emptyFlag == 1)
index 967318046953b7f2c2a1c9676fa48eba510b60ba..4b94edde1b6a41b4cdb6254503da7228486265ca 100644 (file)
@@ -1994,7 +1994,7 @@ PAF_ASIT_autoProcessing(
     nbytes = SIO_reclaim(pAstCfg->xInp[zMI].hRxSio, (Ptr)&pAstCfg->xInp[zMI].pInpBuf, NULL);
     if (nbytes == -DIBERR_SYNC)
     {
-#if 1 // (***) FL: shows timing of autosync restart
+#if 0 // (***) FL: shows timing of autosync restart
         // (***) debug // B5
         {
             static Uint8 toggleState = 0;
@@ -2972,7 +2972,7 @@ PAF_ASIT_decodeInfo(
         capIb(pAstCfg->xInp[zMI].pInpBuf);
         gCapIb_cnt++;
         
-#if 1 // (***) FL: shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
+#if 0 // (***) FL: shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
         // (***) debug // B5
         {
             static Uint8 toggleState = 0;
index be6c61d8212142e5df3e774727152ef1583260f2..ed65a1123ebebfd2a41f522b7ab0623a6bf812f3 100644 (file)
@@ -1896,7 +1896,7 @@ PAF_ASOT_decodeStream(
         // Read decoder output circular buffer
         //
         pAfRd = pAstCfg->xStr[zS].pAudioFrame;
-        GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106);
+        //GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_106);
         cbErrno = cbReadAf(pCbCtl, z, pAfRd);
         if ((cbErrno < 0) && (cbErrno != ASP_DECOP_CB_READ_UNDERFLOW))
         {
@@ -1947,7 +1947,7 @@ PAF_ASOT_decodeStream(
             gDecOpCbRdAfUnd = 0; // reset circular buffer underflow count
         }
         //Log_info0("PAF_ASOT_decodeStream:cbReadAf() complete.");
-        GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_106);
+        //GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_106);
         Log_info0("PAF_ASOT_decodeStream:cbReadAf() complete.");
         
 #if 0 // (***) FL: shows timing of CB read