]> 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-218:Add rudimentary Dec Op CB status and alpha command interface
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / framework / itopo / params.c
index f2d577dad1f5e57775ef18d7cc80b5ed5f223e27..cc81ffcbd7a7ea928ea78a44a721679f13ed714d 100644 (file)
@@ -57,6 +57,12 @@ All rights reserved.
 
 #include "dbgBenchmark.h" // PCM high-sampling rate + SRC + CAR benchmarking
 
+/* !!!!!!!!! Revisit !!!!!!!!!!!!!!
+ * Purpose : Temporary ASOT FL sizes.
+ *                      Deprecate PAF_SYS_FRAMELENGTH in phases.*/
+#define PAF_ASOT_FRAMELENGTH           256
+#define PAF_ASOT_MAX_FRAMELENGTH       1024
+
 //
 // Framework Declarations
 //
@@ -395,18 +401,45 @@ const PAF_OutBufStatus PAF_AST_params_outBufStatus =
     PAF_SAMPLERATE_UNKNOWN,                                 // sampleRate
     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]
+    PAF_OB_FLUSH_DISABLE,                                    // flush          !!! FLUSH_ENABLE not supported, yet !!!
+    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 =
 {
     sizeof (PAF_EncodeStatus),                              // size
     1,                                                      // mode
-    0,                                                      // unused1
+    0,                                                      // command2
     PAF_SAMPLERATE_UNKNOWN,                                 // sampleRate
     0,                                                      // channelCount
     0, 0, 0, 0,                                             // Unused                                        
@@ -417,12 +450,12 @@ const PAF_EncodeStatus PAF_AST_params_encodeStatus_primary =
     0,                                                      // frameLength
     0,                                                      // encBypass
     PAF_SOURCE_PCM,                                         // select
-    PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0,0,0,0,0,
     // channelConfigurationRequest.full
-    PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0,0,0,0,0,
+    PAF_CC_SAT_SURROUND4, PAF_CC_SUB_ONE, PAF_CC_AUX_SURROUND4_UNKNOWN, 0,0,0,0,0,
     // channelConfigurationStream.full
     PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0,0,0,0,0,
     // channelConfigurationEncode.full
+    PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0,0,0,0,0,    
     0, 0, 0, 0,    0, 0, 0, 0,                              // Unused
     -3,                                                     // channelMap.from[0]
     -3,                                                     // channelMap.from[1]
@@ -440,6 +473,22 @@ const PAF_EncodeStatus PAF_AST_params_encodeStatus_primary =
     -3,                                                     // channelMap.from[13]
     -3,                                                     // channelMap.from[14]
     -3,                                                     // channelMap.from[15]
+    -3,                                                     // channelMap.from[16]
+    -3,                                                     // channelMap.from[17]
+    -3,                                                     // channelMap.from[18]
+    -3,                                                     // channelMap.from[19]
+    -3,                                                     // channelMap.from[20]
+    -3,                                                     // channelMap.from[21]
+    -3,                                                     // channelMap.from[22]
+    -3,                                                     // channelMap.from[23]
+    -3,                                                     // channelMap.from[24]
+    -3,                                                     // channelMap.from[25]
+    -3,                                                     // channelMap.from[26]
+    -3,                                                     // channelMap.from[27]
+    -3,                                                     // channelMap.from[27]
+    -3,                                                     // channelMap.from[28]
+    -3,                                                     // channelMap.from[30]
+    -3,                                                     // channelMap.from[31]
     -3,                                                     // channelMap.to[0]
     -3,                                                     // channelMap.to[1]
     -3,                                                     // channelMap.to[2]
@@ -456,42 +505,32 @@ const PAF_EncodeStatus PAF_AST_params_encodeStatus_primary =
     -3,                                                     // channelMap.to[13]
     -3,                                                     // channelMap.to[14]
     -3,                                                     // channelMap.to[15]
-    -3,                                                     // channelMap.from[0]
-    -3,                                                     // channelMap.from[1]
-    -3,                                                     // channelMap.from[2]
-    -3,                                                     // channelMap.from[3]
-    -3,                                                     // channelMap.from[4]
-    -3,                                                     // channelMap.from[5]
-    -3,                                                     // channelMap.from[6]
-    -3,                                                     // channelMap.from[7]
-    -3,                                                     // channelMap.from[8]
-    -3,                                                     // channelMap.from[9]
-    -3,                                                     // channelMap.from[10]
-    -3,                                                     // channelMap.from[11]
-    -3,                                                     // channelMap.from[12]
-    -3,                                                     // channelMap.from[13]
-    -3,                                                     // channelMap.from[14]
-    -3,                                                     // channelMap.from[15]
-    -3,                                                     // channelMap.to[0]
-    -3,                                                     // channelMap.to[1]
-    -3,                                                     // channelMap.to[2]
-    -3,                                                     // channelMap.to[3]
-    -3,                                                     // channelMap.to[4]
-    -3,                                                     // channelMap.to[5]
-    -3,                                                     // channelMap.to[6]
-    -3,                                                     // channelMap.to[7]
-    -3,                                                     // channelMap.to[8]
-    -3,                                                     // channelMap.to[9]
-    -3,                                                     // channelMap.to[10]
-    -3,                                                     // channelMap.to[11]
-    -3,                                                     // channelMap.to[12]
-    -3,                                                     // channelMap.to[13]
-    -3,                                                     // channelMap.to[14]
-    -3,                                                     // channelMap.to[15]
-    0,                                                      // programFormat.mask
+    -3,                                                     // channelMap.to[16]
+    -3,                                                     // channelMap.to[17]
+    -3,                                                     // channelMap.to[18]
+    -3,                                                     // channelMap.to[19]
+    -3,                                                     // channelMap.to[20]
+    -3,                                                     // channelMap.to[21]
+    -3,                                                     // channelMap.to[22]
+    -3,                                                     // channelMap.to[23]
+    -3,                                                     // channelMap.to[24]
+    -3,                                                     // channelMap.to[25]
+    -3,                                                     // channelMap.to[26]
+    -3,                                                     // channelMap.to[27]
+    -3,                                                     // channelMap.to[28]
+    -3,                                                     // channelMap.to[29]
+    -3,                                                     // channelMap.to[30]
+    -3,                                                     // channelMap.to[31]
+    1,                                                      // programFormat.mask
     0,                                                      // programFormat.form
+    0,                                                      // listeningFormat.mask
+    0,                                                      // listeningFormat.form
     0,                                                      // sampleProcess[0]
+    0, 0, 0, 0,                                             // Unused     
+    PAF_CC_SAT_UNKNOWN, PAF_CC_SUB_ZERO, 0, 0, 0, 0, 0, 0,  // channelConfigurationCompact                                      
+    0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, //channelCompact[PAF_MAXNUMCHAN_HD]
 };
