PASDK183: Initial DTS modifications in framework.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Thu, 2 Feb 2017 14:11:03 +0000 (19:41 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Thu, 2 Feb 2017 14:11:03 +0000 (19:41 +0530)
13 files changed:
pasdk/common/aspDecOpCircBuf_common.c
pasdk/common/aspDecOpCircBuf_common.h
pasdk/test_arm/application/app.cfg
pasdk/test_arm/application/app.cmd
pasdk/test_arm/framework/audioStreamDecodeProc.c
pasdk/test_arm/framework/itopo/params.c
pasdk/test_arm/framework/itopo/patchs.c
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/audio_dc_cfg.c

index 5bca2c467081c53a8b2673e1885927c590504857..5eeca5e2ea1769b3f3105b5f5d90e21ee7a712b4 100644 (file)
@@ -87,6 +87,20 @@ Int cbReset(
         pCb->afRdIdx = ASP_DECOP_CB_INIT_RDIDX_THD;
         pCb->pcmRdIdx = 0;
     }
+    else if ((pCb->sourceSel == PAF_SOURCE_DTS)   ||
+             (pCb->sourceSel == PAF_SOURCE_DTSHD) ||
+             (pCb->sourceSel == PAF_SOURCE_DTS12) ||
+             (pCb->sourceSel == PAF_SOURCE_DTS13) ||
+             (pCb->sourceSel == PAF_SOURCE_DTS14) ||
+             (pCb->sourceSel == PAF_SOURCE_DTS16) ||
+             (pCb->sourceSel == PAF_SOURCE_DTSALL)
+            )
+    {
+
+        pCb->afWrtIdx = ASP_DECOP_CB_INIT_WRTIDX_DTS;
+        pCb->afRdIdx = ASP_DECOP_CB_INIT_RDIDX_DTS;
+        pCb->pcmRdIdx = 0;
+    }
 
     // initialize circular buffer current number of frames
     pCb->numAfCb = pCb->afWrtIdx - pCb->afRdIdx;
index 338acfaa9055ed04c50e0cd7d0e6ef38cbe20921..96125b3cc886354f6ef52ceaf090c93587f6c38e 100644 (file)
@@ -54,23 +54,37 @@ All rights reserved.
 #define ASP_DECOP_CB_MAX_NUM_PCM_CH_MAT        ( 32 )     // decoder output circular buffer maximum number audio PCM channels for MAT
 #define ASP_DECOP_CB_MAX_PCM_FRAME_LEN_48kMAT  ( 4*256 )  // decoder output circular buffer maximum PCM frame length at 48kHz sampling rate
 
+// TODO: update for dts
+#define ASP_DECOP_CB_MAX_NUM_PCM_CH_DTS        ( 32 )      // decoder output circular buffer maximum number audio PCM channels for MAT
+#define ASP_DECOP_CB_MAX_PCM_FRAME_LEN_48kDTS  ( 16*256 )  // decoder output circular buffer maximum PCM frame length at 48kHz sampling rate
+
 #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_PCM_BUF_SZ_32CH48kMAT  ( ASP_DECOP_CB_MAX_NUM_PCM_CH_MAT * ASP_DECOP_CB_MAX_NUM_PCM_FRAMES * ASP_DECOP_CB_MAX_PCM_FRAME_LEN_48kMAT )
 
+// PCM
 #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 )
 
+// DDP
 #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 )
 
+// MAT-THD
 #define ASP_DECOP_CB_MAX_NUM_AF_THD         ( 10 )
 #define ASP_DECOP_CB_INIT_LAG_THD           ( 3 )  
 #define ASP_DECOP_CB_INIT_WRTIDX_THD        ( 1 )
 #define ASP_DECOP_CB_INIT_RDIDX_THD         ( 0 )
+
+// DTS - TODO: to update for DTS
+#define ASP_DECOP_CB_MAX_NUM_AF_DTS         ( 10 )
+#define ASP_DECOP_CB_INIT_LAG_DTS           ( 1 )
+#define ASP_DECOP_CB_INIT_WRTIDX_DTS        ( 1 )
+#define ASP_DECOP_CB_INIT_RDIDX_DTS         ( 0 )
+
 #define ASP_DECODE_CB_GATE_NAME             ( "AspDecOpCbGate" )
 #define ASP_DECODE_CB_GATE_REGION_ID        ( 0 )
 
index b3eda96fbc28cef0e7102e3aa7b0aaac7d44fc3c..4b5b176f1e65176929a921d0cfd8805e1396db41 100644 (file)
@@ -307,7 +307,7 @@ Program.sectMap[".msmcSramHeap"] = "HOST_MSMC";
 /* Add DDR3 heap */ // formerly SDRAM
 var heapMem2Params = new HeapMem.Params();
 heapMem2Params.instance.name = "heapMemDdr3";
-heapMem2Params.size = 4350528;
+heapMem2Params.size = 4350528 + (3*1024*1024); // Added 3 MB for DTS decoder
 heapMem2Params.sectionName = ".ddr3Heap";
 Program.global.heapMemDdr3 = HeapMem.create(heapMem2Params);
 Program.sectMap[".ddr3Heap"] = "HOST_DDR3";
index 17311c47413364dbefbfe07e4f4ec1f9bb4d3a7c..c4fb66fdfd2eba24838594b00aaa5b49fe2e09da 100644 (file)
@@ -39,12 +39,22 @@ SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dolby_ip\ddp\Dolby_Digital_Plu
 SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dolby_ip\mat-thd\Dolby_MAT_Decoder_Imp\Source_Code\mat_dec\make\dthd_dec_lib\a15 )
 SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dolby_ip\mat-thd\Dolby_MAT_Decoder_Imp\Source_Code\mat_dec\make\mat_dec_lib\a15 )
 SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dolby_ip\mat-thd\Dolby_MAT_Decoder_Imp\Source_Code\mat_dec\make\thd_alg_lib\a15 )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\dts-3d\misc\build\a15\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\dts-base\misc\build\a15\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\common-flib\misc\build\a15\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\lbr\misc\build\a15\lbr\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\lbr\misc\build\a15\lbrdec\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\parma-dec\misc\build\a15\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\dtshd-c-decoder\misc\build\a15\lib\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\la-strm-reconstruction\misc\build\a15\Release )
