]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - processor_audio_sdk_1_00_00_00/pasdk/common/aspDecOpCircBuf_common.h
Add Decoder Output Circular Buffer reset function
[processor-sdk/performance-audio-sr.git] / processor_audio_sdk_1_00_00_00 / pasdk / common / aspDecOpCircBuf_common.h
index 8b9994de3f27d28dd9d9f9690ddb1268ffc095ae..7d3decca8034ec7d611209414f4fd5d92e023c26 100644 (file)
@@ -39,6 +39,7 @@ All rights reserved.
 #include <xdc/std.h>
 #include <ti/ipc/GateMP.h>
 #include "paftyp.h"
+#include "pafdec.h"
 
 #define ASP_DECOP_CB_SOK                    ( 0 )       // ok
 #define ASP_DECOP_CB_CTL_INIT_INV_GATE      ( ASP_DECOP_CB_SOK-1 )  // error: invalid gate handle
@@ -50,6 +51,16 @@ All rights reserved.
 #define ASP_DECOP_CB_MAX_PCM_FRAME_LEN      ( 6*256 )   // decoder output circular buffer maximum PCM frame length
 #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_DECOP_CB_MAX_NUM_AF_PCM         ( 4 )
+#define ASP_DECOP_CB_INIT_LAG_PCM           ( 2 ) // 1...3
+#define ASP_DECOP_CB_INIT_WRTIDX_PCM        ( ASP_DECOP_CB_INIT_LAG_PCM )
+#define ASP_DECOP_CB_INIT_RDIDX_PCM         ( 0 )
+
+#define ASP_DECOP_CB_MAX_NUM_AF_DDP         ( 2 )
+#define ASP_DECOP_CB_INIT_LAG_DDP           ( 4 ) // 0...5
+#define ASP_DECOP_CB_INIT_WRTIDX_DDP        ( 1 )
+#define ASP_DECOP_CB_INIT_RDIDX_DDP         ( 0 )
+
 #define ASP_DECODE_CB_GATE_NAME             ( "AspDecOpCbGate" )
 #define ASP_DECODE_CB_GATE_REGION_ID        ( 0 )
 
@@ -88,6 +99,12 @@ Int cbCtlInit(
     PAF_AST_DecOpCircBuf **pXDecOpCb    // address of decoder output circular buffer base pointer
 );
 
+// Reset circular buffer
+Int cbReset(
+    PAF_AST_DecOpCircBufCtl *pCbCtl,
+    Int8 cbIdx
+);
+
 // Output log of circular buffer control variables (debug)
 Int cbLog(
     PAF_AST_DecOpCircBufCtl *pCbCtl,