]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
PASDK242: Added support for SRC4 and 96KHz.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 28 Feb 2017 10:39:26 +0000 (16:09 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 28 Feb 2017 10:39:26 +0000 (16:09 +0530)
pasdk/common/asp0.c
pasdk/test_arm/framework/itopo/params.c
pasdk/test_dsp/.cproject
pasdk/test_dsp/application/app.cmd
pasdk/test_dsp/application/itopo/evmk2g/alpha/i13_a.h
pasdk/test_dsp/application/itopo/evmk2g/atboot.c
pasdk/test_dsp/framework/aspDecOpCircBuf_master.c
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/itopo/params.c
pasdk/test_dsp/framework/itopo/patchs.c
pasdk/test_dsp/sap/sap_d10.c

index b25a449a12bcd475bd4f162dc7ab27b0df71acd3..62667e26f663525e6641be432c97389fd5b9c81b 100644 (file)
@@ -62,11 +62,15 @@ All rights reserved.
 
 #ifndef MAX_NUM
 #define MAX_NUM 28515
+#define NUM_ASP_PROFILE  1  // Profile CAR; As we have PCM->SRC(0)->CAR(1)->PCE
 #endif
 UInt32 profile_array_dsp_cycles[MAX_NUM];
 UInt32 profile_array_dsp_cpuload[MAX_NUM];
-UInt32 profile_index = 0;
-UInt32 start_profiling = 0;
+UInt32 profile_index = 0;      // Array index
+UInt32 start_profiling = 0;    // Flag
+UInt32 currentAspCount = 0;    // ASP number in chain starting from 0
+UInt32 aspNumberToProfile = NUM_ASP_PROFILE; // ASP number in chain starting from 0
+volatile UInt32 time32_1, time32_2;
 #endif
 
 //
@@ -309,14 +313,16 @@ PAF_ASP_chainApply_ (PAF_ASP_Chain *this, PAF_AudioFrame *pAudioFrame)
         {
 
 #ifdef PROFILER
+        if (aspNumberToProfile == currentAspCount)  // only profile the selected ASP
         {
-            volatile UInt32 time32_1, time32_2;
-
             time32_1 = Timestamp_get32();
+        }
 #endif
             errno = alg->fxns->apply(alg, pAudioFrame);
 
 #ifdef PROFILER
+        if (aspNumberToProfile == currentAspCount)  // only profile the selected ASP
+        {
             time32_2 = Timestamp_get32();
             //Load_Stat stat;
             //Load_getTaskLoad (Task_getIdleTask(), &stat);
@@ -339,6 +345,8 @@ PAF_ASP_chainApply_ (PAF_ASP_Chain *this, PAF_AudioFrame *pAudioFrame)
             //TRACE_TERSE1("profiler: Timestamp_get32() cycles: %u", (time32_2 - time32_1) * factor);
             //TRACE_TERSE2("profiler: CPU load: idle: %d other: %d", intLoad, (100 - intLoad));
         }
+        // increase ASP count
+        currentAspCount++;
 #endif
 
             if (errno && this->log)
@@ -347,10 +355,18 @@ PAF_ASP_chainApply_ (PAF_ASP_Chain *this, PAF_AudioFrame *pAudioFrame)
                     this->stream, pLink->code.full, errno);
                 LOG_printf(&trace, "AS%d: ASP code 0x%08x apply error 0x%x.",
                     this->stream, pLink->code.full, errno);
+                #ifdef PROFILER
+                // Reset ASP count for next frame
+                currentAspCount = 0;
+                #endif
+                return errno;
             }
-            return errno;
         }
     }
+#ifdef PROFILER
+    // Reset ASP count for next frame
+    currentAspCount = 0;
+#endif
 
     return 0;
 }
