]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
Changed pingpong buffering of DDP in circular buffer to triple buffering to prevent...
authorSu <qsu@ti.com>
Fri, 29 Jul 2016 18:40:53 +0000 (14:40 -0400)
committerSu <qsu@ti.com>
Fri, 29 Jul 2016 18:40:53 +0000 (14:40 -0400)
procsdk_audio_x_xx_xx_xx/common/paf_decOpCircBuf.c
procsdk_audio_x_xx_xx_xx/common/paf_decOpCircBuf.h
procsdk_audio_x_xx_xx_xx/test_arm/application/app.cmd
procsdk_audio_x_xx_xx_xx/test_dsp/framework/audioStreamOutProc.c

index f660bdd47a77d4e90987a1b635412a4abec93070..5bb89adb40407ca0c2009d0cce5e6f5c7c0c1927 100644 (file)
@@ -8,7 +8,7 @@
 #include "paf_decOpCircBuf.h"
 
 #define MAX_NUM_AF_PCM      ( 4 )
 #include "paf_decOpCircBuf.h"
 
 #define MAX_NUM_AF_PCM      ( 4 )
-#define MAX_NUM_AF_DDP      ( 2 )
+#define MAX_NUM_AF_DDP      ( 3 ) //Qin - Increased to prevent cb overflow.
 
 #define CB_INIT_RD_LAG      ( 2 )
 
 
 #define CB_INIT_RD_LAG      ( 2 )
 
@@ -59,8 +59,8 @@ Int cbInit(
     {
         pCb->maxNumAfCb = MAX_NUM_AF_DDP;
         pCb->afRdIdx = 0;
     {
         pCb->maxNumAfCb = MAX_NUM_AF_DDP;
         pCb->afRdIdx = 0;
-        pCb->afWrtIdx = 1;
-        pCb->pcmRdIdx = decOpFrameLen - CB_INIT_RD_LAG*strFrameLen; // 2*256 behind
+        pCb->afWrtIdx = 0;//1;//QIN - Reduce delay to prevent cb overflow. Need further investigation.
+        pCb->pcmRdIdx = 0;//decOpFrameLen - CB_INIT_RD_LAG*strFrameLen; //QIN - Reduce delay to prevent cb overflow. Need further investigation.
         
         // initialize audio frames
         for (n=0; n<pCb->maxNumAfCb; n++)
         
         // initialize audio frames
         for (n=0; n<pCb->maxNumAfCb; n++)
index 7d907cd8eac8c3782d7698a268306906c62ee888..0f0f8b90d128b7b0b144ceb49a1bb47c39b511ae 100644 (file)
@@ -12,7 +12,7 @@
 
 #define PAF_DECOP_CB_MAX_NUM_AF             ( 4 )       // decoder output circular buffer maximum number audio frames
 #define PAF_DECOP_CB_MAX_NUM_PCM_CH         ( 16 )      // decoder output circular buffer maximum number audio PCM channels
 
 #define PAF_DECOP_CB_MAX_NUM_AF             ( 4 )       // decoder output circular buffer maximum number audio frames
 #define PAF_DECOP_CB_MAX_NUM_PCM_CH         ( 16 )      // decoder output circular buffer maximum number audio PCM channels
-#define PAF_DECOP_CB_MAX_NUM_PCM_FRAMES     ( 2 )       // decoder output circular buffer maximum number PCM frames
+#define PAF_DECOP_CB_MAX_NUM_PCM_FRAMES     ( 3 )       // decoder output circular buffer maximum number PCM frames //Qin - Increased to prevent cb overflow for ddp.
 #define PAF_DECOP_CB_MAX_PCM_FRAME_LEN      ( 6*256 )   // decoder output circular buffer maximum PCM frame length
 #define PAF_DECOP_CB_PCM_BUF_SZ             ( PAF_DECOP_CB_MAX_NUM_PCM_CH * PAF_DECOP_CB_MAX_NUM_PCM_FRAMES * PAF_DECOP_CB_MAX_PCM_FRAME_LEN )
 
 #define PAF_DECOP_CB_MAX_PCM_FRAME_LEN      ( 6*256 )   // decoder output circular buffer maximum PCM frame length
 #define PAF_DECOP_CB_PCM_BUF_SZ             ( PAF_DECOP_CB_MAX_NUM_PCM_CH * PAF_DECOP_CB_MAX_NUM_PCM_FRAMES * PAF_DECOP_CB_MAX_PCM_FRAME_LEN )
 
index 19535c72977c361d0dcd99d75967315b727b413f..57e01ff9a5d2f60c44dac8af96a9e6a45925249e 100644 (file)
@@ -1,6 +1,7 @@
 SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\paf\pa\build\a15\release )
 SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\intrinsics\Dolby_Intrinsics_Imp\lib_float_A15 )
 SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\paf\pa\build\a15\release )
 SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\intrinsics\Dolby_Intrinsics_Imp\lib_float_A15 )
-SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\ddp\Dolby_Digital_Plus_Decoder_Imp\Source_Code\make\k2g\Wrapper\ddp_application )
+SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\ddp\Dolby_Digital_Plus_Decoder_Imp\Source_Code\make\ddp_udc_lib\a15 )
+SEARCH_DIR ( C:\ti\procsdk_audio_x_xx_xx_xx\ddp\Dolby_Digital_Plus_Decoder_Imp\Source_Code\make\ddp_udc_wrapper\a15 )
 
 INPUT ( c67x_cintrins_elf.lib simulate_dma_elf.lib )
 INPUT ( acp_elf.lib asp_std_elf.lib com_asp_elf.lib com_dec_elf.lib pcm1_elf.lib  )
 
 INPUT ( c67x_cintrins_elf.lib simulate_dma_elf.lib )
 INPUT ( acp_elf.lib asp_std_elf.lib com_asp_elf.lib com_dec_elf.lib pcm1_elf.lib  )
index e9e190a3cf6226a8e9cff0b334ee0cf46bfac95c..d67f7a1bdbde5f66e75cbf3dd9aa96a013a78bcd 100644 (file)
@@ -1735,7 +1735,7 @@ PAF_ASOT_decodeStream(
         if (cbErrno != 0)
         {
             TRACE_TERSE1("PAF_ASOT_decodeStream:cbReadAf() error=%d", cbErrno);
         if (cbErrno != 0)
         {
             TRACE_TERSE1("PAF_ASOT_decodeStream:cbReadAf() error=%d", cbErrno);
-            SW_BREAKPOINT; // temporary
+            //SW_BREAKPOINT; // temporary//QIN - need to put underflow stats counter here.
         }
         //Log_info0("PAF_ASOT_decodeStream:cbReadAf() complete.");
 
         }
         //Log_info0("PAF_ASOT_decodeStream:cbReadAf() complete.");