+SEARCH_DIR ( C:\ti\processor_audio_sdk_1_00_00_00\dts_ip\Source_Code\sdk-dts-uhd-no-guidedparma-src\alg\misc\build\a15\Release )
 
 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 statusop_common_elf.lib )
 INPUT ( dlb_intrinsics_generic_float32_release.a )
 INPUT ( ddp_dec_lib_generic_wrapper_release.a ddp_dec_lib_generic_float32_release.a )
 INPUT ( mat_dec_lib_generic_float32_release.lib thd_alg_lib_generic_float32_release.lib dthd_dec_lib_generic_float32_release.lib )
+INPUT ( dts-3d.lib dts-base.lib dts-flib.lib dts-lbr.lib dts-lbr-dec.lib dts-parma-dec.lib dtsx-c-decoder.lib la-strm-reconstruction.lib dts-alg.lib )
 
 SECTIONS
 {
index 16ce49cf25446bbc36b9f78d1e308737020bc668..e3f74834a878f71cc6c467e5d012b43ab3841676 100644 (file)
@@ -306,6 +306,7 @@ Void taskAsdpFxn(
     Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
     Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
     Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
+    Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
     Cache_wait();
     
     // (***) FL: revisit
@@ -326,6 +327,9 @@ Void taskAsdpFxn(
     // write back Dec configuration
     Cache_wbInv(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
     Cache_wait();*/
+    size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+    Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
+    Cache_wait();
     
     // Send initialization complete message to master
     queId = MessageQ_getReplyQueue(pAspMsg);
@@ -472,6 +476,9 @@ Void taskAsdpFxn(
                     size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                     Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
                     Cache_wait();*/
+                    size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+                    Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
+                    Cache_wait();
                     
                     argIdx = 0; // get decIdx
                     z = *(Int32 *)&pAspMsg->buf[argIdx];
@@ -541,6 +548,9 @@ Void taskAsdpFxn(
                     size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                     Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
                     Cache_wait();*/
+                    size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+                    Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
+                    Cache_wait();
                     
                     // send dec reset complete message to master
                     queId = MessageQ_getReplyQueue(pAspMsg);
@@ -1482,6 +1492,15 @@ Int resetAf(
         case PAF_SOURCE_THD:
             pAudioFrame->data.nSamples = 5120; //QIN FIX ME
             break;
+        case PAF_SOURCE_DTS:
+        case PAF_SOURCE_DTSHD:
+        case PAF_SOURCE_DTS12:
+        case PAF_SOURCE_DTS13:
+        case PAF_SOURCE_DTS14:
+        case PAF_SOURCE_DTS16:
+        case PAF_SOURCE_DTSALL:
+            pAudioFrame->data.nSamples = 8192; // max Sample output
+            break;
         default:  
             pAudioFrame->data.nSamples = FRAMELENGTH;
             break;
index 89496fea714c2c2f8db217b5f72f6dc3e7ee8d03..fa4d6c304849b1fcbf0a9e5b8b04a92a1294bba5 100644 (file)
@@ -108,26 +108,26 @@ const PAF_ASP_AlgKey PAF_ASP_params_decAlgKey =
     PAF_ASP_ALPHACODE (STD, SNG),                           // PAF_SOURCE_SNG
     0,                                                      // PAF_SOURCE_AUTO
     0,                                                      // PAF_SOURCE_BITSTREAM
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTSALL
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTSALL
     PAF_ASP_ALPHACODE (STD, PCM),                           // PAF_SOURCE_PCMAUTO
     PAF_ASP_ALPHACODE (STD, PCM),                           // PAF_SOURCE_PCM
     PAF_ASP_ALPHACODE (STD, PCN),                           // PAF_SOURCE_PC8 /* unused */
     PAF_ASP_ALPHACODE (STD, DDP),                           // PAF_SOURCE_AC3
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS
     PAF_ASP_ALPHACODE (STD, AAC),                           // PAF_SOURCE_AAC
     PAF_ASP_ALPHACODE (STD, MPG),                           // PAF_SOURCE_MPEG /* unused */
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS12
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS13
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS14
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS16
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS12
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS13
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS14
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS16
     0,                                                      // PAF_SOURCE_WMA9PRO
     0,                                                      // PAF_SOURCE_MP3
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD1
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD2
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD3
     PAF_ASP_ALPHACODE (STD, DDP),                           // PAF_SOURCE_DDP
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTSHD
     PAF_ASP_ALPHACODE (STD, THD),                           // PAF_SOURCE_THD
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                       // PAF_SOURCE_DTSHD
     PAF_ASP_ALPHACODE (STD, DXP),                           // PAF_SOURCE_DXP
 };
 #else
index 9a18688e098ab51cef2595bbfcbf052c54fef664..1c6d608e8c9acb3779acf14d2388a8aa2c202850 100644 (file)
@@ -53,17 +53,24 @@ All rights reserved.
 #include <pcm.h>
 #include <pcm_mds.h>
 
-#define _DDPAT_
+//#define _DDPAT_
 #ifdef _DDPAT_
 #include <ddpat.h>
 #include <ddpat_tid.h>
 #endif
 
-#define _THD_
+//#define _THD_
 #ifdef _THD_
 #include <thd.h>
 #include <thd_tid.h>
 #endif
+
+#define _DTS_
+#ifdef _DTS_
+#include <dtsuhda.h>
+#include <dtsuhda_tid.h>
+#endif
+
 //#define _SRC4_
 #ifdef _SRC4_
 #include <src.h>
@@ -84,6 +91,10 @@ const PAF_ASP_LinkInit decLinkInitI13[] =
     PAF_ASP_LINKINIT(STD, THD, TID),
 #endif
     
+#ifdef _DTS_
+    PAF_ASP_LINKINIT(STD, DTSUHDA, TID),
+#endif
+
     PAF_ASP_LINKNONE,
 };
 
index bcbee45d96ad73da3176368d7f56089e2c79f047..6b755a3d766655d2599f3d80ad68c9fc3d7f908a 100644 (file)
@@ -47,30 +47,45 @@ All rights reserved.
 #include <pa_i13_evmk2g_io_a.h> //<pa_i13_evmda830_io_a.h>
 
 #ifndef SIMULATE_SIO
+#define DTS
 //#define DDP
 #ifdef TEST_MULTICHANNEL
-#ifndef DDP
-//THD
-#define CUS_ATBOOT_S \
-    writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
-    writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
-    writeVOLControlMasterN(0), \
-    writeVOLOffsetMasterN(0x7fff), \
-    writeSYSRecreationModeDirect, \
-    writeSYSChannelConfigurationRequestSurround4_1, \
-    execPAIOutAnalog, \
-    execPAIInHDMI
+
+#ifdef DTS
+    //DTS
+    #define CUS_ATBOOT_S \
+        writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeVOLControlMasterN(0), \
+        writeVOLOffsetMasterN(0x7fff), \
+        writeSYSRecreationModeDirect, \
+        writeSYSChannelConfigurationRequestSurround4_1, \
+        execPAIOutAnalog, \
+        execPAIInHDMI
 #else
-//DDP
-#define CUS_ATBOOT_S \
-    writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
-    writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \
-    writeVOLControlMasterN(0), \
-    writeVOLOffsetMasterN(0x7fff), \
-    writeSYSRecreationModeDirect, \
-    writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \
-    execPAIOutAnalog, \
-    execPAIInHDMIStereo
+    #ifndef DDP
+    //THD
+    #define CUS_ATBOOT_S \
+        writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeVOLControlMasterN(0), \
+        writeVOLOffsetMasterN(0x7fff), \
+        writeSYSRecreationModeDirect, \
+        writeSYSChannelConfigurationRequestSurround4_1, \
+        execPAIOutAnalog, \
+        execPAIInHDMI
+    #else
+    //DDP
+    #define CUS_ATBOOT_S \
+        writeDECChannelMapTo16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,6,7,-3,-3,-3,-3,-3,-3,-3,-3), \
+        writeVOLControlMasterN(0), \
+        writeVOLOffsetMasterN(0x7fff), \
+        writeSYSRecreationModeDirect, \
+        writeSYSChannelConfigurationRequestSurround2ATMOS_1(4), \
+        execPAIOutAnalog, \
+        execPAIInHDMIStereo
+    #endif
 #endif
     //
     //writeENCChannelMapFrom16(PAF_LEFT,PAF_RGHT,8,9,2,12,10,11,-3,-3,-3,-3,-3,-3,-3,-3), \     // Lrs/Rrs
index 783768d0eb925242f4478d85333b706e9312cb8a..fa06b6b1d524fa6c44beb0dabb4608edfb6ce313 100644 (file)
@@ -354,6 +354,45 @@ Int cbInitSourceSel(
             pAfCb->bsMetadata_offset   = 0;                             /* offset into audio frame for change in bsMetadata_type field */
         }
     }
+    else if ((sourceSelect == PAF_SOURCE_DTS)   ||
+             (sourceSelect == PAF_SOURCE_DTSHD) ||
+             (sourceSelect == PAF_SOURCE_DTS12) ||
+             (sourceSelect == PAF_SOURCE_DTS13) ||
+             (sourceSelect == PAF_SOURCE_DTS14) ||
+             (sourceSelect == PAF_SOURCE_DTS16) ||
+             (sourceSelect == PAF_SOURCE_DTSALL)
+            )
+    {
+        pCb->maxNumAfCb = ASP_DECOP_CB_MAX_NUM_AF_DTS;
+                // 0 in behind
+        pCb->afWrtIdx = ASP_DECOP_CB_INIT_WRTIDX_DTS;
+        pCb->afRdIdx = ASP_DECOP_CB_INIT_RDIDX_DTS;
+        pCb->pcmRdIdx = 0;
+        pCb->maxAFChanNum = ASP_DECOP_CB_MAX_NUM_PCM_CH;
+        pCb->maxAFSampCount = ASP_DECOP_CB_MAX_PCM_FRAME_LEN_48kDTS;
+
+        // initialize audio frames
+        for (n=0; n<pCb->maxNumAfCb; n++)
+        {
+            pAfCb = &pCb->afCb[n];
+            pAfCb->sampleDecode = sourceSelect;
+            PAF_PROCESS_ZERO(pAfCb->sampleProcess);
+            pAfCb->sampleRate = PAF_SAMPLERATE_48000HZ;
+            pAfCb->sampleCount = decOpFrameLen;
+            pAfCb->channelConfigurationRequest.full = 0;
+            pAfCb->channelConfigurationRequest.part.sat = PAF_CC_SAT_SURROUND4;
+            pAfCb->channelConfigurationRequest.part.sub = PAF_CC_SUB_ONE;
+            pAfCb->channelConfigurationStream.full = 0;
+            pAfCb->channelConfigurationStream.part.sat = PAF_CC_SAT_SURROUND4;
+            pAfCb->channelConfigurationStream.part.sub = PAF_CC_SUB_ONE;
+
+            // write metadata information updated by decoder
+            pAfCb->bsMetadata_type     = PAF_bsMetadata_channelData;    /* non zero if metadata is attached. */
+            pAfCb->pafBsMetadataUpdate = 0;                             /* indicates whether bit-stream metadata update */
+            pAfCb->numPrivateMetadata  = 0;                             /* number of valid private metadata (0 or 1 if metadata filtering enabled) */
+            pAfCb->bsMetadata_offset   = 0;                             /* offset into audio frame for change in bsMetadata_type field */
+        }
+    }
     else
     {
         SW_BREAKPOINT;
index a5fcd45ea6f99612fe18b537b6f7256fd43a4123..860134145e29cf466a2877549cc038cbaff010bc 100644 (file)
@@ -533,6 +533,8 @@ Void taskAsipFxn(
     Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), sizeof(Int), Cache_Type_ALLD, 0);
     size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]->size;
     Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), size, Cache_Type_ALLD, 0);