index 89496fea714c2c2f8db217b5f72f6dc3e7ee8d03..711331e871a04485bb3ec55b7aaa68fb80d0fc86 100644 (file)
@@ -438,7 +438,7 @@ const PAF_ASDT_Params asdp_params_PAi =
         params_memspace_PAi_Slave,                          // space
     },
     PAF_AST_params_numchan,                                 // z_numchan
-    256,                                                    // framelength
+    512, //256,                                                    // framelength
     &PAF_ASDT_params_audioFrameFunctions,                   // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     PAF_ASDT_params_decodeStatus,                           // z_pDecodeStatus
index fd3c3335b03f00d69f5f320af61fb8a569faed96..5b275b9a2271d815e6d68d541276560170c7e26f 100644 (file)
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/com&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/del&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/fil/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/src4/alg&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/src4/alpha&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/asp/std&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/enc/pce2/alg&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/enc/pce2/alpha&quot;"/>
index d2c0c2db622557fa7ba8c1769c7ada95ca9ff973..efd8c99b8621d2f72de10e176527bd8e84f5c0aa 100644 (file)
@@ -54,6 +54,8 @@ All rights reserved.
 -l"dcs7_elf.lib"
 -l"statusop_common_elf.lib"
 -l"misc_elf.lib"
+-l"src4_elf.lib"
+-l"fil_elf.lib"
 
 -l"dolby_oar_lib.lib"
 -l"libcar_c66_float_release.lib"
index 042473740ce986debdfa01352f8d1f575254ac2b..77b28d1c6c7864f11e37ab5d87798b8cb49692d3 100644 (file)
@@ -56,6 +56,7 @@ All rights reserved.
 #include <ae_a.h>\r
 //#include <dm_a.h>\r
 #include <ddpat_a.h>\r
+#include <src_a.h>\r
 #include <thd_a.h>\r
 #include <car_a.h>\r
 #include <oar_a.h>\r
index 55da612554d1e3549ba161e93260d4fc76824253..83bfd9b8399af1c941e6b9da305d180c3ccc29ff 100644 (file)
@@ -59,7 +59,9 @@ All rights reserved.
     writeSYSRecreationModeDirect, \
     writeSYSChannelConfigurationRequestSurround4_1, \
     execPAIOutAnalog, \
-    execPAIInHDMI
+    execPAIInHDMI, \
+    writeSRCModeDisable, \
+    writeCARModeDisable
 #else
 //DDP
 #define CUS_ATBOOT_S \
index 783768d0eb925242f4478d85333b706e9312cb8a..f1e6dfd14de5016c4040af4d2663079a30e35d3d 100644 (file)
@@ -46,7 +46,7 @@ All rights reserved.
 #include "aspDecOpCircBuf_master.h"
 
 #define DEF_SOURCE_SEL          ( PAF_SOURCE_PCM ) // default source select
-#define DEF_DEC_OP_FRAME_LEN    ( 256 )     // default decoder output frame length
+#define DEF_DEC_OP_FRAME_LEN    (512 )   // ( 256 )     // default decoder output frame length
 #define DEF_STR_FRAME_LEN       ( 256 )     // default stream frame length
 
 // Generate mute AF on circular buffer read