+                                       
 
 
 
@@ -649,13 +688,13 @@ const PAF_ASP_LinkInit *const inpLinkInit[] =
 const IALG_MemRec outMemTabPrimary[] =
 {
     // SDRAM buffer
-    // 4 buffers * 256 samples * 32 ch * 4 bytes
+    // 4 buffers * PAF_ASOT_MAX_FRAMELENGTH samples * 16 ch (assumed MAX) * 4 bytes
         {
-            4 * 256 * 32 * 4,                                      // size: note:
+            4 * PAF_ASOT_MAX_FRAMELENGTH * 16 * 4,                                      // size: note:
             //6 * 256 * 32 * 4,                                      // size: note:
             //16 * 256 * 32 * 4,                                      // size: note:
             128,                                                   // alignment
-            IALG_EXTERNAL,                                         // space
+            IALG_SARAM,                                         // space
             IALG_PERSIST,                                          // attrs
             NULL,                                                  // base
         }
@@ -685,9 +724,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
@@ -714,10 +752,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[] =
@@ -731,7 +766,7 @@ const PAF_MetadataBufStatus PAF_AST_params_MetadataBufStatus[] =
     PAF_MAX_PRIVATE_MD_SZ,  // bufSize
     PAF_MAX_NUM_PRIVATE_MD, // NumBuf
     128,                    // alignment
-    &gPafHeapIdExt //&SDRAM // &IRAM,        // pSpace
+    &gPafHeapIdExt          // pHeapIdMdbuf
 };
 
 // .............................................................................
@@ -796,6 +831,18 @@ const PAF_AudioFrameBufStatus    PAF_AST_params_AudioFrameBufStatus[PAF_MAXNUMCH
     //IALG_EXTERNAL // 31
 };
 
