]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blobdiff - pasdk/test_dsp/framework/itopo/params.c
PASDK-251:Fix uninitialized global variables (DSP params, numBufOverride
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / itopo / params.c
index 0173dfb7d72d6b478367b4a3eeed632e26128fe7..7581cda0832fc1063a20ef4c58dfef457f66fa5f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
-Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
 All rights reserved.
 
 * Redistribution and use in source and binary forms, with or without 
@@ -55,6 +55,8 @@ All rights reserved.
 #include "audioStreamInpProc.h"
 #include "audioStreamOutProc.h"
 
+#include "dbgBenchmark.h" // PCM high-sampling rate + SRC + CAR benchmarking
+
 //
 // Framework Declarations
 //
@@ -394,10 +396,37 @@ const PAF_OutBufStatus PAF_AST_params_outBufStatus =
     0,                                                      // audio
     PAF_OB_CLOCK_INTERNAL,                                  // clock
     PAF_OB_FLUSH_ENABLE,                                    // flush
-    0,                                                      // unused[2] // FL: rateTrackMode
-    0,                                                      // PAF_OB_MARKER_ENABLED // FL: markerMode
-    0                                                       // FL: maxNumBufOverride
-                                                            // FL: (*** ?) missing init. values for numBufOverride[PAF_SOURCE_N]
+    0,                                                      // rateTrackMode // unused
+    PAF_OB_MARKER_DISABLED,                                 // markerMode
+    0,                                                      // maxNumBufOverride
+                                                            // this is the start of numBufOverride[PAF_SOURCE_N]                                                            
+    0,                                                      // PAF_SOURCE_UNKNOWN
+    0,                                                      // PAF_SOURCE_NONE
+    0,                                                      // PAF_SOURCE_PASS
+    0,                                                      // PAF_SOURCE_SNG
+    0,                                                      // PAF_SOURCE_AUTO
+    0,                                                      // PAF_SOURCE_BITSTREAM
+    0,                                                      // PAF_SOURCE_DTSALL
+    0,                                                      // PAF_SOURCE_PCMAUTO
+    0,                                                      // PAF_SOURCE_PCM
+    0,                                                      // PAF_SOURCE_PC8
+    0,                                                      // PAF_SOURCE_AC3
+    0,                                                      // PAF_SOURCE_DTS
+    0,                                                      // PAF_SOURCE_AAC
+    0,                                                      // PAF_SOURCE_MPEG
+    0,                                                      // PAF_SOURCE_DTS12
+    0,                                                      // PAF_SOURCE_DTS13
+    0,                                                      // PAF_SOURCE_DTS14
+    0,                                                      // PAF_SOURCE_DTS16
+    0,                                                      // PAF_SOURCE_WMA9PRO
+    0,                                                      // PAF_SOURCE_MP3
+    0,                                                      // PAF_SOURCE_DSD1,
+    0,                                                      // PAF_SOURCE_DSD2,
+    0,                                                      // PAF_SOURCE_DSD3,
+    0,                                                      // PAF_SOURCE_DDP
+    0,                                                      // PAF_SOURCE_DTSHD
+    0,                                                      // PAF_SOURCE_THD
+    0,                                                      // PAF_SOURCE_DXP                                                          
 };
 
 const PAF_EncodeStatus PAF_AST_params_encodeStatus_primary =
@@ -596,31 +625,36 @@ const IALG_MemRec inpMemTabPrimary[] =
     // SDRAM circular buffer
     // 2 buffers * 256 samples/buffer * 8 words/sample * 3 bytes/word
     {
-        (3 * 60 * 1024) + 2,                                    // size 184320 + 1 16-bit word for EDMA padding
+        (3 * 60 * 1024) + 2,                                    // size 184320 + 1 16-bit word for EDMA padding        // GJ Debug.
         //180 * 1024,                                           // size
         //6 * 60 * 1024,                                        // size
         128,                                                    // alignment
-        IALG_SARAM_SHM, //IALG_EXTERNAL_SHM, //IALG_SARAM2, //IALG_SARAM1, //IALG_EXTERNAL,                           // space
+               IALG_SARAM_SHM, //IALG_EXTERNAL_SHM, //IALG_SARAM2, //IALG_SARAM1, //IALG_EXTERNAL,                           // space
         IALG_PERSIST,                                           // attrs
         NULL,                                                   // base
      },
 
