]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/commitdiff
PASDK69: Created task for idleAudioStream(). Added MAT-THD alpha header file.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 13 Dec 2016 12:10:37 +0000 (17:40 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Tue, 13 Dec 2016 12:10:37 +0000 (17:40 +0530)
build_paf_libs.bat
pasdk/test_dsp/application/app.cfg
pasdk/test_dsp/framework/itopo/system.c
pasdk/test_dsp/framework/systemInit.c
tools/alpha/thd_a.h [new file with mode: 0644]
tools/alpha/thd_a.hdM [new file with mode: 0644]

index 03755a503a69db29594543e034fa309315baabea..3f284e6a112273ff7fb567043b53f5e4180ec852 100644 (file)
@@ -34,6 +34,11 @@ gmake clean
 gmake install
 popd
 
 gmake install
 popd
 
+pushd %PASDK_LROOT%\paf\pa\util\statusop_common
+gmake clean
+gmake install
+popd
+
 if "%1"=="ARM" goto arm_only
 :dsp_only
 rem
 if "%1"=="ARM" goto arm_only
 :dsp_only
 rem
index 4d1d870c0ac7b6d93727a349e12d239b11079784..3e933dd39c24b52dc732d4e1a7720ec7224a9a43 100644 (file)
@@ -353,6 +353,15 @@ Program.sectMap[".far:taskStackSectionSysInit"] = "CORE0_DDR3";
 
 Program.sectMap[".far:taskStackSection"] = "CORE0_DDR3"; // SDRAM in pa.cfg
 
 
 Program.sectMap[".far:taskStackSection"] = "CORE0_DDR3"; // SDRAM in pa.cfg
 
+/* Add task for audio System stream processing; formerly audioStream1Idle() */
+var task5Params = new Task.Params();
+task5Params.instance.name = "TaskSystemStream";
+task5Params.stackSize   = 0x1000;
+task5Params.stackSection = ".far:taskStackSectionAudioStream";
+task5Params.priority = -1;
+Program.global.TaskSystemStream = Task.create("&taskSystemStreamFxn", task5Params);
+Program.sectMap[".far:taskStackSectionAudioStream"] = "CORE0_DDR3";
+
 /* Add idle functions */
 if (acSimBuild == false)
 {
 /* Add idle functions */
 if (acSimBuild == false)
 {
@@ -365,8 +374,10 @@ else
     // 
     Idle.idleFxns[0] = "&idleDapWatchDog";      // Idle function for DSP watchdog; formerly DAP_watchDog()
 }
     // 
     Idle.idleFxns[0] = "&idleDapWatchDog";      // Idle function for DSP watchdog; formerly DAP_watchDog()
 }
-Idle.idleFxns[1] = "&idleAudioStream";      // Idle function for audio stream; formerly audioStream1Idle()
-Idle.idleFxns[2] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
+// Remark: Moved idleAudioStream (idle function) to taskSystemStreamFxn (task)
+//Idle.idleFxns[1] = "&idleAudioStream";      // Idle function for audio stream; formerly audioStream1Idle()
+//Idle.idleFxns[2] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
+Idle.idleFxns[1] = "&idleNotifyInfoChange"; // Idle function for Notify Information Change (NIC); formerly customSystemStreamIdleNIC()
 
 /* Add L2 SRAM heap */ // formerly IRAM
 var heapMem0Params = new HeapMem.Params();
 
 /* Add L2 SRAM heap */ // formerly IRAM
 var heapMem0Params = new HeapMem.Params();
index 4e06db9f9901c71a9fef111655cbdd5410536098..c0214456e9fd8d4300db058cbc6e02755e262578 100644 (file)
@@ -37,12 +37,15 @@ All rights reserved.
 #include <xdc/cfg/global.h>
 #include <xdc/runtime/Log.h>
 #include <xdc/runtime/System.h>
 #include <xdc/cfg/global.h>
 #include <xdc/runtime/Log.h>
 #include <xdc/runtime/System.h>
+#include <ti/sysbios/knl/Clock.h>
 
 #include <paftyp.h>
 #include <pafsys_a.h> 
 #include "noasp.h"
 #include "systemStream.h"
 
 
 #include <paftyp.h>
 #include <pafsys_a.h> 
 #include "noasp.h"
 #include "systemStream.h"
 
+#define SYSTEM_STREAM_PROC_INTERVAL 1000
+
 const struct {
     PAF_SST_FxnsMain *main;
     Int count;
 const struct {
     PAF_SST_FxnsMain *main;
     Int count;
@@ -114,21 +117,45 @@ PAF_SST_Config systemStreamConfig[1] =
 extern Int gSysInit;
 
 /*
 extern Int gSysInit;
 
 /*
- *  ======== idleAudioStream ========
+ *  ======== taskSystemStreamFxn ========
  *  IDLE function for audio stream
  */
  *  IDLE function for audio stream
  */
-Void idleAudioStream()
+Void taskSystemStreamFxn()
 {
     Int32 i;
 {
     Int32 i;
+    Uns time, interval, elapsed, now, then;
 
     //System_printf("Enter idleAudioStream()\n");    
     //Log_info0("Enter idleAudioStream()");
 
 
     //System_printf("Enter idleAudioStream()\n");    
     //Log_info0("Enter idleAudioStream()");
 
-    if (gSysInit == 0)
-        return;
-    
-    for (i=0; i < lengthof(systemStreamConfig); i++)
-        systemStreamParams[i].fxns->main
-            (&systemStreamParams[i], &systemStreamConfig[i]);
+    time = SYSTEM_STREAM_PROC_INTERVAL;
+
+    while (1)
+    {
+        // Compute interval in system clock ticks,
+        // interval time expressed in msec.
+        interval = time * USEC_PER_MSEC / Clock_tickPeriod;
+
+        // Compute elapsed time
+        now = Clock_getTicks();
+        elapsed = now - then;
+        then = now;
+
+        if (interval > elapsed)
+        {
+            Task_sleep(interval - elapsed);
+        }
+
+        //if (gSysInit == 0)
+        //  return;
+
+        for (i=0; i < lengthof(systemStreamConfig); i++)
+            systemStreamParams[i].fxns->main
+                (&systemStreamParams[i], &systemStreamConfig[i]);
+
+        gSysInit = 1;  // Indicate system Init to resume
+
+    }
+
 }
 
 }
 
index 943c306b1e460d1de187a5f3620a3c6ed22fcfc6..b8d82156136c87a972d995d305275fd5adae776f 100644 (file)
@@ -58,7 +58,7 @@ All rights reserved.
 #include "fwkSim.h"
 
 extern Void ACP_main_cus(Void);     // (*** ?) FL: revisit -- check method of patching alpha codes
 #include "fwkSim.h"
 
 extern Void ACP_main_cus(Void);     // (*** ?) FL: revisit -- check method of patching alpha codes
-extern Void idleAudioStream(Void);  // (*** ?) FL: revisit -- shouldn't need to call this from system init
+extern Void taskSystemStreamFxn(Void);  // (*** ?) FL: revisit -- shouldn't need to call this from system init
 
 const PAFHJT_t *pafhjt;
 
 
 const PAFHJT_t *pafhjt;
 
@@ -74,11 +74,14 @@ Int gSysInit=0;
 
 #define TASK_AFP_PRI        ( 3 )//( 1 )  // (***) FL: temporary fix for PASDK-64
 #define TASK_AIP_PRI        ( 1 )//( 2 ) 
 
 #define TASK_AFP_PRI        ( 3 )//( 1 )  // (***) FL: temporary fix for PASDK-64
 #define TASK_AIP_PRI        ( 1 )//( 2 ) 
+#define TASK_SSP_PRI        ( 1 )
 #define TASK_ASIP_PRI       ( 2 )//( 3 ) 
 #define TASK_ASOP_PRI       ( 2 )//( 3 ) 
 
 #define __TASK_NAME__  "TaskSysInit"
 
 #define TASK_ASIP_PRI       ( 2 )//( 3 ) 
 #define TASK_ASOP_PRI       ( 2 )//( 3 ) 
 
 #define __TASK_NAME__  "TaskSysInit"
 
+#define SYS_INIT_SLEEP  100
+
 /*
  *  ======== taskSysInitFxn ========
  *  System Initializations task function
 /*
  *  ======== taskSysInitFxn ========
  *  System Initializations task function
@@ -176,13 +179,19 @@ Void taskSysInitFxn(Void)
     PAF_ASOT_params_fxns.memStatusPrint = PAF_ALG_memStatusPrint;
 #endif
 
     PAF_ASOT_params_fxns.memStatusPrint = PAF_ALG_memStatusPrint;
 #endif
 
-    gSysInit=1;
 
     /* This is required to use SYS alpha codes in atboot? */
 
     /* This is required to use SYS alpha codes in atboot? */
-    Log_info0("taskSysInitFxn:idleAudioStream()");
-    idleAudioStream();
-    
-    // Circumvent MessageQ_open() blocking.
+    Log_info0("taskSysInitFxn:TaskSystemStream resume");
+    gSysInit = 0;
+    Task_setPri(TaskSystemStream, TASK_SSP_PRI);
+    // Wait until Execution of TaskSystemStream is complete
+    // once.
+    while (gSysInit == 0)  // gSysInit is set to 1 in TaskSystemStream
+    {
+       Task_sleep(SYS_INIT_SLEEP);
+    }
+
+
     Task_setPri(TaskAfp, TASK_AFP_PRI);
     Task_setPri(TaskAip, TASK_AIP_PRI);
     Task_setPri(TaskAsip, TASK_ASIP_PRI);
     Task_setPri(TaskAfp, TASK_AFP_PRI);
     Task_setPri(TaskAip, TASK_AIP_PRI);
     Task_setPri(TaskAsip, TASK_ASIP_PRI);
diff --git a/tools/alpha/thd_a.h b/tools/alpha/thd_a.h
new file mode 100644 (file)
index 0000000..31b0c5c
--- /dev/null
@@ -0,0 +1,327 @@
+// 
+//  Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ 
+//  ALL RIGHTS RESERVED 
+//
+
+//
+//  THD PCM Decoder alpha codes
+//  Revision: 1.1
+//
+
+#ifndef _THD_A
+#define _THD_A
+
+#include <acpbeta.h>
+
+// THD interface
+#define  readTHDDecodeMode 0xc200+STD_BETA_THD,0x0400
+#define writeTHDDecode2Channel 0xca00+STD_BETA_THD,0x0401
+#define writeTHDDecode6Channel 0xca00+STD_BETA_THD,0x0402
+#define writeTHDDecode8Channel 0xca00+STD_BETA_THD,0x0404
+#define writeTHDDecode16Channel 0xca00+STD_BETA_THD,0x0408
+#define writeTHDDecodeAuto          0xca00+STD_BETA_THD,0x04ff
+#define writeTHDDecodeAuto162Channel 0xca00+STD_BETA_THD,0x0417
+#define writeTHDDecodeAuto166Channel 0xca00+STD_BETA_THD,0x0418
+
+#define  readTHDDecodeChannelSet 0xc200+STD_BETA_THD,0x0A00
+#define wroteTHDDecodeNoChannelSet 0xca00+STD_BETA_THD,0x0A00
+#define wroteTHDDecode2ChannelSet 0xca00+STD_BETA_THD,0x0A01
+#define wroteTHDDecode6ChannelSet 0xca00+STD_BETA_THD,0x0A02
+#define wroteTHDDecode8ChannelSet 0xca00+STD_BETA_THD,0x0A06
+#define wroteTHDDecode16ChannelSet 0xca00+STD_BETA_THD,0x0A08
+
+#define  readTHDDRCMode 0xc200+STD_BETA_THD,0x0500
+#define writeTHDDRCDisable 0xca00+STD_BETA_THD,0x0500
+#define writeTHDDRCFollow 0xca00+STD_BETA_THD,0x0501
+#define writeTHDDRCNormal 0xca00+STD_BETA_THD,0x0502
+#define writeTHDDRCHeavy 0xca00+STD_BETA_THD,0x0503
+
+#define  readTHDDRCBoost 0xc200+STD_BETA_THD,0x0600
+#define writeTHDDRCBoostN(N) 0xca00+STD_BETA_THD,0x0600+((N)&0xff)
+/* in support of inverse compilation only */
+#define writeTHDDRCBoostN__100__ writeTHDDRCBoostN(100)
+
+#define  readTHDDRCCut 0xc200+STD_BETA_THD,0x0700
+#define writeTHDDRCCutN(N) 0xca00+STD_BETA_THD,0x0700+((N)&0xff)
+/* in support of inverse compilation only */
+#define writeTHDDRCCutN__100__ writeTHDDRCCutN(100)
+
+#define  readTHDPCMWordSize 0xc200+STD_BETA_THD,0x0800
+#define writeTHDPCMWordSize24bitInt 0xca00+STD_BETA_THD,0x0800
+#define writeTHDPCMWordSize32bitFloat 0xca00+STD_BETA_THD,0x0801
+
+#define  readTHDLosslessMode 0xc200+STD_BETA_THD,0x0900
+#define writeTHDPostProcessingEnable 0xca00+STD_BETA_THD,0x0900
+#define writeTHDPostProcessingDisable 0xca00+STD_BETA_THD,0x0910
+#define writeTHDLosslessEnable writeTHDPostProcessingDisable
+#define writeTHDLosslessDisable writeTHDPostProcessingEnable
+
+#define  readTHDCenterMixLevel 0xc300+STD_BETA_THD,0x000C
+#define writeTHDCenterMixLevelN(NN) 0xcb00+STD_BETA_THD,0x000C,(0xFFFF&(NN))
+#define wroteTHDCenterMixLevel 0xcb00+STD_BETA_THD,0x000C
+
+#define  readTHDSurroundMixLevel 0xc300+STD_BETA_THD,0x000E
+#define writeTHDSurroundMixLevelN(NN) 0xcb00+STD_BETA_THD,0x000E,(0xFFFF&(NN))
+#define wroteTHDSurroundMixLevel 0xcb00+STD_BETA_THD,0x000E
+
+#define  readTHDLFEDownmixInclude 0xc200+STD_BETA_THD,0x1000
+#define writeTHDLFEDownmixIncludeNo 0xca00+STD_BETA_THD,0x1000
+#define writeTHDLFEDownmixIncludeYes 0xca00+STD_BETA_THD,0x1001
+
+#define readTHDLfe readTHDLFEDownmixInclude
+#define writeTHDLfeDwnmixInclude writeTHDLFEDownmixIncludeYes
+#define writeTHDLfeOnDefault writeTHDLFEDownmixIncludeNo
+#define writeTHDLfe2 0xca00+STD_BETA_THD,0x1002
+
+#define  readTHDLFEDownmixVolume 0xc200+STD_BETA_THD,0x1100
+#define writeTHDLFEDownmixVolumeN(N) 0xca00+STD_BETA_THD,0x1100+(0xff&(N))
+/* in support of inverse compilation only */
+#define writeTHDLFEDownmixVolumeN__20__ writeTHDLFEDownmixVolumeN(20)
+
+#define  readTHDMinorErrorMute 0xc200+STD_BETA_THD,0x1400
+#define writeTHDMinorErrorMuteEnable 0xca00+STD_BETA_THD,0x1401
+#define writeTHDMinorErrorMuteDisable 0xca00+STD_BETA_THD,0x1400
+#define writeTHDMinorErrorNoMute writeTHDMinorErrorMuteDisable
+
+#define  readTHDGainRequired 0xc200+STD_BETA_THD,0x1500
+
+#define  readTHDSpeakerRemap 0xc200+STD_BETA_THD,0x1600
+#define writeTHDSpeakerRemapEnable 0xca00+STD_BETA_THD,0x1601
+#define writeTHDSpeakerRemapDisable 0xca00+STD_BETA_THD,0x1600
+
+#define  readTHD192kHzDecode 0xc200+STD_BETA_THD,0x1f00
+#define writeTHD192kHzDecodeEnable  0xca00+STD_BETA_THD,0x1f01
+#define writeTHD192kHzDecodeDisable 0xca00+STD_BETA_THD,0x1f00
+
+#define  readTHDSelectMinorError 0xc200+STD_BETA_THD,0x2000
+#define writeTHDSelectMinorErrorN(N)  0xca00+STD_BETA_THD,0x2000+((N)&0xff)
+#define  readTHDOutputMode    0xc200+STD_BETA_THD,0x2200
+#define writeTHDOutputModeRaw 0xca00+STD_BETA_THD,0x22ff // raw
+#define writeTHDOutputMode2      0xca00+STD_BETA_THD,0x2202 // L, R
+#define writeTHDOutputMode3      0xca00+STD_BETA_THD,0x2203 // L, R, C, LFE
+#define writeTHDOutputMode6      0xca00+STD_BETA_THD,0x2206 // L, R, LFE, Ls, Rs
+#define writeTHDOutputMode7      0xca00+STD_BETA_THD,0x2207 // L, R, C, LFE, Ls, Rs
+#define writeTHDOutputMode17  0xca00+STD_BETA_THD,0x2211 // L, R, C, LFE, Ls, Rs, Lc, Rc
+#define writeTHDOutputMode18  0xca00+STD_BETA_THD,0x2212 // L, R, C, LFE, Ls, Rs, Lw, Rw
+#define writeTHDOutputMode19  0xca00+STD_BETA_THD,0x2213 // L, R, C, LFE, Ls, Rs, Lfh, Rfh
+#define writeTHDOutputMode21  0xca00+STD_BETA_THD,0x2215 // L, R, C, LFE, Ls, Rs, Lrs, Rrs
+#define writeTHDOutputMode28  0xca00+STD_BETA_THD,0x221c // L, R, C, LFE, Ls, Rs, Ltm, Rtm
+
+#define  readTHDEvolutionMetadataMode 0xc200+STD_BETA_THD,0x2400
+#define writeTHDEvolutionMetadataModeDisable 0xca00+STD_BETA_THD,0x2400
+#define writeTHDEvolutionMetadataModeEnable  0xca00+STD_BETA_THD,0x2401
+
+#define  readTHDDisable96EvolutionMode    0xc200+STD_BETA_THD,0x2500
+#define writeTHDDisable96EvolutionModeOff 0xca00+STD_BETA_THD,0x2500
+#define writeTHDDisable96EvolutionModeOn  0xca00+STD_BETA_THD,0x2501
+
+#define  readTHDBitStreamInformation 0xc600+STD_BETA_THD2,0x0470
+
+#define  readTHDBitStreamInformation0 0xc300+STD_BETA_THD2,0x0004
+
+#define  readTHDBSIFBBChannelAssignment 0xc300+STD_BETA_THD2,0x0006
+#define  readTHDBitStreamInformation1 readTHDBSIFBBChannelAssignment
+
+#define  readTHDBSIFBBSampleRate 0xc300+STD_BETA_THD2,0x0008
+#define  readTHDBitStreamInformation2 readTHDBSIFBBSampleRate
+
+#define  readTHDBSIFBBMultiChannelType 0xc300+STD_BETA_THD2,0x000a
+#define  readTHDBitStreamInformation3 readTHDBSIFBBMultiChannelType
+
+#define  readTHDBSIFBBQuantWordLength1 0xc300+STD_BETA_THD2,0x000c
+#define  readTHDBitStreamInformation4 readTHDBSIFBBQuantWordLength1
+
+#define  readTHDBSIFBBSummaryInfo 0xc300+STD_BETA_THD2,0x000e
+#define  readTHDBitStreamInformation5 readTHDBSIFBBSummaryInfo
+
+#define  readTHDBSIFBBSourceFormat 0xc300+STD_BETA_THD2,0x0010
+#define  readTHDBitStreamInformation6 readTHDBSIFBBSourceFormat
+
+#define  readTHDBSIFBBVariableRate 0xc300+STD_BETA_THD2,0x0012
+#define  readTHDBitStreamInformation7 readTHDBSIFBBVariableRate
+
+#define  readTHDBSIFBBPeakDataRate 0xc300+STD_BETA_THD2,0x0014
+#define  readTHDBitStreamInformation8 readTHDBSIFBBPeakDataRate
+
+#define  readTHDBSIFBBSubstreams 0xc300+STD_BETA_THD2,0x0016
+#define  readTHDBitStreamInformation9 readTHDBSIFBBSubstreams
+
+#define  readTHDBSIFBBSubstreamInfo 0xc300+STD_BETA_THD2,0x0018
+#define  readTHDBitStreamInformation10 readTHDBSIFBBSubstreamInfo
+
+#define  readTHDBSIFBBLevelControl 0xc300+STD_BETA_THD2,0x001a
+#define  readTHDBitStreamInformation11 readTHDBSIFBBLevelControl
+
+#define  readTHDBSIFBBCopyRightProtection 0xc300+STD_BETA_THD2,0x001c
+#define  readTHDBitStreamInformation12 readTHDBSIFBBCopyRightProtection
+
+#define  readTHDBSIFBBSpeakerLayout 0xc300+STD_BETA_THD2,0x01e
+#define  readTHDBitStreamInformation13 readTHDBSIFBBSpeakerLayout
+
+#define  readTHDBSIFBBMultiChannelOccupancy 0xc300+STD_BETA_THD2,0x0020
+#define  readTHDBitStreamInformation14 readTHDBSIFBBMultiChannelOccupancy
+
+#define  readTHDBSIFBBMultiChannelType2 0xc300+STD_BETA_THD2,0x0022
+#define  readTHDBitStreamInformation15 readTHDBSIFBBMultiChannelType2
+
+#define  readTHDBSIFBBWordWidth 0xc300+STD_BETA_THD2,0x0024
+#define  readTHDBitStreamInformation16 readTHDBSIFBBWordWidth
+
+#define  readTHDBSIFBBFlags 0xc300+STD_BETA_THD2,0x0026
+#define  readTHDBitStreamInformation17 readTHDBSIFBBFlags
+
+#define  readTHDBSIFBBQuantWordLength2 0xc300+STD_BETA_THD2,0x0028
+#define  readTHDBitStreamInformation18 readTHDBSIFBBQuantWordLength2
+
+#define  readTHDBSIFBBSampleRate2 0xc300+STD_BETA_THD2,0x002a
+#define  readTHDBitStreamInformation19 readTHDBSIFBBSampleRate2
+
+#define  readTHDBSIFBBfs 0xc300+STD_BETA_THD2,0x002c
+#define  readTHDBitStreamInformation20 readTHDBSIFBBfs
+
+
+#define  readTHDBSIFBAChannelAssignment8Ch 0xc300+STD_BETA_THD2,0x0034
+#define  readTHDBitStreamInformation21 readTHDBSIFBAChannelAssignment8Ch
+
+#define  readTHDBSIFBAChannelModifier8Ch 0xc300+STD_BETA_THD2,0x0036
+#define  readTHDBitStreamInformation22 readTHDBSIFBAChannelModifier8Ch
+
+#define  readTHDBSIFBAChannelAssignment6Ch 0xc300+STD_BETA_THD2,0x0038
+#define  readTHDBitStreamInformation23 readTHDBSIFBAChannelAssignment6Ch
+
+#define  readTHDBSIFBAChannelModifier6Ch 0xc300+STD_BETA_THD2,0x003a
+#define  readTHDBitStreamInformation24 readTHDBSIFBAChannelModifier6Ch
+
+#define  readTHDBSIFBAChannelModifier2Ch 0xc300+STD_BETA_THD2,0x003c
+#define  readTHDBitStreamInformation25 readTHDBSIFBAChannelModifier2Ch
+
+#define  readTHDBSIFBAMultiChannelType8Ch 0xc300+STD_BETA_THD2,0x003e
+#define  readTHDBitStreamInformation26 readTHDBSIFBAMultiChannelType8Ch
+
+#define  readTHDBSIFBAMultiChannelType6Ch 0xc300+STD_BETA_THD2,0x0040
+#define  readTHDBitStreamInformation27 readTHDBSIFBAMultiChannelType6Ch
+
+#define  readTHDBSIFBASampleRate 0xc300+STD_BETA_THD2,0x0042
+#define  readTHDBitStreamInformation28 readTHDBSIFBASampleRate
+
+#define  readTHDBSIFBAVariableRate 0xc300+STD_BETA_THD2,0x0044
+#define  readTHDBitStreamInformation29 readTHDBSIFBAVariableRate
+
+#define  readTHDBSIFBAPeakDataRate 0xc300+STD_BETA_THD2,0x0046
+#define  readTHDBitStreamInformation30 readTHDBSIFBAPeakDataRate
+
+#define  readTHDBSIFBASubstreams 0xc300+STD_BETA_THD2,0x0048
+#define  readTHDBitStreamInformation31 readTHDBSIFBASubstreams
+
+#define  readTHDBSIFBASubstreamInfo 0xc300+STD_BETA_THD2,0x004a
+#define  readTHDBitStreamInformation32 readTHDBSIFBASubstreamInfo
+
+#define  readTHDBSIFBAControlEnabled2Ch 0xc300+STD_BETA_THD2,0x004c
+#define  readTHDBitStreamInformation33 readTHDBSIFBAControlEnabled2Ch
+
+#define  readTHDBSIFBAControlEnabled6Ch 0xc300+STD_BETA_THD2,0x004e
+#define  readTHDBitStreamInformation34 readTHDBSIFBAControlEnabled6Ch
+
+#define  readTHDBSIFBAControlEnabled8Ch 0xc300+STD_BETA_THD2,0x0050
+#define  readTHDBitStreamInformation35 readTHDBSIFBAControlEnabled8Ch
+
+#define  readTHDBSIFBAStartUpGain 0xc300+STD_BETA_THD2,0x0052
+#define  readTHDBitStreamInformation36 readTHDBSIFBAStartUpGain
+
+#define  readTHDBSIFBADialNorm2Ch 0xc300+STD_BETA_THD2,0x0054
+#define  readTHDBitStreamInformation37 readTHDBSIFBADialNorm2Ch
+
+#define  readTHDBSIFBAMixLevel2Ch 0xc300+STD_BETA_THD2,0x0056
+#define  readTHDBitStreamInformation38 readTHDBSIFBAMixLevel2Ch
+
+#define  readTHDBSIFBADialNorm6Ch 0xc300+STD_BETA_THD2,0x0058
+#define  readTHDBitStreamInformation39 readTHDBSIFBADialNorm6Ch
+
+#define  readTHDBSIFBAMixLevel6Ch 0xc300+STD_BETA_THD2,0x005a
+#define  readTHDBitStreamInformation40 readTHDBSIFBAMixLevel6Ch
+
+#define  readTHDBSIFBASourceFormat6Ch 0xc300+STD_BETA_THD2,0x005c
+#define  readTHDBitStreamInformation41 readTHDBSIFBASourceFormat6Ch
+
+#define  readTHDBSIFBADialNorm8Ch 0xc300+STD_BETA_THD2,0x005e
+#define  readTHDBitStreamInformation42 readTHDBSIFBADialNorm8Ch
+
+#define  readTHDBSIFBAMixLevel8Ch 0xc300+STD_BETA_THD2,0x0060
+#define  readTHDBitStreamInformation43 readTHDBSIFBAMixLevel8Ch
+
+#define  readTHDBSIFBASourceFormat8Ch 0xc300+STD_BETA_THD2,0x0062
+#define  readTHDBitStreamInformation44 readTHDBSIFBASourceFormat8Ch
+
+#define  readTHDBSIFBAExtraChMeaningPresent 0xc300+STD_BETA_THD2,0x0064
+#define  readTHDBitStreamInformation45 readTHDBSIFBAExtraChMeaningPresent
+
+#define  readTHDBSIFBAFlags 0xc300+STD_BETA_THD2,0x0066
+#define  readTHDBitStreamInformation46 readTHDBSIFBAFlags
+
+#define  readTHDBSIFBADialNorm16Ch 0xc300+STD_BETA_THD2,0x0068
+#define  readTHDBitStreamInformation47 readTHDBSIFBADialNorm16Ch
+
+#define  readTHDBSIFBAMixLevel16Ch 0xc300+STD_BETA_THD2,0x006a
+#define  readTHDBitStreamInformation48 readTHDBSIFBAMixLevel16Ch
+
+#define  readTHDBSIFBASourceFormat16Ch 0xc300+STD_BETA_THD2,0x006c
+#define  readTHDBitStreamInformation49 readTHDBSIFBASourceFormat16Ch
+
+/* Returns the THD sync Word; This shows whether the stream format is FBA or FBB.
+   Accordingly corresponding alpha codes for the returned format ca be used */
+
+#define   readTHDBSISyncWord 0xc400+STD_BETA_THD2,0x0070
+
+
+#define   readTHDStatus 0xc508,STD_BETA_THD
+#define   readTHDCommon 0xc508,STD_BETA_THD2
+#define   readTHDControl \
+          readTHDDecodeMode, \
+          readTHDDRCMode, \
+          readTHDDRCBoost, \
+          readTHDDRCCut, \
+          readTHDLosslessMode, \
+          readTHDCenterMixLevel, \
+          readTHDSurroundMixLevel, \
+          readTHDLFEDownmixInclude, \
+          readTHDLFEDownmixVolume, \
+          /* readTHDCRCCheckMode, */ \
+          readTHDMinorErrorMute, \
+          readTHDSpeakerRemap, \
+          /* readTHDSamSizIgnore, */ \
+          /* readTHDDialNormMode, */ \
+          readTHD192kHzDecode, \
+          readTHDSelectMinorError, \
+          /* readTHDStandaloneMode */
+
+// MAT interface
+#define readMATDRCMode           0xc200+STD_BETA_THD,0x2800
+#define writeMATDRCModeDisable      0xca00+STD_BETA_THD,0x2800
+#define writeMATDRCModeNormal    0xca00+STD_BETA_THD,0x2801
+#define writeMATDRCModeHeavy     0xca00+STD_BETA_THD,0x2802
+
+#define readMATDRCBoost          0xc200+STD_BETA_THD,0x2900
+#define writeMATDRCBoostN(N)     0xca00+STD_BETA_THD,0x2900+((N)&0xff)
+
+#define readMATDRCCut            0xc200+STD_BETA_THD,0x2a00
+#define writeMATDRCCutN(N)       0xca00+STD_BETA_THD,0x2a00+((N)&0xff)
+
+#define readMATLoudnessMode            0xc200+STD_BETA_THD,0x2c00
+#define writeMATLoudnessModeDisable    0xca00+STD_BETA_THD,0x2c00
+#define writeMATLoudnessModeEnable     0xca00+STD_BETA_THD,0x2c01
+
+#define readMATBitStreamInformation    0xc600+STD_BETA_THD2,0x7404
+#define readMATBitStreamInformationProfileChannels    0xc300+STD_BETA_THD2,0x0074
+#define readMATBitStreamInformation0   readMATBitStreamInformationProfileChannels
+#define readMATBitStreamInformationBitDepthSampleRate 0xc300+STD_BETA_THD2,0x0076
+#define readMATBitStreamInformation1   readMATBitStreamInformationBitDepthSampleRate
+
+#define   readMATStatus 0xc508,STD_BETA_THD
+#define   readMATControl \
+          /* readMATDRCCtrlMode, */ \
+          readMATDRCBoost, \
+          readMATDRCCut, \
+          /* readMATLfe, */ \
+          readMATLoudnessMode
+
+#endif /* _THD_A */
diff --git a/tools/alpha/thd_a.hdM b/tools/alpha/thd_a.hdM
new file mode 100644 (file)
index 0000000..221705d
--- /dev/null
@@ -0,0 +1,111 @@
+// thd_a.hdM: inverse compilation file [Wed Aug 28 17:27:49 EDT 2013]
+
+#define readTHDDecodeMode 0xc27c,0x0400
+#define writeTHDDecode0Channel 0xca7c,0x0400
+#define writeTHDDecode2Channel 0xca7c,0x0401
+#define writeTHDDecode6Channel 0xca7c,0x0402
+#define writeTHDDecode8Channel 0xca7c,0x0404
+#define writeTHDDecodeAuto6Channel 0xca7c,0x0412
+#define writeTHDDecodeAuto8Channel 0xca7c,0x0414
+#define writeTHDDecodeAuto62Channel 0xca7c,0x0413
+#define writeTHDDecodeAuto82Channel 0xca7c,0x0415
+#define writeTHDDecodeAuto86Channel 0xca7c,0x0416
+#define readTHDDecodeChannelSet 0xc27c,0x0a00
+#define wroteTHDDecodeNoChannelSet 0xca7c,0x0a00
+#define wroteTHDDecode2ChannelSet 0xca7c,0x0a01
+#define wroteTHDDecode6ChannelSet 0xca7c,0x0a02
+#define wroteTHDDecode8ChannelSet 0xca7c,0x0a06
+#define readTHDDRCMode 0xc27c,0x0500
+#define writeTHDDRCDisable 0xca7c,0x0500
+#define writeTHDDRCFollow 0xca7c,0x0501
+#define writeTHDDRCOn 0xca7c,0x0502
+#define readTHDDRCBoost 0xc27c,0x0600
+#define writeTHDDRCBoostN__100__ 0xca7c,0x0664
+#define readTHDDRCCut 0xc27c,0x0700
+#define writeTHDDRCCutN__100__ 0xca7c,0x0764
+#define readTHDLosslessMode 0xc27c,0x0900
+#define writeTHDPostProcessingEnable 0xca7c,0x0900
+#define writeTHDPostProcessingDisable 0xca7c,0x0910
+#define readTHDCenterMixLevel 0xc37c,0x000c
+#define wroteTHDCenterMixLevel 0xcb7c,0x000c
+#define readTHDSurroundMixLevel 0xc37c,0x000e
+#define wroteTHDSurroundMixLevel 0xcb7c,0x000e
+#define readTHDLFEDownmixInclude 0xc27c,0x1000
+#define writeTHDLFEDownmixIncludeNo 0xca7c,0x1000
+#define writeTHDLFEDownmixIncludeYes 0xca7c,0x1001
+#define readTHDLFEDownmixVolume 0xc27c,0x1100
+#define writeTHDLFEDownmixVolumeN__20__ 0xca7c,0x1114
+#define readTHDCRCCheckMode 0xc27c,0x1200
+#define writeTHDCRCCheckEnable 0xca7c,0x1201
+#define writeTHDCRCCheckDisable 0xca7c,0x1200
+#define readTHDMinorErrorMute 0xc27c,0x1400
+#define writeTHDMinorErrorMuteEnable 0xca7c,0x1401
+#define writeTHDMinorErrorMuteDisable 0xca7c,0x1400
+#define readTHDGainRequired 0xc27c,0x1500
+#define readTHDSpeakerRemap 0xc27c,0x1600
+#define writeTHDSpeakerRemapEnable 0xca7c,0x1601
+#define writeTHDSpeakerRemapDisable 0xca7c,0x1600
+#define readTHDSamSizIgnore 0xc27c,0x1700
+#define writeTHDSamSizIgnore 0xca7c,0x1701
+#define writeTHDSamSizNoIgnore 0xca7c,0x1700
+#define readTHDChannelIdentifier 0xc47c,0x0018
+#define readTHDRemappingScalefactor 0xc37c,0x001c
+#define readTHDDialNormMode 0xc27c,0x1e00
+#define writeTHDDialNormModeEnable 0xca7c,0x1e01
+#define writeTHDDialNormModeDisable 0xca7c,0x1e00
+#define readTHD192kHzDecode 0xc27c,0x1f00
+#define writeTHD192kHzDecodeEnable 0xca7c,0x1f01
+#define writeTHD192kHzDecodeDisable 0xca7c,0x1f00
+#define readTHDSelectMinorError 0xc27c,0x2000
+#define readTHDBitStreamInformation 0xc67d,0x0470
+#define readTHDBitStreamInformation0 0xc37d,0x0004
+#define readTHDBSIFBBChannelAssignment 0xc37d,0x0006
+#define readTHDBSIFBBSampleRate 0xc37d,0x0008
+#define readTHDBSIFBBMultiChannelType 0xc37d,0x000a
+#define readTHDBSIFBBQuantWordLength1 0xc37d,0x000c
+#define readTHDBSIFBBSummaryInfo 0xc37d,0x000e
+#define readTHDBSIFBBSourceFormat 0xc37d,0x0010
+#define readTHDBSIFBBVariableRate 0xc37d,0x0012
+#define readTHDBSIFBBPeakDataRate 0xc37d,0x0014
+#define readTHDBSIFBBSubstreams 0xc37d,0x0016
+#define readTHDBSIFBBSubstreamInfo 0xc37d,0x0018
+#define readTHDBSIFBBLevelControl 0xc37d,0x001a
+#define readTHDBSIFBBCopyRightProtection 0xc37d,0x001c
+#define readTHDBSIFBBSpeakerLayout 0xc37d,0x001e
+#define readTHDBSIFBBMultiChannelOccupancy 0xc37d,0x0020
+#define readTHDBSIFBBMultiChannelType2 0xc37d,0x0022
+#define readTHDBSIFBBWordWidth 0xc37d,0x0024
+#define readTHDBSIFBBFlags 0xc37d,0x0026
+#define readTHDBSIFBBQuantWordLength2 0xc37d,0x0028
+#define readTHDBSIFBBSampleRate2 0xc37d,0x002a
+#define readTHDBSIFBBfs 0xc37d,0x002c
+#define readTHDBSIFBAChannelAssignment8Ch 0xc37d,0x0034
+#define readTHDBSIFBAChannelModifier8Ch 0xc37d,0x0036
+#define readTHDBSIFBAChannelAssignment6Ch 0xc37d,0x0038
+#define readTHDBSIFBAChannelModifier6Ch 0xc37d,0x003a
+#define readTHDBSIFBAChannelModifier2Ch 0xc37d,0x003c
+#define readTHDBSIFBAMultiChannelType8Ch 0xc37d,0x003e
+#define readTHDBSIFBAMultiChannelType6Ch 0xc37d,0x0040
+#define readTHDBSIFBASampleRate 0xc37d,0x0042
+#define readTHDBSIFBAVariableRate 0xc37d,0x0044
+#define readTHDBSIFBAPeakDataRate 0xc37d,0x0046
+#define readTHDBSIFBASubstreams 0xc37d,0x0048
+#define readTHDBSIFBASubstreamInfo 0xc37d,0x004a
+#define readTHDBSIFBAControlEnabled2Ch 0xc37d,0x004c
+#define readTHDBSIFBAControlEnabled6Ch 0xc37d,0x004e
+#define readTHDBSIFBAControlEnabled8Ch 0xc37d,0x0050
+#define readTHDBSIFBAStartUpGain 0xc37d,0x0052
+#define readTHDBSIFBADialNorm2Ch 0xc37d,0x0054
+#define readTHDBSIFBAMixLevel2Ch 0xc37d,0x0056
+#define readTHDBSIFBADialNorm6Ch 0xc37d,0x0058
+#define readTHDBSIFBAMixLevel6Ch 0xc37d,0x005a
+#define readTHDBSIFBASourceFormat6Ch 0xc37d,0x005c
+#define readTHDBSIFBADialNorm8Ch 0xc37d,0x005e
+#define readTHDBSIFBAMixLevel8Ch 0xc37d,0x0060
+#define readTHDBSIFBASourceFormat8Ch 0xc37d,0x0062
+#define readTHDBSIFBAExtraChMeaningPresent 0xc37d,0x0064
+#define readTHDBSIFBAFlags 0xc37d,0x0066
+#define readTHDBSISyncWord 0xc47d,0x0070
+#define readTHDStatus 0xc508,0x007c
+#define readTHDCommon 0xc508,0x007d
+#define readTHDControl 0xc27c,0x0400,0xc27c,0x0500,0xc27c,0x0600,0xc27c,0x0700,0xc27c,0x0900,0xc37c,0x000c,0xc37c,0x000e,0xc27c,0x1000,0xc27c,0x1100,0xc27c,0x1200,0xc27c,0x1400,0xc27c,0x1600,0xc27c,0x1700,0xc27c,0x1e00,0xc27c,0x1f00,0xc27c,0x2000