+const PAF_AST_DecOpCircBufStatus PAF_AST_params_decOpCircBufStatus_primary =
+{
+    sizeof(PAF_AST_DecOpCircBufStatus),
+    PAF_ASOT_FRAMELENGTH
+};
+
+const PAF_AST_DecOpCircBufStatus *const PAF_AST_params_decOpCircBufStatus[] =
+{
+    &PAF_AST_params_decOpCircBufStatus_primary,
+};
+
+
 //(***) FL: re-visit, clean this up (remove unused members)
 // .............................................................................
 //
@@ -806,38 +853,41 @@ const PAF_AudioFrameBufStatus    PAF_AST_params_AudioFrameBufStatus[PAF_MAXNUMCH
 
 const PAF_ASIT_Params asip_params_PAi =
 {
-    &PAF_ASIT_params_fxns,                                     // fxns
-    {                                                          // zone
-        0,                                                     // master
-        1,                                                     // inputs
-        0,                                                     // input1
-        1,                                                     // inputN
-        1,                                                     // decodes
-        0,                                                     // decode1
-        1,                                                     // decodeN
-        1,                                                     // streams
-        0,                                                     // stream1 /* unused */
-        1,                                                     // streamN /* unused */
-        1,                                                     // encodes
-        0,                                                     // encode1
-        1,                                                     // encodeN
-        1,                                                     // outputs
-        0,                                                     // output1
-        1,                                                     // outputN
+    &PAF_ASIT_params_fxns,                                  // fxns
+    {                                                       // zone
+        0,                                                  // zone.master
+        1,                                                  // zone.inputs
+        0,                                                  // zone.input1
+        1,                                                  // zone.inputN
+        1,                                                  // zone.decodes
+        0,                                                  // zone.decode1
+        1,                                                  // zone.decodeN
+        1,                                                  // zone.streams
+        0,                                                  // zone.stream1 /* unused */
+        1,                                                  // zone.streamN /* unused */
+        1,                                                  // zone.encodes
+        0,                                                  // zone.encode1
+        1,                                                  // zone.encodeN
+        1,                                                  // zone.outputs
+        0,                                                  // zone.output1
+        1,                                                  // zone.outputN
     },
     PAF_AST_inputsFromDecodes_std,
     PAF_AST_outputsFromEncodes_std,
     {                                                       // heap
-        &gPafHeapIdInt,    //&IRAM,                         // pIntern
-        &gPafHeapIdExt,    //&SDRAM,                        // pExtern
-        &gPafHeapIdInt,    //&IRAM,                         // pInpbuf
-        &gPafHeapIdInt,    //&IRAM,                         // pOutbuf
-        &gPafHeapIdInt,    //&IRAM,                         // pFrmbuf
-        &gPafHeapIdInt1,   //&L3RAM,                        // pIntern1
-        1,                                                  // clear
+        &gPafHeapIdInt,                                     // heap.pHeapIdIntern
+        &gPafHeapIdExt,                                     // heap.pHeapIdExtern
+        &gPafHeapIdInt,                                     // heap.pHeapIdInpbuf
+        &gPafHeapIdInt,                                     // heap.pHeapIdOutbuf
+        &gPafHeapIdInt,                                     // heap.pHeapIdFrmbuf
+        &gPafHeapIdInt1,                                    // heap.pHeapIdIntern1
+        &gPafHeapIdInt1Shm,                                 // heap.pHeapIdInt1Shm
+        &gPafHeapIdExtShm,                                  // heap.pHeapIdExtShm
+        &gPafHeapIdExtNonCachedShm,                         // heap.pHeapIdExtNonCachedShm
+        1,                                                  // heap.clear
     },
     {                                                       // common
-        params_memspace_PAi,                                // space
+        params_memspace_PAi,                                // common.space
     },
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
@@ -860,8 +910,9 @@ const PAF_ASIT_Params asip_params_PAi =
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit
     outNumBufMap,                                           // outNumBufMap // FL: poutNumBufMap
-    PAF_AST_params_MetadataBufStatus,                       //metadata buffer status
-    PAF_AST_params_AudioFrameBufStatus                      //Audio frame buffer status
+    PAF_AST_params_MetadataBufStatus,                       // metadata buffer status
+    PAF_AST_params_AudioFrameBufStatus,                     // Audio frame buffer status
+    PAF_AST_params_decOpCircBufStatus                       // z_pDecOpCircBufStatus
 };
 
 extern const PAF_ASOT_Fxns PAF_ASOT_params_fxns;
@@ -870,43 +921,46 @@ extern const PAF_ASOT_Fxns PAF_ASOT_params_fxns;
 //(***) FL: re-visit, clean this up (remove unused members)
 const PAF_ASOT_Params asop_params_PAi =
 {
-    &PAF_ASOT_params_fxns,                                     // fxns
-    {                                                          // zone
-        0,                                                     // master
-        1,                                                     // inputs
-        0,                                                     // input1
-        1,                                                     // inputN
-        1,                                                     // decodes
-        0,                                                     // decode1
-        1,                                                     // decodeN
-        1,                                                     // streams
-        0,                                                     // stream1 /* unused */
-        1,                                                     // streamN /* unused */
-        1,                                                     // encodes
-        0,                                                     // encode1
-        1,                                                     // encodeN
-        1,                                                     // outputs
-        0,                                                     // output1
-        1,                                                     // outputN
+    &PAF_ASOT_params_fxns,                                  // fxns
+    {                                                       // zone
+        0,                                                  // zone.master
+        1,                                                  // zone.inputs
+        0,                                                  // zone.input1
+        1,                                                  // zone.inputN
+        1,                                                  // zone.decodes
+        0,                                                  // zone.decode1
+        1,                                                  // zone.decodeN
+        1,                                                  // zone.streams
+        0,                                                  // zone.stream1 /* unused */
+        1,                                                  // zone.streamN /* unused */
+        1,                                                  // zone.encodes
+        0,                                                  // zone.encode1
+        1,                                                  // zone.encodeN
+        1,                                                  // zone.outputs
+        0,                                                  // zone.output1
+        1,                                                  // zone.outputN
     },
     PAF_AST_inputsFromDecodes_std,
     PAF_AST_outputsFromEncodes_std,
     {                                                       // heap
-        &gPafHeapIdInt,    //&IRAM,                         // pIntern
-        &gPafHeapIdExt,    //&SDRAM,                        // pExtern
-        &gPafHeapIdInt,    //&IRAM,                         // pInpbuf
-        &gPafHeapIdInt,    //&IRAM,                         // pOutbuf
-        &gPafHeapIdInt,    //&IRAM,                         // pFrmbuf
-        &gPafHeapIdInt1,   //&L3RAM,                        // pIntern1
-        1,                                                  // clear
+        &gPafHeapIdInt,                                     // heap.pHeapIdIntern
+        &gPafHeapIdExt,                                     // heap.pHeapIdExtern
+        &gPafHeapIdInt,                                     // heap.pHeapIdInpbuf
+        &gPafHeapIdInt,                                     // heap.pHeapIdOutbuf
+        &gPafHeapIdInt,                                     // heap.pHeapIdFrmbuf
+        &gPafHeapIdInt1,                                    // heap.pHeapIdIntern1
+        &gPafHeapIdInt1Shm,                                 // heap.pHeapIdInt1Shm
+        &gPafHeapIdExtShm,                                  // heap.pHeapIdExtShm
+        &gPafHeapIdExtNonCachedShm,                         // heap.pHeapIdExtNonCachedShm
+        1,                                                  // heap.clear
     },
     {                                                       // common
-        params_memspace_PAi,                                // space
+        params_memspace_PAi,                                // common.space
     },
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
     PAF_AST_params_numchan,                                 // z_numchan
-    PAF_SYS_FRAMELENGTH,                                    // framelength
+       PAF_ASOT_FRAMELENGTH,                                   // framelength
     &PAF_AST_params_audioFrameFunctions,                    // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     &PAF_AST_params_inpBufStatus,                           // pInpBufStatus
@@ -919,13 +973,13 @@ const PAF_ASOT_Params asop_params_PAi =
     &PAF_ASP_params_decSioMap,                              // pDecSioMap
     PAF_AST_streamsFromDecodes_std,                         // streamsFromDecodes
     PAF_AST_streamsFromEncodes_std,                         // streamsFromEncodes
-    PAF_MAX_SYS_FRAMELENGTH,                                // maxFramelength
+       PAF_ASOT_MAX_FRAMELENGTH,                               // maxFramelength
     PAF_AST_streamOrder,                                    // streamOrder
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit
     outNumBufMap,                                           // outNumBufMap // FL: poutNumBufMap
-    PAF_AST_params_MetadataBufStatus,                       //metadata buffer status
-    PAF_AST_params_AudioFrameBufStatus                      //Audio frame buffer status
+    PAF_AST_params_MetadataBufStatus,                       // metadata buffer status
+    PAF_AST_params_AudioFrameBufStatus                      // Audio frame buffer status
 };