+    size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+    Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
     Cache_wait();
     
 #ifdef NON_CACHE_STATUS
@@ -2011,7 +2013,7 @@ PAF_ASIT_decodeProcessing(
     Int frame; // decoder input frame count
     Int block; // (***) FL: formerly  -- decoder output block count / input frame
 #ifdef NON_CACHE_STATUS
-    Int8 tempVar8;
+    Int8 tempVar8, tempVar8_2;
 #endif
     
     pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
@@ -2097,6 +2099,9 @@ PAF_ASIT_decodeProcessing(
                 size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                 Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
                 Cache_wait();*/
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+                Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
+                Cache_wait();
 #endif
 #if 0
                 ////size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
@@ -2124,6 +2129,9 @@ PAF_ASIT_decodeProcessing(
                 size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
                 Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
                 Cache_wait();*/
+                size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]->size;
+                Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DTSUHDA]), size, Cache_Type_ALLD, 0);
+                Cache_wait();
 #endif
                 
                 frame = 0;
@@ -2170,11 +2178,19 @@ PAF_ASIT_decodeProcessing(
                               &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
                               sizeof(tempVar8),
                               GATEMP_INDEX_DEC);
+
+                statusOp_read(&tempVar8_2,
+                              &(pAstCfg->xDec[zMD].decodeStatus.sampleRate),
+                              sizeof(tempVar8),
+                              GATEMP_INDEX_DEC);
                 // Don't start decode until major access unit is found.
                 if (((tempVar8 == PAF_SOURCE_THD)    ||
                      (tempVar8 == PAF_SOURCE_DXP)    ||
-                     (tempVar8 == PAF_SOURCE_DTSHD)) &&
-                     (pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN)) 
+                     (tempVar8 == PAF_SOURCE_DTSHD))
+                        &&
+                     //(pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN)
+                     (tempVar8_2 == PAF_SAMPLERATE_UNKNOWN)  // debug chitresh as per govind
+                        )
 #else
                 // Don't start decode until major access unit is found.
                 if (((pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_THD)    ||
@@ -2700,6 +2716,17 @@ PAF_ASIT_decodeInit(
             {
                 frameLength = 1536; //QIN FIX ME
             }
+            else if ((sourceSelect == PAF_SOURCE_DTS)   ||
+                     (sourceSelect == PAF_SOURCE_DTSHD) ||
+                     (sourceSelect == PAF_SOURCE_DTS12) ||
+                     (sourceSelect == PAF_SOURCE_DTS13) ||
+                     (sourceSelect == PAF_SOURCE_DTS14) ||
+                     (sourceSelect == PAF_SOURCE_DTS16) ||
+                     (sourceSelect == PAF_SOURCE_DTSALL)
+                    )
+            {
+                frameLength = 1536; // TODO: Chitresh FIX ME
+            }
             else
             {
                 frameLength = 256;
@@ -3434,6 +3461,17 @@ PAF_ASIT_decodeDecode(
             {
                 frameLength = 1536; //QIN FIX ME
             }
+            else if ((sourceSelect == PAF_SOURCE_DTS)   ||
+                     (sourceSelect == PAF_SOURCE_DTSHD) ||
+                     (sourceSelect == PAF_SOURCE_DTS12) ||
+                     (sourceSelect == PAF_SOURCE_DTS13) ||
+                     (sourceSelect == PAF_SOURCE_DTS14) ||
+                     (sourceSelect == PAF_SOURCE_DTS16) ||
+                     (sourceSelect == PAF_SOURCE_DTSALL)
+                    )
+            {
+                frameLength = 1536; // TODO: Chitresh FIX ME
+            }
             else
             {
                 frameLength = 256;
index 0173dfb7d72d6b478367b4a3eeed632e26128fe7..73268bea36a38109de5d56473cce724e6c57eaaf 100644 (file)
@@ -103,26 +103,26 @@ const PAF_ASP_AlgKey PAF_ASP_params_decAlgKey =
     PAF_ASP_ALPHACODE (STD, SNG),                           // PAF_SOURCE_SNG
     0,                                                      // PAF_SOURCE_AUTO
     0,                                                      // PAF_SOURCE_BITSTREAM
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTSALL
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTSALL
     PAF_ASP_ALPHACODE (STD, PCM),                           // PAF_SOURCE_PCMAUTO
     PAF_ASP_ALPHACODE (STD, PCM),                           // PAF_SOURCE_PCM
     PAF_ASP_ALPHACODE (STD, PCN),                           // PAF_SOURCE_PC8 /* unused */
     PAF_ASP_ALPHACODE (STD, DDP),                           // PAF_SOURCE_AC3
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS
     PAF_ASP_ALPHACODE (STD, AAC),                           // PAF_SOURCE_AAC
     PAF_ASP_ALPHACODE (STD, MPG),                           // PAF_SOURCE_MPEG /* unused */
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS12
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS13
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS14
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTS16
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS12
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS13
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS14
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                         // PAF_SOURCE_DTS16
     0,                                                      // PAF_SOURCE_WMA9PRO
     0,                                                      // PAF_SOURCE_MP3
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD1
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD2
     PAF_ASP_ALPHACODE (STD, DSD),                           // PAF_SOURCE_DSD3
     PAF_ASP_ALPHACODE (STD, DDP),                           // PAF_SOURCE_DDP
-    PAF_ASP_ALPHACODE (STD, DTSHD),                         // PAF_SOURCE_DTSHD
     PAF_ASP_ALPHACODE (STD, THD),                           // PAF_SOURCE_THD
+    PAF_ASP_ALPHACODE (STD, DTSUHDA),                       // PAF_SOURCE_DTSHD
     PAF_ASP_ALPHACODE (STD, DXP),                           // PAF_SOURCE_DXP
 };
 
index 1a85fdc5560fe7652a73c29e25e2c7e3019e3cd7..6821bc5d574d1460bbc4993c8290b5bf2ec2af73 100644 (file)
@@ -74,13 +74,13 @@ All rights reserved.
 #define SUC_TIH_ISUC SRC_TIH_ISRC
 #endif
 
-#define _CAR_
+//#define _CAR_
 #ifdef _CAR_
 #include <car.h>
 #include <car_tig.h>
 #endif
 
-#define _OAR_
+//#define _OAR_
 #ifdef _OAR_
 #include <oar.h>
 #include <oar_tig.h>
index 52369f4141dff1071ce821c2fe72d7b373d652b2..fe6cb457f3db694aa1536183a4e4731263ef046a 100644 (file)
@@ -412,18 +412,22 @@ void hrptredid()
        platform_delay(1000);
        do{ret_val=alpha_i2c_write(HSDIO_EDID_SPEAKER_ALLOCATION_BLOCK_2(0x7));}while (ret_val !=I2C_RET_OK);
 
-       set_audio_desc(0,1,2,0x7f,7);   // Stero PCM
-       set_audio_desc(1,1,8,0x7f,7);   // Multi Ch PCM
-       set_audio_desc(2,2,6,0x7,80);   //AC3
-       //set_audio_desc(2,0,0,0,0);        //AC3; (GJ) currently not supported
-       set_audio_desc(3,10,8,0x07,0);  // EAC3 //DTS (3,7,6,0x1e,192)
-       set_audio_desc(4,12,8,0x7F,0);  // MLP (THD) //DTS (4,7,8,0x6,192)
-       //set_audio_desc(4,0,0,0,0);    // MLP (THD) //DTS (4,7,8,0x6,192) ; (GJ) currently not supported
-       // Empty descriptors to be programmed to 0s
-       set_audio_desc(5,0,0,0,0);      //AAC LC (5,6,6,0x1f,192);
-       set_audio_desc(6,0,0,0,0);
-       set_audio_desc(7,0,0,0,0);
-       set_audio_desc(8,0,0,0,0);      // DTS-HD (8,11,8,0x7F,1)
+       set_audio_desc(0,1,2,0x7f,7);   // PCM 2 channel, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4 KHz, 192 KHz, 16bit, 20bit, 24bit
+       set_audio_desc(1,1,8,0x7f,7);   // PCM 8 channel, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4 KHz, 192 KHz, 16bit, 20bit, 24bit
+       set_audio_desc(2,2,6,0x7,80);   // AC3 6 channel, 32kHz, 44.1kHz, 48kHz, 640kHz max bit rate
+       set_audio_desc(3,10,8,0x07,1);  // Dolby Digital Plus, 8 channel, 32kHz, 44.1kHz, 48kHz, codec specific:1
+       set_audio_desc(4,12,8,0x7F,1);  // MAT(MPL)(Dolby TrueHD), 8 channel, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz,
+                                                                       // 176.4kHz, 192kHz,  codec specific:1
+       set_audio_desc(5,7,6,0x1E,192); // DTS 6 channel, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 1,536kHz max bit rate
+       set_audio_desc(6,7,8,0x6,192);  // DTS 8 channel, 44.1kHz, 48kHz, 1,536kHz max bit rate
+       set_audio_desc(7,11,8,0x7F,3);  // DTS-HD, 8 channel, 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4kHz, 192kHz,
+                                                                       // last byte is 3 for DTS:X, 1 otherwise.
+       set_audio_desc(8,11,8,0x7F,1);  // DTS-HD, 8 channel - same as above, but last byte = 1
+
+//     set_audio_desc(5,0,0,0,0);      //AAC LC (5,6,6,0x1f,192);
+//     set_audio_desc(6,0,0,0,0);
+//     set_audio_desc(7,0,0,0,0);
+//     set_audio_desc(8,0,0,0,0);      // DTS-HD (8,11,8,0x7F,1)
        set_audio_desc(9,0,0,0,0);
        set_audio_desc(10,0,0,0,0);
        set_audio_desc(11,0,0,0,0);