@@ -639,6 +639,10 @@ Int cbReadAf(
         pAfRd->numPrivateMetadata  = pAfCb->numPrivateMetadata;     /* number of valid private metadata (0 or 1 if metadata filtering enabled) */
         pAfRd->bsMetadata_offset   = pAfCb->bsMetadata_offset;      /* offset into audio frame for change in bsMetadata_type field */
         
+        // update Last Cb info as per actual stream
+        pCb->lastAf.sampleCount = pCb->strFrameLen;
+        pCb->lastAf.sampleRate = pAfCb->sampleRate;
+
         // read PCM samples
         for (i = 0; i < pCb->maxAFChanNum; i++)
         {
index 5a4b569a510af475b49fd1572f5f9223f3adabcc..463993e19f507b4ff6997fb4581e61437c684a25 100644 (file)
@@ -2718,7 +2718,7 @@ PAF_ASIT_decodeInit(
 #else
             if (sourceSelect == PAF_SOURCE_PCM)
             {
-                frameLength = 256;
+               frameLength = 512;
             }
             else if ((sourceSelect == PAF_SOURCE_DDP) || (sourceSelect == PAF_SOURCE_AC3))
             {
@@ -3453,7 +3453,7 @@ PAF_ASIT_decodeDecode(
 #else
             if (sourceSelect == PAF_SOURCE_PCM)
             {
-                frameLength = 256;
+                frameLength = 512;
             }
             else if ((sourceSelect == PAF_SOURCE_DDP) || (sourceSelect == PAF_SOURCE_AC3))
             {
index 43b6ef0004f5e57276506d7ee582053d505773b3..7f524fbd3df296ad043ac170a342eac0e9d00132 100644 (file)
@@ -837,7 +837,7 @@ const PAF_ASIT_Params asip_params_PAi =
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
     PAF_AST_params_numchan,                                 // z_numchan
-    256,                                                    // framelength
+    512, //256,                                                    // framelength
     &PAF_AST_params_audioFrameFunctions,                    // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     &PAF_AST_params_inpBufStatus,                           // pInpBufStatus
@@ -850,7 +850,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
+    1024,// 256,                                                    // maxFramelength
     PAF_AST_streamOrder,                                    // streamOrder
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit
@@ -901,7 +901,7 @@ const PAF_ASOT_Params asop_params_PAi =
     NULL,                                                   // z_rx_bufsiz
     NULL,                                                   // z_tx_bufsiz
     PAF_AST_params_numchan,                                 // z_numchan
-    256,                                                    // framelength
+    512, //256,                                                    // framelength
     &PAF_AST_params_audioFrameFunctions,                    // pAudioFrameFunctions
     &PAF_ASP_chainFxns,                                     // pChainFxns
     &PAF_AST_params_inpBufStatus,                           // pInpBufStatus
@@ -914,7 +914,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
+    1024, //256,                                                    // maxFramelength
     PAF_AST_streamOrder,                                    // streamOrder
     inpLinkInit,                                            // i_inpLinkInit
     outLinkInit,                                            // i_outLinkInit
index eee73358782cd0c6573d24f1be9b1cd001682844..66b8aa00a2a7769f9c8aa51f1c5b2c1ed6107ee8 100644 (file)
@@ -66,7 +66,7 @@ All rights reserved.
 #include <ae_mds.h>
 #endif
 
-//#define _SRC4_
+#define _SRC4_
 #ifdef _SRC4_
 #include <src.h>
 #include <src_tih.h>
@@ -80,7 +80,7 @@ All rights reserved.
 #include <car_tig.h>
 #endif
 
-#define _OAR_
+//#define _OAR_
 #ifdef _OAR_
 #include <oar.h>
 #include <oar_tig.h>
@@ -92,7 +92,7 @@ All rights reserved.
 #include <dap_tig.h>
 #endif
 
-#define _BMDA_
+//#define _BMDA_
 #ifdef _BMDA_
 #include <bmda.h>
 #include <bmda_tig.h>
index 306650ba019aeaf9e72d3cd8033d66f9c95f99ce..b3e13ed50cf6af0431263c24cd2e634193f89878 100644 (file)
@@ -155,7 +155,7 @@ static const unsigned char clkxDivHDMI[PAF_SAMPLERATE_N] =
     0x2,  //PAF_SAMPLERATE_44100HZ
     0x2,  //PAF_SAMPLERATE_48000HZ
     0x4,  //PAF_SAMPLERATE_88200HZ
-    0x4,  //PAF_SAMPLERATE_96000HZ
+    0x1,  //PAF_SAMPLERATE_96000HZ
     0x2,  //PAF_SAMPLERATE_192000HZ
     0x4,  //PAF_SAMPLERATE_64000HZ
     0x2,  //PAF_SAMPLERATE_128000HZ