-    // IRAM scratch memory for autodetection and stereo PCM input
+        // GJ Debug: The below is not required; hence 0
+
+#if 0
+       // IRAM scratch memory for autodetection and stereo PCM input
     // High watermark needs are set by the latter:
     // double buffer stereo 32bit PCM input 512 max frame size
     // 1 buffers * 512 samples/buffer * 2 words/sample * 4 bytes/word
     {
-        8 * 1024,                                              // size
+        0 * 1024,                                              // size
         128,                                                   // alignment
-        IALG_SARAM,                                            // space
+               IALG_EXTERNAL_SHM,                                            // space
         IALG_SCRATCH,                                          // attrs
         NULL,                                                  // base
     }
+#endif
+
 };
 
 const PAF_SIO_IALG_Params inpSioAlgParamsPrimary =
 {
-    2,
+    1,
     inpMemTabPrimary
 };
 
@@ -678,9 +712,8 @@ const PAF_ASP_LinkInit * const outLinkInit[] =
 const PAF_ASP_outNumBufMap outPrimaryNumBufMap =
 {
     4,                                                      // maxNumBuf
-//    6,                                                      // maxNumBuf
-//    16,                                                      // maxNumBuf
     PAF_SOURCE_N,                                           // length
+                                                            // this is the start of map[PAF_SOURCE_N]                                                            
     0,                                                      // PAF_SOURCE_UNKNOWN
     0,                                                      // PAF_SOURCE_NONE
     2,                                                      // PAF_SOURCE_PASS
@@ -707,10 +740,7 @@ const PAF_ASP_outNumBufMap outPrimaryNumBufMap =
     4,                                                      // PAF_SOURCE_DDP
     4,                                                      // PAF_SOURCE_DTSHD
     4,                                                      // PAF_SOURCE_THD
-//    6,                                                      // PAF_SOURCE_THD
-//    16,                                                      // PAF_SOURCE_THD
     4,                                                      // PAF_SOURCE_DXP
-
 };
 
 const PAF_ASP_outNumBufMap *const outNumBufMap[] =
@@ -835,7 +865,7 @@ const PAF_ASIT_Params asip_params_PAi =
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
     PAF_AST_params_numchan,                                 // z_numchan
-    256,                                                    // framelength
+    PAF_SYS_FRAMELENGTH,                                    // framelength
     &PAF_AST_params_audioFrameFunctions,                    // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     &PAF_AST_params_inpBufStatus,                           // pInpBufStatus
@@ -848,7 +878,7 @@ const PAF_ASIT_Params asip_params_PAi =
     &PAF_ASP_params_decSioMap,                              // pDecSioMap
     PAF_AST_streamsFromDecodes_std,                         // streamsFromDecodes
     PAF_AST_streamsFromEncodes_std,                         // streamsFromEncodes
-    256,                                                    // maxFramelength
+    PAF_MAX_SYS_FRAMELENGTH,                                // maxFramelength
     PAF_AST_streamOrder,                                    // streamOrder
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit
@@ -899,7 +929,7 @@ const PAF_ASOT_Params asop_params_PAi =
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
     PAF_AST_params_numchan,                                 // z_numchan
-    256,                                                    // framelength
+    PAF_SYS_FRAMELENGTH,                                    // framelength
     &PAF_AST_params_audioFrameFunctions,                    // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     &PAF_AST_params_inpBufStatus,                           // pInpBufStatus
@@ -912,7 +942,7 @@ const PAF_ASOT_Params asop_params_PAi =
     &PAF_ASP_params_decSioMap,                              // pDecSioMap
     PAF_AST_streamsFromDecodes_std,                         // streamsFromDecodes
     PAF_AST_streamsFromEncodes_std,                         // streamsFromEncodes
-    256,                                                    // maxFramelength
+    PAF_MAX_SYS_FRAMELENGTH,                                // maxFramelength
     PAF_AST_streamOrder,                                    // streamOrder
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit