changeset 5:420ac6391166

L1/audio_include: replacing with the version from tcs211-l1-reconst
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 01:15:50 +0000
parents 1a22dd26c8a4
children ada79372df56
files L1/audio_include/l1audio_abb.h L1/audio_include/l1audio_btapi.h L1/audio_include/l1audio_const.h L1/audio_include/l1audio_defty.h L1/audio_include/l1audio_msgty.h L1/audio_include/l1audio_proto.h L1/audio_include/l1audio_signa.h L1/audio_include/l1audio_stereo.h
diffstat 8 files changed, 148 insertions(+), 2197 deletions(-) [+]
line wrap: on
line diff
--- a/L1/audio_include/l1audio_abb.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_abb.h	Thu Jun 09 01:15:50 2016 +0000
@@ -1,43 +1,24 @@
 /*
  *        Filename l1audio_abb.h
- *  Copyright 2003 (C) Texas Instruments
+ *  Copyright 2003 (C) Texas Instruments  
  *
  *
  */
 
-#if (ANALOG != 11)
+#define ABB_L1_WRITE(addr,data) (((data) << 6) | (addr) | 0x01)
 
-   #define ABB_L1_WRITE(addr,data)  (((data) << 6) | (addr) | 0x01)
-   
-   void    ABB_CAL_UlVolume     (UWORD8 pga_index);
-   void    ABB_CAL_DlVolume     (UWORD8 volume_index, UWORD8 pga_index);
-   void    ABB_UlVolume         (UWORD8 volume_index);
-   void    ABB_DlVolume         (UWORD8 volume_index);
-   void    ABB_DlMute           (BOOL mute);
-   void    ABB_SideTone         (UWORD8 volume_index);
-   void    ABB_Audio_Config     (UWORD16 data);
-   void    ABB_Audio_Config_2   (UWORD16 data);
-   void    ABB_UlMute           (BOOL mute);
-   void    ABB_Audio_Control    (UWORD16 data);
-   void    ABB_Audio_On_Off     (UWORD16 data);
-   void    ABB_Audio_Volume     (UWORD16 data);
-   void    ABB_Audio_PLL        (UWORD16 data);
-   void    ABB_Audio_VBPop      (UWORD16 data);
-   void    ABB_Audio_Delay_Init (UWORD8 delay);
-   UWORD16 ABB_Read_DLGain      (void);
-#endif
-#if (ANALOG == 11)
-  UWORD16 l1_audio_abb_Read_DLGain  (void);
-#endif
-
-// Triton Audio ON/OFF Changes
-#if (L1_AUDIO_MCU_ONOFF == 1)
-void l1_audio_abb_ul_on_req         ( void(*callback_fn)(void) );
-void l1_audio_abb_dl_on_req         ( void(*callback_fn)(void) );
-void l1_audio_abb_ul_off_req        ( void(*callback_fn)(void) );
-void l1_audio_abb_dl_off_req        ( void(*callback_fn)(void) );
-void l1_audio_abb_ul_off_dl_off_req ( void(*callback_fn)(void) );
-void l1_audio_abb_ul_off_dl_on_req  ( void(*callback_fn)(void) );
-void l1_audio_abb_ul_on_dl_off_req  ( void(*callback_fn)(void) );
-void l1_audio_abb_ul_on_dl_on_req   ( void(*callback_fn)(void) );
-#endif
+void ABB_CAL_UlVolume     (UWORD8 pga_index);
+void ABB_CAL_DlVolume     (UWORD8 volume_index, UWORD8 pga_index);
+void ABB_UlVolume         (UWORD8 volume_index);
+void ABB_DlVolume         (UWORD8 volume_index);
+void ABB_DlMute           (BOOL mute);
+void ABB_SideTone         (UWORD8 volume_index);
+void ABB_Audio_Config     (UWORD16 data);
+void ABB_Audio_Config_2   (UWORD16 data); 
+void ABB_UlMute           (BOOL mute);
+void ABB_Audio_Control    (UWORD16 data);
+void ABB_Audio_On_Off     (UWORD16 data);
+void ABB_Audio_Volume     (UWORD16 data);
+void ABB_Audio_PLL        (UWORD16 data);
+void ABB_Audio_VBPop      (UWORD16 data);
+void ABB_Audio_Delay_Init (UWORD8 delay);
--- a/L1/audio_include/l1audio_btapi.h	Thu Jun 09 00:53:13 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/****************************************************
-/  FILE NAME:- BT_L1_API.h file.
-/ ****************************************************/
-#include "../../include/config.h"
-#include "../include/l1_confg.h"
-#include "../include/l1_types.h"
-#if(L1_BT_AUDIO==1)
-
-/****************************************************
-/ Data structure defination
-/ ****************************************************/
-#define BT_STATUS_ERROR    1
-#define BT_STATUS_OK          0
-
-/*-------------------------------------------------------------------------------
- * L1AudioPcmStatus type
- *
- *     Defines status of current PCM buffer
- *
- */
-typedef unsigned char L1AudioPcmStatus;
-
-#define L1_PCM_READY		(0x01)	/* the next PCM block is ready */
-#define L1_PCM_PENDING		(0x02)	/* the next PCM block is not ready yet.
-                                       a callback will be made when it will be ready */
-#define L1_PCM_MEDIA_ENDED	(0x03)	/* no PCM blocks are available anymore.
-                                       (e.g. current track ended) */
-#define L1_PCM_FAILED		(0x04)	/* no PCM blocks are ready. general failure */
-
-typedef struct _L1AudioPcmBlock
-{
-	UWORD8 *pcmBuffer; /* a pointer to the buffer holding the PCM data */
-	int lengthInBytes;        /* how many bytes are currently in the PCM buffer */
-} L1AudioPcmBlock;
-
-/****************************************************/
-typedef struct _L1AudioPcmConfig
-{
-	int sampleRate;		/* PCM sample rate in Hz (e.g. 44100, 48000, 32000, 16000) */
-	short numChannels;		/* number of audio channels (1 or 2, for mono or stereo) */
-	short bitsPerSample;	/* number of bits per PCM sample. must always be 16. */
-} L1AudioPcmConfig;
-/****************************************************/
-
-/****************************************************/
-typedef void (*L1AudioPcmCallback)(L1AudioPcmBlock *pcmBlock);
-/*Description:- A callback function, implemented at BTHAL_MM, which will be called by L1-MCU to send a ready PCM block.
-The callback will be called by L1-MCU only after a previous call from BTHAL_MM to request a PCM block returned Pending.
-NOTE: Since the callback is called from L1 context, the BTHAL_MM code should not spend considerable time in this function.
-It must not block the L1-MCU task.
-
-Parameters:
-pcmBlock     [in] - a pointer to a PCM block structure
-Returns: void
-*/
-
-/****************************************************/
-typedef void (*L1AudioConfigureCallback) (L1AudioPcmConfig *pcmConfig);
-
-/*Description:- A callback function, implemented at BTHAL_MM, that will be called by MCU-L1 to specify the next PCM configuration.
-L1-MCU will call this function before a new audio track is going to start playing. BT side will use this info to reconfigure the current
-A2DP stream, and after the configuration is completed, it will start pulling PCM blocks from the L1-MCU stack.
-Parameters: pcmConfig    [in] - pointer to struct with the PCM config info
-*/
-
-/****************************************************/
-
-
-BOOL L1Audio_InformBtAudioPathState (BOOL connected);
-/*Description: - This function is implemented in L1-MCU and called by BTHAL_MM to inform L1,
-whether the audio path to BT is up or down. The use of this function is optional. It should be used by BTHAL_MM,
-to find out that L1-MCU is not being told byBMI/MMI, whether to use the BT audio or not.
-
-Parameters:- connected  [in] -
-TRUE - path is valid, MM should send the PCM to BT
-FALSE - path is not valid, MM should send the PCM to handset default audio device
-Returns: void
-*/
-
-/****************************************************/
-void L1Audio_RegisterBthal (L1AudioPcmCallback pcmCallback, L1AudioConfigureCallback configCallback);
-/*Description: - This function is implemented in L1-MCU and called by BTHAL_MM to init the L1-MCU for BT audio
-and to register callback functions that the L1-MCU will need to call into BTHAL.
-
-Parameters:
-pcmCallback    [in] - pointer of the PCM callback function.
-configCallback [in] - pointer of the config callback function.
-Returns: void
-*/
-
-
-/****************************************************/
-L1AudioPcmStatus L1Audio_PullPcmBlock (L1AudioPcmBlock *pcmBlock);
-/*Description: - This function is implemented in L1-MCU and called by BTHAL_MM to pull the next PCM block.
-If L1 already has a ready PCM block it should fill he pcmBlock parameter and return L1_PCM_READY.
-If a block is not ready yet, it should return with proper return type as defined below.
-
-Parameters:
-pcmBlock    [out] - a pointer to PCM block struct. if the function returns MM_PCM_READY, MM should fill this struct with the info of the current ready PCM block .
-Returns:
-L1_PCM_READY:	  The next PCM block is ready now
-L1_PCM_PENDING: The next PCM block is not ready yet, a callback will be made by MM when it is ready
-L1_PCM_MEDIA_ENDED: no more PCM blocks will be available anymore for the current track
-L1_PCM_FAILED:	  other failures
-*/
-
-/****************************************************/
-
-#endif
--- a/L1/audio_include/l1audio_const.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_const.h	Thu Jun 09 01:15:50 2016 +0000
@@ -3,20 +3,17 @@
  * L1AUDIO_CONST.H
  *
  *        Filename l1audio_const.h
- *  Copyright 2003 (C) Texas Instruments
+ *  Copyright 2003 (C) Texas Instruments  
  *
  ************* Revision Controle System Header *************/
 
 #if (AUDIO_TASK == 1)
 
-// DRC API base address
-#define C_DRC_API_BASE_ADDRESS 0x161E
-
   //----------------------------------------
   // LAYER 1 Synchronous audio process name.
   //----------------------------------------
 
-  #define NBR_AUDIO_MANAGER        37  // Number of L1S audio managers
+  #define NBR_AUDIO_MANAGER        19   // Number of L1S audio managers
 
   #define L1S_KEYBEEP_STATE         0   // l1s_keybeep_manager()
   #define L1S_TONE_STATE            1   // l1s_tone_manager()
@@ -37,31 +34,6 @@
   #define L1S_VM_AMR_PLAY_STATE    16   // l1s_vm_amr_play_manager()
   #define L1S_VM_AMR_RECORD_STATE  17   // l1s_vm_amr_record_manager()
   #define L1S_CPORT_STATE          18   // l1s_cport_manager()
-  #define L1S_AUDIO_ONOFF_STATE    19   // l1s_audio_onoff_manager()
-  #define L1S_STEREOPATH_DRV_STATE 20   // l1s_stereopath_drv_manager()
-  #define L1S_MP3_STATE            21   // l1s_mp3_manager()
-  #define L1S_ANR_STATE            22   // l1s_anr_manager()
-  #define L1S_IIR_STATE            23   // l1s_iir_manager()
-  #define L1S_LIMITER_STATE        24   // l1s_limiter_manager()
-  #define L1S_ES_STATE             25   // l1s_es_manager()
-  #define L1S_MIDI_STATE           26   // l1s_midi_manager()
-  #define L1S_AGC_UL_STATE         27   // l1s_agc_ul_manager()
-  #define L1S_AGC_DL_STATE         28   // l1s_agc_dl_manager()
-  #define L1S_WCM_STATE            29   // l1s_wcm_manager()
-  #define L1S_DRC_STATE            30   // l1s_drc_manager()
-#if (L1_AAC == 1)
-
-//added from e-sample for AAC
-  #define L1S_AAC_STATE            31   // l1s_aac_manager()
-#endif
-#if (L1_AUDIO_MCU_ONOFF == 1)
-  #define L1S_AUDIO_UL_ONOFF_STATE 32  // l1s_audio_ul_onoff_manager()
-  #define L1S_AUDIO_DL_ONOFF_STATE 33   // l1s_audio_dl_onoff_manager()
-#endif
-  #define L1S_PCM_DOWNLOAD_STATE   34   // l1s_pcm_download_manager()
-  #define L1S_PCM_UPLOAD_STATE     35   // l1s_pcm_upload_manager()
-  #define L1S_FIR_STATE            36   // l1s_fir_manager()
-
 
   //----------------------------------------
   // MCU<->DSP communication bit field.
@@ -69,7 +41,7 @@
 
   // bit in d_tch_mode for audio features
   #define B_VOICE_MEMO_DTX      (TRUE_L << 5)
-#if (DSP >= 34)
+#if (DSP == 34) || (DSP == 35) || (DSP == 36)
   #define B_VM_VOCODER_SELECT   (TRUE_L << 6)
 #endif
 
@@ -86,12 +58,6 @@
   #define B_SR_PROCESSING_TASK  (TRUE_L <<  7) // Indicate if the DSP processing task is running
   #define B_SR_ALIGNMENT_TASK   (TRUE_L <<  8) // Indicate if the DSP alignment task is running
   #define B_IT_COM_REQ          (TRUE_L <<  9) // Indicate that the DSP requests an IT com for the next TDMA
-  #define B_AUDIO_ON_STATUS     (TRUE_L <<  14) // Set to 1 if DSP doesn'tpower OFF audio ABB if no DSP audio activity
-
-  #if(L1_PCM_EXTRACTION)
-    #define B_PCM_UPLOAD_ON_GOING    (TRUE_L << 4)
-    #define B_PCM_DOWNLOAD_ON_GOING  (TRUE_L << 5)
-  #endif
 
   // bits in d_toneskb_init
   #define B_VM_RECORD_START  (TRUE_L <<  2)   // Start the DSP voice memo recording task
@@ -110,17 +76,6 @@
   #define B_SR_STOP          (TRUE_L << 11)   // Stop the current DSP speech reco task
 
   #define B_MELO             (TRUE_L << 13)   // Start the DSP melody module if it's not started
-  #define B_AUDIO_ON_START   (TRUE_L << 14)   // Use to start ABB audio and to not stop it when 
-                                              // no audio activity on DSP side
-  #define B_AUDIO_OFF_STOP   (TRUE_L << 15)   // Use to stop ABB audio when no audio activity
-
-  #if(L1_PCM_EXTRACTION)
-    #define B_PCM_UPLOAD_START     (TRUE_L << 7)
-    #define B_PCM_UPLOAD_STOP      (TRUE_L << 8)
-    #define B_PCM_DOWNLOAD_START   (TRUE_L << 9)
-    #define B_PCM_DOWNLOAD_STOP    (TRUE_L << 10)
-  #endif
-
   #if (L1_CPORT == 1)
     //----------------------------------------
     // C_PORT constant.
@@ -214,15 +169,6 @@
     #define SC_VM_SPEECH_SAMPLE   20
   #endif // VOICE_MEMO || SPEECH_RECO
 
-  #if (L1_PCM_EXTRACTION)
-    #define B_PCM_DOWNLOAD_READY    (TRUE_L << 0)
-    #define B_PCM_UPLOAD_READY      (TRUE_L << 0)
-    #define SC_PCM_DOWNLOAD_SAMPLE  160
-    #define SC_PCM_UPLOAD_SAMPLE    160
-    #define B_PCM_UPLOAD_ERROR      (TRUE_L << 0)
-    #define B_PCM_DOWNLOAD_ERROR    (TRUE_L << 1)
-  #endif /* L1_PCM_EXTRACTION */
-
   #if (L1_VOICE_MEMO_AMR)
     //----------------------------------------
     // Voice memo amr constant.
@@ -311,9 +257,14 @@
 
   #endif // SPEECH_RECO
 
-  #if (L1_AEC == 1)
+  #if (AEC)
     #define B_AEC_ACK        (TRUE_L <<  0)  // Bit set by the MCU to indicate a new AEC settings and
                                              // clear by the DSP to confirm the new settings.
+    
+    #define B_AEC_EN         (TRUE_L <<  1)   // enables AEC module
+    #define B_SPENH_EN       (TRUE_L <<  2)   // enables SPENH module
+
+
     #if (L1_NEW_AEC)
       #define B_AEC_VISIBILITY (TRUE_L <<  9)  // Bit set by the MCU to have internal output values of AEC copied in API
       #define SC_AEC_VISIBILITY_SHIFT (9)
@@ -389,76 +340,6 @@
   #define MELODY_E1_SELECTED    (2)
   #define MELODY_E2_SELECTED    (3)
 
-  #if (L1_STEREOPATH == 1)
-    // configuration
-    #define AUDIO_SP_SELF_CONF      0
-    #define AUDIO_SP_MIDI_CONF      1
-    #define AUDIO_SP_MP3_CONF       2
-    #define AUDIO_SP_EXTAUDIO_CONF  3
-
-#if (ANALOG == 3)
-    // sampling frequency 
-    #define AUDIO_SP_FREQ_8         7
-    #define AUDIO_SP_FREQ_11        6
-    #define AUDIO_SP_FREQ_16        5
-    #define AUDIO_SP_FREQ_22        4
-    #define AUDIO_SP_FREQ_32        3
-    #define AUDIO_SP_FREQ_44        2
-    #define AUDIO_SP_FREQ_48        0
-#endif
-
-#if (ANALOG == 11 || CODE_VERSION == SIMULATION)
- // sampling frequency index for Triton. This would be set in the 
- //SRW[0:3] bits of the CTRL5 register.
-    #define AUDIO_SP_FREQ_8           0
-    #define AUDIO_SP_FREQ_11         1
-    #define AUDIO_SP_FREQ_12         2
-    #define AUDIO_SP_FREQ_16         3
-    #define AUDIO_SP_FREQ_22         4
-    #define AUDIO_SP_FREQ_24         5
-    #define AUDIO_SP_FREQ_32         6
-    #define AUDIO_SP_FREQ_44         7
-    #define AUDIO_SP_FREQ_48         8
-#endif
-
-    // DMA allocation
-    #define AUDIO_SP_DMA_ALLOC_MCU  0
-    #define AUDIO_SP_DMA_ALLOC_DSP  1
-
-    // Data type
-    #define AUDIO_SP_DATA_S8        0
-    #define AUDIO_SP_DATA_S16       1
-    #define AUDIO_SP_DATA_S32       2
-
-    // Source port
-    #define AUDIO_SP_SOURCE_IMIF    0
-    #define AUDIO_SP_SOURCE_API     2
-#if (CHIPSET == 15)
-    //In Locosto, EMIF is also a source port for the audio
-    #define AUDIO_SP_SOURCE_EMIF   4
-#endif
-
-    // output type
-    #define AUDIO_SP_MONO_OUTPUT    0
-    #define AUDIO_SP_STEREO_OUTPUT  1
-
-    // feature identifier
-    #define AUDIO_SP_MIDI_ID        0
-    #define AUDIO_SP_EXT_AUDIO_ID   1
-    #define AUDIO_SP_MP3_ID         2
-    #define AUDIO_SP_TESTS_ID       3
-#if (L1_AAC == 1)
-    #define AUDIO_SP_AAC_ID         4   //added for AAC
-#endif
-
-    // Pattern
-    #define AUDIO_SP_SILENCE_PATTERN 0
-    #define AUDIO_SP_SINUS1_PATTERN  1
-    #define AUDIO_SP_SINUS2_PATTERN  2
-    #define AUDIO_SP_SINUS3_PATTERN  3
-
-  #endif
-
 #endif // AUDIO_TASK
 
 #if (DSP == 17) || (DSP == 32)
@@ -467,171 +348,3 @@
 
 #define B_FIR_LOOP  (TRUE_L <<  1)  // Bit set by the MCU to close the loop between the audio UL and DL path.
                                     // This features is used to find the FIR coefficient.
-
-/*************************************/
-/* ACOUSTIC interface                */
-/*************************************/
-
-/* Control values */
-/*----------------*/
-
-#define B_ANR_ENABLE      (TRUE_L << 0)
-#define B_ANR_DISABLE     (TRUE_L << 1)
-#define B_ANR_FULL_UPDATE (TRUE_L << 2)
-
-#define B_IIR_ENABLE      (TRUE_L << 0)
-#define B_IIR_DISABLE     (TRUE_L << 1)
-#define B_IIR_FULL_UPDATE (TRUE_L << 2)
-
-#define B_AGC_ENABLE      (TRUE_L << 0)
-#define B_AGC_DISABLE     (TRUE_L << 1)
-#define B_AGC_FULL_UPDATE (TRUE_L << 2)
-
-#define B_WCM_ENABLE      (TRUE_L << 0)
-#define B_WCM_DISABLE     (TRUE_L << 1)
-#define B_WCM_FULL_UPDATE (TRUE_L << 2)
-
-#if (L1_DRC == 1)
-#define DRC_LPF_LENGTH  17
-#define DRC_BPF_LENGTH  17 
-#endif
-
-#define B_DRC_ENABLE      (TRUE_L << 0)
-#define B_DRC_DISABLE     (TRUE_L << 1)
-#define B_DRC_FULL_UPDATE (TRUE_L << 2)
-
-#define B_LIM_ENABLE      (TRUE_L << 0)
-#define B_LIM_DISABLE     (TRUE_L << 1)
-#define B_LIM_FULL_UPDATE (TRUE_L << 2)
-#define B_LIM_UPDATE      (TRUE_L << 3)
-
-#define B_ES_ENABLE       (TRUE_L << 0)
-#define B_ES_DISABLE      (TRUE_L << 1)
-#define B_ES_FULL_UPDATE  (TRUE_L << 2)
-
-#if (L1_IIR == 2)
-#define IIR_4X_ORDER_OF_SECTION      2
-#define IIR_4X_FIR_MAX_LENGTH       40
-#endif
-
-#if (L1_WCM == 1)
-#define  WCM_1X_GAIN_TABLE_LENGTH  16
-#endif
-
-/* d_aqi_status bits */
-/*-------------------*/
-#if (DSP == 38) || (DSP == 39)
-#define B_DRC_DL_STATE    (TRUE_L <<  3)
-#define B_IIR_DL_STATE    (TRUE_L <<  4)
-#define B_LIM_STATE       (TRUE_L <<  5)
-#define B_AGC_DL_STATE    (TRUE_L <<  6)
-#define B_AEC_STATE       (TRUE_L <<  11)
-#define B_ANR_UL_STATE    (TRUE_L <<  12)
-#define B_ES_STATE        (TRUE_L <<  13)
-#define B_AGC_UL_STATE    (TRUE_L <<  14)
-#else
-#define B_IIR_STATE       (TRUE_L <<  4)
-#define B_LIM_STATE       (TRUE_L <<  5)
-#define B_ANR_STATE       (TRUE_L << 12)
-#define B_ES_STATE        (TRUE_L << 13)
-#endif
-
-/* d_audio_apps_status bits */
-/*-------------------*/
-#if (DSP == 38) || (DSP == 39)
-#define B_WCM_STATE    (TRUE_L <<  0)
-#endif
-
-/*****************/
-/* ANR constants */
-/*****************/
-#if (L1_ANR == 1)
-#define C_ANR_VAD_THR            0x1333
-#define C_ANR_GAMMA_SLOW         0x7F1B
-#define C_ANR_GAMMA_FAST         0x75C3
-#define C_ANR_GAMMA_GAIN_SLOW    28836
-#define C_ANR_GAMMA_GAIN_FAST    32113
-#define C_ANR_THR2               0x01E0
-#define C_ANR_THR4               0x03DE
-#define C_ANR_THR5               0x012C
-#define C_ANR_MEAN_RATIO_THR1    10000
-#define C_ANR_MEAN_RATIO_THR2    6000
-#define C_ANR_MEAN_RATIO_THR3    5000
-#define C_ANR_MEAN_RATIO_THR4    4000
-#endif
-
-
-#if (L1_ES == 1)
-
-/*******************/
-/* ES constants    */
-/*******************/
-
-// ES custom mode
-#define ES_CUSTOM_PARAM 0xFF
-
-// ES mode definition
-#define B_ES_UL             (0x1 << 0)   // ES UL enable
-#define B_ES_DL             (0x1 << 1)   // ES DL enable
-#define B_ES_CNG            (0x1 << 2)   // CNG enable
-#define B_ES_NSF            (0x1 << 3)   // NSF enable
-#define B_ES_ALS_UL         (0x1 << 4)   // ALS UL enable
-#define B_ES_ALS_DL         (0x1 << 5)   // ALS DL enable
-
-// ES parameter values
-#define C_ES_GAIN_DL_OFF    0x0
-#define C_ES_GAIN_UL_1_OFF  0x0
-#define C_ES_GAIN_UL_2_OFF  0x0
-
-#define C_ES_TCL_M23DB      0x005E    // ref. -23dB
-#define C_ES_TCL_M6DB       0x0176    // ref. -6dB
-#define C_ES_TCL_M3DB       0x02EA    // ref. -6dB
-#define C_ES_TCL_0DB        0x05D1    // ref. 0dB
-#define C_ES_TCL_4DB        0x0E9D    // ref. 4dB
-#define C_ES_TCL_6DB        0x1729    // ref. 6dB
-#define C_ES_TCL_10DB       0x3A2F    // ref. 10dB
-#define C_ES_TCL_12DB       0x5C36    // ref. 12dB
-#define C_ES_TCL_B3_FE_LS   0x0004    // ref. -10dB
-#define C_ES_TCL_B3_DT_LS   0x0001    // ref. -16dB
-#define C_ES_TCL_B3_FE_NS   0x000F    // ref. -10dB
-#define C_ES_TCL_B3_DT_NS   0x0004    // ref. -16dB
-#define C_ES_TCL_B3_NE      0x000F    // ref. 0dB
-
-#define C_ES_TCL_FE_0       0x05D1    // ref. 0dB
-#define C_ES_TCL_DT_0       0x05D1    // ref. 0dB
-#define C_ES_TCL_NE_0       0x05D1    // ref. 0dB
-
-#define C_ES_TCL_LOUD       0x00BF    // ref. 70dB
-
-#define C_ES_SW_CNT         5         // ref. switching time 100ms
-#define C_ES_DT_CNT         5         // ref. double-talk time 100ms
-
-#define C_ES_HG_CNT_1       8         // ref. hangover time 150ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_1A      8         // ref. hangover time 150ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_2A      10        // ref. hangover time 200ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_2B      13        // ref. hangover time 250ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_2C      13        // ref. hangover time 250ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_2C_IDLE 13        // ref. hangover time 250ms, A_S(IDLE) = -3dB
-#define C_ES_HG_CNT_3       20        // ref. hangover time 400ms
-
-#define C_ES_ATT_LIN_0DB    0x7fff    // ref.  0dB
-#define C_ES_ATT_LIN_3DB    0x5A9D    // ref. -3dB
-#define C_ES_ATT_LIN_5DB    0x47FA    // ref. -5dB
-#define C_ES_ATT_LIN_6DB    0x4026    // ref. -6dB
-#define C_ES_ATT_LIN_8DB    0x32F4    // ref. -8dB
-#define C_ES_ATT_LIN_9DB    0x2D6A    // ref. -9dB
-#define C_ES_ATT_LIN_10DB   0x2879    // ref. -10dB
-#define C_ES_ATT_LIN_12DB   0x2026    // ref. -12dB
-#define C_ES_ATT_LIN_15DB   0x16C2    // ref. -15dB
-#define C_ES_ATT_LIN_16DB   0x1449    // ref. -16dB
-#define C_ES_ATT_LIN_19DB   0x0E5D    // ref. -19dB
-#define C_ES_ATT_LIN_21DB   0x0B68    // ref. -21dB
-#define C_ES_ATT_LIN_24DB   0x0813    // ref. -24dB
-#define C_ES_ATT_LIN_36DB   0x0207    // ref. -36dB
-#define C_ES_ATT_LIN_48DB   0x0082    // ref. -48dB
-#define C_ES_ATT_LIN_66DB   0x0010    // ref. -56dB
-
-#endif    // L1_ES
-#if(L1_EXT_AUDIO_MGT == 1)
-#define AUDIO_EXT_MIDI_BUFFER_SIZE 2640
-#endif
--- a/L1/audio_include/l1audio_defty.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_defty.h	Thu Jun 09 01:15:50 2016 +0000
@@ -3,22 +3,16 @@
  * L1AUDIO_DEFTY.H
  *
  *        Filename l1audio_defty.h
- *  Copyright 2003 (C) Texas Instruments
+ *  Copyright 2003 (C) Texas Instruments  
  *
  ************* Revision Controle System Header *************/
 
-#include "../../include/config.h"
-#include "../include/l1_confg.h"
-#include "l1audio_msgty.h"
-#include "../audio_cust0/l1audio_cust.h"
-#include "l1audio_const.h"
-#include "l1audio_btapi.h"
 #if (AUDIO_TASK == 1)
 
   #if (KEYBEEP)
-    /**************************************************************************/
-    /* Keybeep l1a_l1s_com structure...                                       */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Keybeep l1a_l1s_com structure...                                                    */
+    /***************************************************************************************/
     typedef struct
     {
       BOOL  start;
@@ -34,9 +28,9 @@
   #endif
 
   #if (TONE)
-    /**************************************************************************/
-    /* Tone l1a_l1s_com structure...                                          */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Tone l1a_l1s_com structure...                                                    */
+    /***************************************************************************************/
     typedef struct
     {
       BOOL  start;
@@ -52,9 +46,9 @@
   #endif
 
   #if (MELODY_E1)
-    /**************************************************************************/
-    /* Melody l1a_l1s_com structure...                                        */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Melody l1a_l1s_com structure...                                                    */
+    /***************************************************************************************/
     typedef struct
     {
       BOOL  start;
@@ -82,9 +76,9 @@
     }
     T_MELODY_TASK;
 
-    /**************************************************************************/
-    /* Melody l1s structure...                                                */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Melody l1s structure...                                                             */
+    /***************************************************************************************/
 
     typedef struct
     {
@@ -101,9 +95,9 @@
   #endif
 
   #if (VOICE_MEMO)
-    /**************************************************************************/
-    /* Voice memo l1a_l1s_com structure...                                    */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Voice memo l1a_l1s_com structure...                                                 */
+    /***************************************************************************************/
 
     typedef struct
     {
@@ -161,9 +155,9 @@
     }
     T_VM_TASK;
 
-    /**************************************************************************/
-    /* Voice memo l1s structure...                                            */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Voice memo l1s structure...                                                         */
+    /***************************************************************************************/
 
     typedef struct
     {
@@ -192,104 +186,16 @@
     T_L1S_VM_TASK;
 
   #endif
-
-  #if (L1_PCM_EXTRACTION)
-  /**************************************************************************/
-  /* PCM extraction l1a_l1s_com structure...                                */
-  /**************************************************************************/
-
-    typedef struct
-    {
-      BOOL  start;
-      BOOL  stop;
-    }
-    T_PCM_DOWNLOAD_COMMAND;
-
-    typedef struct
-    {
-      UWORD8 session_id;
-      UWORD32   maximum_size;
-    }
-    T_PCM_DOWNLOAD_PARAM;
-
-    typedef struct
-    {
-      T_PCM_DOWNLOAD_COMMAND   command;
-      T_PCM_DOWNLOAD_PARAM     parameters;
-    }
-    T_PCM_DOWNLOAD_TASK;
+  #if (L1_VOICE_MEMO_AMR)
+    /***************************************************************************************/
+    /* Voice memo amr l1a_l1s_com structure...                                                 */
+    /***************************************************************************************/
 
     typedef struct
     {
       BOOL  start;
       BOOL  stop;
     }
-    T_PCM_UPLOAD_COMMAND;
-
-    typedef struct
-    {
-      UWORD8    session_id;
-      UWORD32   maximum_size;
-    }
-    T_PCM_UPLOAD_PARAM;
-
-    typedef struct
-    {
-        T_PCM_UPLOAD_COMMAND   command;
-        T_PCM_UPLOAD_PARAM     parameters;
-    }
-    T_PCM_UPLOAD_TASK;
-
-    typedef struct
-    {
-      T_PCM_DOWNLOAD_TASK download;
-      T_PCM_UPLOAD_TASK   upload;
-    }
-    T_PCM_TASK;
-
-    /**************************************************************************/
-    /* PCM l1s structure...                                                   */
-    /**************************************************************************/
-
-    typedef struct
-    {
-      UWORD8  error_id;
-      UWORD16 buffer_size;
-      UWORD16 *ptr_buf;
-      UWORD32 uploaded_size;
-    }
-    T_L1S_PCM_UPLOAD_TASK;
-
-    typedef struct
-    {
-      UWORD8  error_id;
-      UWORD16 buffer_size;
-      UWORD16 *ptr_buf;
-      UWORD32 downloaded_size;
-    }
-    T_L1S_PCM_DOWNLOAD_TASK;
-
-    typedef struct
-    {
-      T_L1S_PCM_DOWNLOAD_TASK download;
-      T_L1S_PCM_UPLOAD_TASK   upload;
-    }
-    T_L1S_PCM_TASK;
-
-  #endif   /* L1_PCM_EXTRACTION */
-
-  #if (L1_VOICE_MEMO_AMR)
-    /**************************************************************************/
-    /* Voice memo amr l1a_l1s_com structure...                                */
-    /**************************************************************************/
-
-    typedef struct
-    {
-      BOOL  start;
-      BOOL pause;
-      BOOL resume;
-      BOOL  stop;
-    }
     T_VM_AMR_PLAY_COMMAND;
 
     typedef struct
@@ -323,8 +229,8 @@
 
     typedef struct
     {
-      T_VM_AMR_RECORD_COMMAND command;
-      T_VM_AMR_RECORD_PARAM   parameters;
+        T_VM_AMR_RECORD_COMMAND   command;
+        T_VM_AMR_RECORD_PARAM     parameters;
     }
     T_VM_AMR_RECORD_TASK;
 
@@ -335,9 +241,9 @@
     }
     T_VM_AMR_TASK;
 
-    /**************************************************************************/
-    /* Voice memo l1s structure...                                            */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Voice memo l1s structure...                                                         */
+    /***************************************************************************************/
 
     typedef struct
     {
@@ -369,9 +275,9 @@
 
   #endif // L1_VOICE_MEMO_AMR
   #if (SPEECH_RECO)
-    /**************************************************************************/
-    /* Speech recogniton l1a_l1s_com structure...                             */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Speech recogniton l1a_l1s_com structure...                                          */
+    /***************************************************************************************/
 
     typedef struct
     {
@@ -443,7 +349,7 @@
 
   #endif
 
-  #if (L1_AEC == 1)
+  #if (AEC)
     typedef struct
     {
       UWORD16 aec_control;
@@ -491,50 +397,6 @@
     } T_L1S_AEC_TASK;
   #endif
 
-#if(L1_AEC == 2)
-
-    typedef struct
-     {
-       BOOL start;
-     }
-     T_AEC_COMMAND;
-
-
-	typedef struct
-	{
-	  WORD16 aec_mode;
-	  WORD16 mu;
-	  UWORD16 cont_filter;
-	  WORD16 scale_input_ul;
-	  WORD16 scale_input_dl;
-	  WORD16 div_dmax;
-	  UWORD16 div_swap_good;
-	  UWORD16 div_swap_bad;
-	  WORD16 block_init;
-	  UWORD16 fact_vad;
-	  UWORD16 fact_asd_fil;
-	  UWORD16 fact_asd_mut;
-	  UWORD16 thrs_abs;
-	  UWORD16 es_level_max;
-	  UWORD16 granularity_att;
-	  UWORD16 coef_smooth;
-//	  UWORD16 block_size;
-	}
-	T_AEC_PARAMS;
-
-
-   typedef struct
-   {
-     T_AEC_COMMAND  command;
-     T_AEC_CONTROL aec_control;
-     T_AEC_PARAMS parameters;
-   }
-   T_AEC_TASK;
-
-
-#endif
-
-
   #if (FIR)
     typedef struct
     {
@@ -580,9 +442,9 @@
     T_AUDIO_MODE_TASK;
   #endif
   #if (MELODY_E2)
-    /**************************************************************************/
-    /* Melody format E2 l1a_l1s_com structure...                              */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Melody format E2 l1a_l1s_com structure...                                           */
+    /***************************************************************************************/
     typedef struct
     {
       BOOL  start;
@@ -611,9 +473,9 @@
     }
     T_MELODY_E2_TASK;
 
-    /**************************************************************************/
-    /* Melody format E2 l1s structure...                                      */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Melody format E2 l1s structure...                                                   */
+    /***************************************************************************************/
     typedef struct
     {
       UWORD8      error_id;
@@ -639,9 +501,9 @@
     }
     T_L1S_MELODY_E2_COMMON_VAR;
 
-    /**************************************************************************/
-    /* Melody format E2 audio background structure...                         */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Melody format E2 audio background structure...                                      */
+    /***************************************************************************************/
     typedef struct
     {
       API     *API_address;
@@ -652,9 +514,9 @@
     } T_AUDIO_BACK_MELODY_E2;
   #endif // MELODY_E2
   #if (L1_CPORT == 1)
-    /**************************************************************************/
-    /* Cport l1a_l1s_com structure...                                         */
-    /**************************************************************************/
+    /***************************************************************************************/
+    /* Cport l1a_l1s_com structure...                                                      */
+    /***************************************************************************************/
     typedef struct
     {
       BOOL  start;
@@ -683,519 +545,4 @@
     }
     T_CPORT_TASK;
   #endif
-
-  #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1 || L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-    typedef struct
-    {
-      BOOL      start;
-    }
-    T_AUDIO_ONOFF_COMMAND;
-
-    typedef struct 
-    {
-  #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1)
-      UWORD8  onoff_value;   /* This value is used to indicate the required state from the MMI interface */
-  #endif
-  #if (L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-      UWORD8  vul_onoff_value;/* This value is used to indicate the required state from the MMI interface */
-      UWORD8  vdl_onoff_value;/* This value is used to indicate the required state from the MMI interface */
-
-  #endif
-    }
-    T_AUDIO_ONOFF_PARAM;
-
-    typedef struct
-    {
-      T_AUDIO_ONOFF_COMMAND  command;
-      T_AUDIO_ONOFF_PARAM    parameters;
-    }
-    T_AUDIO_ONOFF_TASK;
-  #endif
-
-  #if (L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-    #define L1_AUDIO_VOICE_UL_OFF 	0
-    #define L1_AUDIO_VOICE_UL_ON 	1
-    #define L1_AUDIO_VOICE_UL_NO_ACTION	2 
-
-    #define L1_AUDIO_VOICE_DL_OFF 	0
-    #define L1_AUDIO_VOICE_DL_ON 	1
-    #define L1_AUDIO_VOICE_DL_NO_ACTION	2 
-  #endif
-
-  #if (L1_STEREOPATH == 1)
-    /**************************************************************************/
-    /* Stereopath l1a_l1s_com structure...                                    */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  start;
-      BOOL  stop;
-    }
-    T_STEREOPATH_DRV_COMMAND;
-
-    typedef struct
-    {
-#if (CODE_VERSION == NOT_SIMULATION)
-      UWORD8  sampling_frequency;
-      UWORD8  DMA_allocation;
-      void    (*DMA_int_callback_fct) (UWORD16);
-      UWORD8  DMA_channel_number;
-      UWORD8  data_type;
-      UWORD8  source_port;
-      WORD8   *source_buffer_address;
-      UWORD16 element_number;
-      UWORD16 frame_number;
-      UWORD8  mono_stereo;
-      UWORD8  feature_identifier;
-#else
-      UWORD8  dummy;
-#endif
-    }
-    T_STEREOPATH_DRV_PARAM;
-
-    typedef struct
-    {
-      T_STEREOPATH_DRV_COMMAND   command;
-      T_STEREOPATH_DRV_PARAM     parameters;
-    }
-    T_STEREOPATH_DRV_TASK;
-
-  #endif
-
-  #if (L1_EXT_AUDIO_MGT == 1)
-    typedef struct
-    {
-      UWORD8 session_id;
-    }
-    T_L1S_EXT_AUDIO_MGT_VAR;
-  #endif
-
-  #if (L1_ANR == 1)
-    /**************************************************************************/
-    /* ANR l1a_l1s_com structure...                                           */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_ANR_COMMAND;
-
-    typedef struct 
-    {
-      BOOL      anr_enable;
-      WORD16    min_gain;
-      WORD8     div_factor_shift;
-      UWORD8    ns_level;
-    }
-    T_ANR_PARAM;
-
-    typedef struct
-    {
-      T_ANR_COMMAND   command;
-      T_ANR_PARAM     parameters;
-    }
-    T_ANR_TASK;
-  #endif
-
-  #if (L1_ANR == 2)
-    /**************************************************************************/
-    /* ANR 2.13 l1a_l1s_com structure...                                      */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_AQI_ANR_COMMAND;
-
-    typedef struct
-    {
-      T_ANR_CONTROL     anr_ul_control;
-      WORD16            control;
-      WORD16            ns_level;
-      WORD16            tone_ene_th;
-      WORD16            tone_cnt_th;
-    }
-    T_AQI_ANR_PARAM;
-
-    typedef struct
-    {
-      T_AQI_ANR_COMMAND   command;
-      T_AQI_ANR_PARAM     parameters;
-    }
-    T_AQI_ANR_TASK;
-  #endif
-
-  #if (L1_IIR == 1)
-    /**************************************************************************/
-    /* IIR l1a_l1s_com structure...                                           */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_IIR_COMMAND;
-
-    typedef struct 
-    {
-      BOOL      iir_enable;
-      UWORD8    nb_iir_blocks;
-      WORD16   *iir_coefs;
-      UWORD8    nb_fir_coefs;
-      WORD16   *fir_coefs;
-      WORD8     input_scaling;  
-      WORD8     fir_scaling;  
-      WORD8     input_gain_scaling;
-      WORD8     output_gain_scaling;
-      UWORD16   output_gain;
-      WORD16    feedback;
-    }
-    T_IIR_PARAM;
-
-    typedef struct
-    {
-      T_IIR_COMMAND   command;
-      T_IIR_PARAM     parameters;
-    }
-    T_IIR_TASK;
-  #endif
-
-  #if (L1_WCM == 1)
-    /**************************************************************************/
-    /* WCM 1.x l1a_l1s_com structure...                                       */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_AQI_WCM_COMMAND;
-
-    typedef struct
-    {
-      T_AQI_WCM_COMMAND   command;
-      T_AQI_WCM_PARAM     *parameters;
-    }
-    T_AQI_WCM_TASK;
-  #endif
-
-  #if (L1_IIR == 2)
-    /**************************************************************************/
-    /* IIR 4.x l1a_l1s_com structure...                                       */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_AQI_IIR_COMMAND;
-
-    typedef struct
-    {
-      T_AQI_IIR_COMMAND   command;
-      T_AQI_IIR_PARAM     *parameters;
-    }
-    T_AQI_IIR_TASK;
-  #endif
-
-  
-  #if (L1_AGC_UL == 1 || L1_AGC_DL == 1)
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_AQI_AGC_COMMAND;
-  #endif
-
-  #if (L1_AGC_UL == 1)
-    /**************************************************************************/
-    /* AGC UL l1a_l1s_com structure...                                        */
-    /**************************************************************************/
-
-    typedef struct
-    {
-      T_AGC_CONTROL agc_ul_control;
-      UWORD16       control;
-      UWORD16       frame_size;
-      WORD16        targeted_level;
-      WORD16        signal_up;
-      WORD16        signal_down;
-      WORD16        max_scale;
-      WORD16        gain_smooth_alpha;
-      WORD16        gain_smooth_alpha_fast;
-      WORD16        gain_smooth_beta;
-      WORD16        gain_smooth_beta_fast;
-      WORD16        gain_intp_flag;
-    }
-    T_AQI_AGC_UL_PARAM;
-
-    typedef struct
-    {
-      T_AQI_AGC_COMMAND   command;
-      T_AQI_AGC_UL_PARAM  parameters;
-    }
-    T_AQI_AGC_UL_TASK;
-  #endif
-
-  #if (L1_AGC_DL == 1)
-    /**************************************************************************/
-    /* AGC DL l1a_l1s_com structure...                                        */
-    /**************************************************************************/
-
-    typedef struct
-    {
-      T_AGC_CONTROL agc_dl_control;
-      UWORD16       control;
-      UWORD16       frame_size;
-      WORD16        targeted_level;
-      WORD16        signal_up;
-      WORD16        signal_down;
-      WORD16        max_scale;
-      WORD16        gain_smooth_alpha;
-      WORD16        gain_smooth_alpha_fast;
-      WORD16        gain_smooth_beta;
-      WORD16        gain_smooth_beta_fast;
-      WORD16        gain_intp_flag;
-    }
-    T_AQI_AGC_DL_PARAM;
-
-    typedef struct
-    {
-      T_AQI_AGC_COMMAND   command;
-      T_AQI_AGC_DL_PARAM  parameters;
-    }
-    T_AQI_AGC_DL_TASK;
-  #endif
-
-  #if (L1_DRC == 1)
-    /**************************************************************************/
-    /* DRC 1.x l1a_l1s_com structure...                                       */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_AQI_DRC_COMMAND;
-
-    typedef struct
-    {
-      T_AQI_DRC_COMMAND   command;
-      T_AQI_DRC_PARAM     *parameters;
-    }
-    T_AQI_DRC_TASK;
-
-
-   /**************************************************************************/
-   /* MP3 MCU-DSP API                                                        */
-   /**************************************************************************/
-   typedef struct
-   {
-    API_SIGNED d_drc_speech_mode_samp_f;
-    API_SIGNED d_drc_num_subbands;
-    API_SIGNED d_drc_frame_len;
-    API_SIGNED d_drc_expansion_knee_fb_bs;
-    API_SIGNED d_drc_expansion_knee_md_hg;
-    API_SIGNED d_drc_expansion_ratio_fb_bs;
-    API_SIGNED d_drc_expansion_ratio_md_hg;
-    API_SIGNED d_drc_max_amplification_fb_bs;
-    API_SIGNED d_drc_max_amplification_md_hg;
-    API_SIGNED d_drc_compression_knee_fb_bs;
-    API_SIGNED d_drc_compression_knee_md_hg;
-    API_SIGNED d_drc_compression_ratio_fb_bs;
-    API_SIGNED d_drc_compression_ratio_md_hg;
-    API_SIGNED d_drc_energy_limiting_th_fb_bs;
-    API_SIGNED d_drc_energy_limiting_th_md_hg;
-    API_SIGNED d_drc_limiter_threshold_fb;
-    API_SIGNED d_drc_limiter_threshold_bs;
-    API_SIGNED d_drc_limiter_threshold_md;
-    API_SIGNED d_drc_limiter_threshold_hg;
-    API_SIGNED d_drc_limiter_hangover_spect_preserve;
-    API_SIGNED d_drc_limiter_release_fb_bs;
-    API_SIGNED d_drc_limiter_release_md_hg;
-    API_SIGNED d_drc_gain_track_fb_bs;
-    API_SIGNED d_drc_gain_track_md_hg;
-    API_SIGNED a_drc_low_pass_filter[17];
-    API_SIGNED a_drc_mid_band_filter[17];
-   } T_DRC_MCU_DSP;
-  #endif
-
-  #if (L1_LIMITER == 1)
-    /**************************************************************************/
-    /* LIMITER l1a_l1s_com structure...                                       */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-      BOOL  partial_update;
-    }
-    T_LIMITER_COMMAND;
-
-    typedef struct 
-    {
-      BOOL      limiter_enable;
-      UWORD16   block_size;
-      UWORD16   slope_update_period;
-      UWORD16   nb_fir_coefs;
-      WORD16   *filter_coefs;
-      WORD16    thr_low_0;
-      WORD16    thr_low_slope;
-      WORD16    thr_high_0;
-      WORD16    thr_high_slope;
-      WORD16    gain_fall;
-      WORD16    gain_rise;
-    }
-    T_LIMITER_PARAM;
-
-    typedef struct
-    {
-      T_LIMITER_COMMAND   command;
-      T_LIMITER_PARAM     parameters;
-    }
-    T_LIMITER_TASK;
-  #endif
-
-  #if (L1_ES == 1)
-    /**************************************************************************/
-    /* ES l1a_l1s_com structure...                                            */
-    /**************************************************************************/
-    typedef struct
-    {
-      BOOL  update;
-    }
-    T_ES_COMMAND;
-
-    typedef struct
-    {
-      UWORD8 es_mode;                    /* ES general configuration */
-      WORD16 es_gain_dl;
-      WORD16 es_gain_ul_1;
-      WORD16 es_gain_ul_2;
-      WORD16 tcl_fe_ls_thr;              /* TCL reference threshold in FE mode for loud signal */
-      WORD16 tcl_dt_ls_thr;              /* TCL reference threshold in DT mode for loud signal */
-      WORD16 tcl_fe_ns_thr;              /* TCL reference threshold in FE mode for nominal signal */
-      WORD16 tcl_dt_ns_thr;              /* TCL reference threshold in DT mode for nominal signal */
-      WORD16 tcl_ne_thr;                 /* TCL reference threshold in NE mode */
-      WORD16 ref_ls_pwr;                 /* reference power for loud signals in DL */
-      WORD16 switching_time;             /* switching time (idx) */
-      WORD16 switching_time_dt;          /* switching time (idx) in DT mode */
-      WORD16 hang_time;                  /* hangover time  (idx) */
-      WORD16 gain_lin_dl_vect[4];        /* downlink linear gain per state */
-      WORD16 gain_lin_ul_vect[4];        /* uplink linear gain per state */
-    }
-    T_ES_CONFIG;
-
-    typedef struct 
-    {
-      UWORD8      es_enable;
-      UWORD8      es_behavior;
-      T_ES_CONFIG es_config;
-    }
-    T_ES_PARAM;
-
-    typedef struct
-    {
-      T_ES_COMMAND   command;
-      T_ES_PARAM     parameters;
-    }
-    T_ES_TASK;
-  #endif
-
-    typedef struct
-    {
-      BOOL      start;
-    }
-    T_AUDIOIT_COMMAND;
-
-    typedef struct
-    {
-      T_AUDIOIT_COMMAND   command;
-    }
-    T_AUDIOIT_TASK;
-
-    // Triton Audio ON/OFF Changes
-#if (L1_AUDIO_MCU_ONOFF == 1)    
-    typedef enum
-    {
-        L1_AUDIO_NO_ACTION = 0,
-        L1_AUDIO_TURN_ON   = 1,
-        L1_AUDIO_TURN_OFF  = 2
-    }
-    T_L1_AUDIO_ACTION;
-
-    typedef enum
-    {
-        L1_INVALID                      =  0xFF,
-        L1_AUDIO_UL_OFF                 =   0,
-        L1_AUDIO_UL_SWITCHON_STARTED    =   1,
-        L1_AUDIO_UL_ON                  =   2,
-        L1_AUDIO_UL_SWITCHOFF_STARTED   =   3
-    }
-    T_L1_AUDIO_UL_STATE;
-
-    typedef enum
-    {
-        L1_DL_INVALID  			=  0xFF,
-        L1_AUDIO_DL_OFF                 =   0,
-        L1_AUDIO_DL_SWITCHON_STARTED    =   1,
-        L1_AUDIO_DL_ON                  =   2,
-        L1_AUDIO_DL_SWITCHOFF_STARTED   =   3
-    }
-    T_L1_AUDIO_DL_STATE;
-
-    typedef enum
-    {
-        L1_AUDIO_DL_PATH = 0,
-        L1_AUDIO_UL_PATH = 1
-    }
-    T_L1_AUDIO_PATH;
-
-
-    typedef struct
-    {
-        UWORD8              l1_audio_switch_on_ul_request;
-        UWORD8              l1_audio_switch_on_dl_request;
-
-        UWORD8              l1_audio_ul_on2off_hold_time;
-        UWORD8              l1_audio_dl_on2off_hold_time;
-
-        T_L1_AUDIO_ACTION   l1_audio_ul_action;
-        T_L1_AUDIO_ACTION   l1_audio_dl_action;
-
-
-        BOOL                l1_audio_ul_switched_on;
-        BOOL                l1_audio_dl_switched_on;
-
-        BOOL                l1_audio_ul_switched_off;
-        BOOL                l1_audio_dl_switched_off;
-        
-    }
-    T_L1S_AUDIO_ONOFF_MANAGER;
-
-#endif // L1_AUDIO_MCU_ONOFF    
-
-#if(L1_MIDI_BUFFER == 1)
-typedef struct
-{
-   UWORD8 a_midi_buffer_size;
-#if (DRP_FW_BUILD != 1)
-#if ((OP_L1_STANDALONE == 0) && (PSP_STANDALONE == 0))
-      UINT16 audio_play_buffer[AUDIO_EXT_MIDI_BUFFER_SIZE*2];
-#endif
-#endif
-  }T_MIDI_DMA_PARAM;
-#endif
-
-#if(L1_BT_AUDIO ==1)
-typedef struct
-{
-      BOOL connected_status;
-      BOOL pcm_data_ready;
-      UWORD8 pcm_data_pending;
-      UWORD8 pcm_data_end;
-      UWORD8 pcm_data_failed;
-      L1AudioPcmConfig pcmconfig;
-      L1AudioPcmBlock  pcmblock;
-      L1AudioConfigureCallback audio_configure_callback;
-      L1AudioPcmCallback audio_pcmblock_callback;
- } T_L1_BT_AUDIO;
-#endif
-
-
 #endif // AUDIO_TASK
--- a/L1/audio_include/l1audio_msgty.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_msgty.h	Thu Jun 09 01:15:50 2016 +0000
@@ -3,14 +3,9 @@
  * L1AUDIO_MSGTY.H
  *
  *        Filename l1audio_msgty.h
- *  Copyright 2003 (C) Texas Instruments
+ *  Copyright 2003 (C) Texas Instruments  
  *
  ************* Revision Controle System Header *************/
-#ifndef _L1AUDIO_MSGTY_H
-#define _L1AUDIO_MSGTY_H
-
-#include "../../include/config.h"
-#include "../include/l1_confg.h"
 
 #if (AUDIO_TASK == 1)
 
@@ -350,7 +345,7 @@
     T_L1_SRBACK_TEMP_SAVE_DATA_REQ;
   #endif
 
-  #if (L1_AEC == 1)
+  #if (AEC)
     typedef struct
     {
       #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
@@ -381,84 +376,6 @@
     #endif
   #endif
 
-#if (L1_AEC == 2)
-
-   typedef enum
-   {
-	  L1_AQI_AEC_STOP   = 0,
-	  L1_AQI_AEC_START  = 1,
-	  L1_AQI_AEC_UPDATE = 2
-   }
-   T_AEC_CONTROL;
-
-
-	typedef struct
-	{
-	  WORD16 aec_mode;
-	  WORD16 mu;
-	  UWORD16 cont_filter;
-	  WORD16 scale_input_ul;
-	  WORD16 scale_input_dl;
-	  WORD16 div_dmax;
-	  UWORD16 div_swap_good;
-	  UWORD16 div_swap_bad;
-	  WORD16 block_init;
-	  UWORD16 fact_vad;
-	  UWORD16 fact_asd_fil;
-	  UWORD16 fact_asd_mut;
-	  UWORD16 thrs_abs;
-	  UWORD16 es_level_max;
-	  UWORD16 granularity_att;
-	  UWORD16 coef_smooth;
-//	  UWORD16 block_size;
-	}
-	T_MMI_AQI_AEC_PARAMS;
-
-
-
-    typedef struct
-    {
-      #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-       T_RV_HDR  header;
-      #endif
-       T_AEC_CONTROL aec_control;
-       T_MMI_AQI_AEC_PARAMS aec_parameters;
-    }
-    T_MMI_AQI_AEC_REQ;
-
-
-	typedef enum
-	{
-		L1_AQI_AEC_NO_ACTION = -1,
-		L1_AQI_AEC_STOPPED = 0,
-		L1_AQI_AEC_STARTED = 1,
-		L1_AQI_AEC_UPDATED = 2
-	}
-	T_AEC_ACTION;
-
-	typedef struct
-	{
-      #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-       T_RV_HDR  header;
-      #endif
-
-		T_AEC_ACTION aec_action;
-	}
-	T_MMI_AQI_AEC_CON;
-
-	typedef struct
-	{
-      #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-       T_RV_HDR  header;
-      #endif
-
-	T_AEC_ACTION aec_action;
-	}
-	T_L1_AQI_AEC_CON;
-
-#endif// L1_AEC ==2
-
-
   #if (FIR)
     typedef struct
     {
@@ -572,602 +489,4 @@
       typedef T_L1_CPORT_CONFIGURE_CON T_MMI_CPORT_CONFIGURE_CON;
     #endif
   #endif
-
-  #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1)
-    typedef struct
-    {
-      #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-        T_RV_HDR  header;
-      #endif
-       UWORD8   onoff_value;
-    }
-    T_MMI_AUDIO_ONOFF_REQ;
-  #endif
-
-  #if (L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-    typedef struct
-    {
-      #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-        T_RV_HDR  header;
-      #endif
-       UWORD8   vul_onoff_value;
-       UWORD8   vdl_onoff_value;
-    }
-    T_MMI_AUDIO_ONOFF_REQ;
-  #endif
-
-  #if (L1_EXT_AUDIO_MGT == 1)
-    typedef struct
-    {
-     UWORD8   sampling_frequency;
-     UWORD8   DMA_channel_number;
-     UWORD8   data_type;
-     UWORD8   element_number;
-     UWORD16  frame_number;
-     WORD8*   source_buffer_address;
-     UWORD8   mono_stereo;
-     UWORD8   session_id;
-    }
-    T_MMI_EXT_AUDIO_MGT_START_REQ;
-  #endif
-
-  #if (L1_ANR == 1)
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      BOOL      anr_enable;
-      WORD16    min_gain;
-      WORD8     div_factor_shift;
-      UWORD8    ns_level;
-   }
-   T_MMI_ANR_REQ;
-  #endif
-
-  #if (L1_ANR == 2)
-   typedef enum
-   {
-      ANR_STOP  = 0,
-      ANR_START = 1,
-      ANR_UPDATE = 2
-   }
-   T_ANR_CONTROL;
-
-   typedef struct
-   {
-      WORD16    control;
-      WORD16    ns_level;
-      WORD16    tone_ene_th;
-      WORD16    tone_cnt_th;
-   }
-   T_MMI_AQI_ANR_PARAMS;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_ANR_CONTROL         anr_ul_control;
-      T_MMI_AQI_ANR_PARAMS  parameters;
-   }
-   T_MMI_AQI_ANR_REQ;
-
-   typedef enum
-   {
-      ANR_NO_ACTION = -1,
-      ANR_STOPPED   = 0,
-      ANR_STARTED   = 1,
-      ANR_UPDATED   = 2
-   }
-   T_ANR_ACTION;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_ANR_ACTION      anr_ul_action;
-   }
-   T_MMI_AQI_ANR_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_ANR_ACTION      anr_ul_action;
-   }
-   T_L1_AQI_ANR_CON;
-
-  #endif
-
-  #if (L1_IIR == 1)
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      BOOL      iir_enable;
-      UWORD8    nb_iir_blocks;
-      WORD16   *iir_coefs;
-      UWORD8    nb_fir_coefs;
-      WORD16   *fir_coefs;
-      WORD8     input_scaling;  
-      WORD8     fir_scaling;  
-      WORD8     input_gain_scaling;
-      WORD8     output_gain_scaling;
-      UWORD16   output_gain;
-      WORD16    feedback;
-   }
-   T_MMI_IIR_REQ;
-  #endif
-
-  #if (L1_WCM == 1)
-
-   typedef enum
-   {
-      WCM_STOP   = 0,
-      WCM_START  = 1,
-      WCM_UPDATE = 2
-   }
-   T_WCM_CONTROL;
-
-   typedef struct
-   {
-     WORD16 mode;
-     WORD16 frame_size;
-     WORD16 num_sub_frames;
-     WORD16 ratio;
-     WORD16 threshold;
-     WORD16 gain[16];
-   }
-   T_MMI_AQI_WCM_PARAMS;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-    T_WCM_CONTROL         wcm_control;
-    T_MMI_AQI_WCM_PARAMS  parameters;
-   }
-   T_MMI_AQI_WCM_REQ;
-
-   typedef T_MMI_AQI_WCM_REQ  T_AQI_WCM_PARAM;
-
-   typedef enum
-   {
-      WCM_NO_ACTION = -1,
-      WCM_STOPPED   = 0,
-      WCM_STARTED   = 1,
-      WCM_UPDATED   = 2
-   }
-   T_WCM_ACTION;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-    T_WCM_ACTION  wcm_action;
-   }
-   T_MMI_AQI_WCM_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_WCM_ACTION  wcm_action;
-   }
-   T_L1_AQI_WCM_CON;
-
-  #endif
-
-
-  #if (L1_AGC_UL == 1 || L1_AGC_DL == 1)
-
-   typedef enum
-   {
-     AGC_STOP   = 0,
-     AGC_START  = 1,
-     AGC_UPDATE = 2
-   }
-   T_AGC_CONTROL;
-
-   typedef struct
-   {
-     UWORD16  control;
-     UWORD16  frame_size;
-     WORD16   targeted_level;
-     WORD16   signal_up;
-     WORD16   signal_down;
-     WORD16   max_scale;
-     WORD16   gain_smooth_alpha;
-     WORD16   gain_smooth_alpha_fast;
-     WORD16   gain_smooth_beta;
-     WORD16   gain_smooth_beta_fast;
-     WORD16   gain_intp_flag;
-   }
-   T_MMI_AQI_AGC_PARAMS;
-
-   typedef enum
-   {
-     AGC_NO_ACTION = -1,
-     AGC_STOPPED = 0,
-     AGC_STARTED = 1,
-     AGC_UPDATED = 2
-   }
-   T_AGC_ACTION;
-
-  #endif
-
-  #if (L1_AGC_UL == 1)
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-     T_AGC_CONTROL        agc_ul_control;
-     T_MMI_AQI_AGC_PARAMS parameters;
-   }
-   T_MMI_AQI_AGC_UL_REQ ;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_AGC_ACTION	agc_ul_action;
-   }
-   T_MMI_AQI_AGC_UL_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_AGC_ACTION  agc_ul_action;
-   }
-   T_L1_AQI_AGC_UL_CON;  
-
-  #endif
-
-
-  #if (L1_AGC_DL == 1)
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-     T_AGC_CONTROL        agc_dl_control;
-     T_MMI_AQI_AGC_PARAMS parameters;
-   }
-   T_MMI_AQI_AGC_DL_REQ ;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_AGC_ACTION	agc_dl_action;
-   }
-   T_MMI_AQI_AGC_DL_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_AGC_ACTION  agc_dl_action;
-   }
-   T_L1_AQI_AGC_DL_CON;  
-
-  #endif
-
-
-  #if (L1_IIR == 2)
-
-   typedef enum
-   {
-      IIR_STOP   = 0,
-      IIR_START  = 1,
-      IIR_UPDATE = 2
-   }
-   T_IIR_CONTROL;
-
-
-   typedef struct
-   {
-      UWORD16 fir_enable;
-      UWORD16 fir_length;
-      WORD16  fir_shift;
-      WORD16  fir_taps[40];
-   }
-   T_MMI_AQI_IIR_FIR_PARAMS;
-
-   typedef struct
-   {
-      WORD16 sos_fact;
-      WORD16 sos_fact_form;
-      WORD16 sos_den[2];
-      WORD16 sos_num[3];
-      WORD16 sos_num_form;
-   }
-   T_MMI_AQI_IIR_SINGLE_SOS_PARAMS;
-
-   typedef struct
-   {
-
-     UWORD16 sos_enable;
-     UWORD16 sos_number;
-     T_MMI_AQI_IIR_SINGLE_SOS_PARAMS sos_filter[6];
-   }
-   T_MMI_AQI_IIR_SOS_PARAMS;
-
-   typedef struct
-   {
-     UWORD16 control;
-     UWORD16 frame_size;
-     UWORD16 fir_swap;
-     T_MMI_AQI_IIR_FIR_PARAMS fir_filter;
-     T_MMI_AQI_IIR_SOS_PARAMS sos_filter;
-     WORD16 gain;
-   }
-   T_MMI_AQI_IIR_PARAMS;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-    T_IIR_CONTROL           iir_dl_control;
-      T_MMI_AQI_IIR_PARAMS  parameters;
-   }
-   T_MMI_AQI_IIR_DL_REQ;
-
-   typedef T_MMI_AQI_IIR_DL_REQ  T_AQI_IIR_PARAM;
-
-   typedef enum
-   {
-      IIR_NO_ACTION = -1,
-      IIR_STOPPED   = 0,
-      IIR_STARTED   = 1,
-      IIR_UPDATED   = 2
-   }
-   T_IIR_ACTION;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-    T_IIR_ACTION  iir_dl_action;
-   }
-   T_MMI_AQI_IIR_DL_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_IIR_ACTION  iir_dl_action;
-   }
-   T_L1_AQI_IIR_DL_CON;
-
-  #endif
-
-
-#if (L1_DRC == 1)
-
-   typedef enum
-   {
-      DRC_STOP   = 0,
-      DRC_START  = 1,
-      DRC_UPDATE = 2
-   }
-   T_DRC_CONTROL;
-
-   typedef struct
-   {
-     WORD16 speech_mode_samp_f;
-     WORD16 num_subbands;
-     WORD16 frame_len;
-     WORD16 expansion_knee_fb_bs;
-     WORD16 expansion_knee_md_hg;
-     WORD16 expansion_ratio_fb_bs;
-     WORD16 expansion_ratio_md_hg;
-     WORD16 max_amplification_fb_bs;
-     WORD16 max_amplification_md_hg;
-     WORD16 compression_knee_fb_bs;
-     WORD16 compression_knee_md_hg;
-     WORD16 compression_ratio_fb_bs;
-     WORD16 compression_ratio_md_hg;
-     WORD16 energy_limiting_th_fb_bs;
-     WORD16 energy_limiting_th_md_hg;
-     WORD16 limiter_threshold_fb;
-     WORD16 limiter_threshold_bs;
-     WORD16 limiter_threshold_md;
-     WORD16 limiter_threshold_hg;
-     WORD16 limiter_hangover_spect_preserve;
-     WORD16 limiter_release_fb_bs;
-     WORD16 limiter_release_md_hg;
-     WORD16 gain_track_fb_bs;
-     WORD16 gain_track_md_hg;
-     WORD16 low_pass_filter[17];
-     WORD16 mid_band_filter[17];
-   }
-   T_MMI_AQI_DRC_PARAMS;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_DRC_CONTROL         drc_dl_control;
-      T_MMI_AQI_DRC_PARAMS  parameters;
-   }
-   T_MMI_AQI_DRC_REQ;
-
-   typedef T_MMI_AQI_DRC_REQ  T_AQI_DRC_PARAM;
-
-   typedef enum
-   {
-      DRC_NO_ACTION = -1,
-      DRC_STOPPED   = 0,
-      DRC_STARTED   = 1,
-      DRC_UPDATED   = 2
-   }
-   T_DRC_ACTION;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-    T_DRC_ACTION  drc_dl_action;
-   }
-   T_MMI_AQI_DRC_CON;
-
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      T_DRC_ACTION  drc_dl_action;
-   }
-   T_L1_AQI_DRC_CON;
-
-  #endif //L1_DRC
-
- 
-  #if (L1_LIMITER == 1)
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      BOOL      limiter_enable;
-      UWORD16   block_size;
-      UWORD16   slope_update_period;
-      UWORD16   nb_fir_coefs;
-      WORD16   *filter_coefs;
-      WORD16    thr_low_0;
-      WORD16    thr_low_slope;
-      WORD16    thr_high_0;
-      WORD16    thr_high_slope;
-      WORD16    gain_fall;
-      WORD16    gain_rise;
-   }
-   T_MMI_LIMITER_REQ;
-  #endif
-
-  #if (L1_ES == 1)
-   typedef struct
-   {
-    #if (OP_RIV_AUDIO == 1)
-      T_RV_HDR  header;
-    #endif
-      BOOL   es_enable;
-      UWORD8 es_behavior;
-      UWORD8 es_mode;
-      WORD16 es_gain_dl;
-      WORD16 es_gain_ul_1;
-      WORD16 es_gain_ul_2;
-      WORD16 tcl_fe_ls_thr;
-      WORD16 tcl_dt_ls_thr;
-      WORD16 tcl_fe_ns_thr;
-      WORD16 tcl_dt_ns_thr;
-      WORD16 tcl_ne_thr;
-      WORD16 ref_ls_pwr;
-      WORD16 switching_time;
-      WORD16 switching_time_dt;
-      WORD16 hang_time;
-      WORD16 gain_lin_dl_vect[4];
-      WORD16 gain_lin_ul_vect[4];
-   }
-   T_MMI_ES_REQ;
-  #endif
-  
-#if (L1_VOCODER_IF_CHANGE == 1)
-  typedef struct 
-  {
-    BOOL vocoder_state; // TRUE if enable request, FALSE if disable request
-  } T_MMI_TCH_VOCODER_CFG_REQ;
-#endif // L1_VOCODER_IF_CHANGE == 1
-
-#if (L1_PCM_EXTRACTION)
-  typedef struct
-  {
-  #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-    T_RV_HDR  header;
-  #endif
-    UWORD8 session_id;
-    UWORD8 download_ul_gain;
-    UWORD8 download_dl_gain;
-    UWORD32 maximum_size;
-  } T_MMI_PCM_DOWNLOAD_START_REQ;
-
-  typedef struct
-  {
-  #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-    T_RV_HDR  header;
-  #endif
-    UWORD8 session_id;
-    UWORD8 upload_ul_gain;
-    UWORD8 upload_dl_gain;
-    UWORD32 maximum_size;
-  } T_MMI_PCM_UPLOAD_START_REQ;
-
-  typedef struct
-  {
-  #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
-    T_RV_HDR  header;
-  #endif
-    UWORD32 maximum_size;
-  } T_MMI_PCM_DOWNLOAD_STOP_REQ;
-
-  typedef struct
-  {
-    UWORD32 uploaded_size;
-  } T_L1_PCM_UPLOAD_STOP_CON;
-
- #if (OP_RIV_AUDIO == 1)
-  typedef struct
-  {
-    T_RV_HDR  header;
-    UWORD32 uploaded_size;
-  }
-  T_MMI_PCM_UPLOAD_STOP_CON;
-  #else
-    typedef T_L1_PCM_UPLOAD_STOP_CON T_MMI_PCM_UPLOAD_STOP_CON;
-  #endif
-
-#endif  /* L1_PCM_EXTRACTION */
-
 #endif // AUDIO_TASK
-
-typedef struct
-{
-  UWORD8 outen1;
-  UWORD8 outen2;
-  UWORD8 outen3;
-  UWORD8 classD;
-} T_MMI_OUTEN_CFG_REQ;
-
-typedef struct
-{
-  #if (OP_RIV_AUDIO == 1)
-    T_RV_HDR  header;
-  #endif
-  UWORD8 outen1;
-  UWORD8 outen2;
-  UWORD8 outen3;
-  UWORD8 classD;
-} T_MMI_OUTEN_CFG_READ_CON;
-
-
-#endif // _L1AUDIO_MSGTY_H
--- a/L1/audio_include/l1audio_proto.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_proto.h	Thu Jun 09 01:15:50 2016 +0000
@@ -22,10 +22,6 @@
 #if (MELODY_E2)
 void l1_send_melody_e2_background_msg(UWORD32 SignalCode, UWORD8  melody_id);
 #endif
-#if (OP_L1_STANDALONE == 0)
-void * mem_Allocate(UWORD16 size);
-void    mem_Deallocate(void *memoryBlock);
-#endif
 #endif    // _L1AUDIO_PROTO_H_
 
 #endif    // AUDIO_TASK
--- a/L1/audio_include/l1audio_signa.h	Thu Jun 09 00:53:13 2016 +0000
+++ b/L1/audio_include/l1audio_signa.h	Thu Jun 09 01:15:50 2016 +0000
@@ -3,123 +3,100 @@
  * L1AUDIO_SIGNA.H
  *
  *        Filename l1audio_signa.h
- *  Copyright 2003 (C) Texas Instruments
+ *  Copyright 2003 (C) Texas Instruments  
  *
  ************* Revision Controle System Header *************/
 
-#include "../../include/config.h"
-#include "../include/l1_confg.h"
-
 #if (AUDIO_TASK == 1)
   #define P_AUDIO ( 0x18 )
 
   // Messages MMI <-> L1A
   #if (KEYBEEP)
-    #define MMI_KEYBEEP_START_REQ             ( ( P_AUDIO << 8 ) |   0 ) // build: T_MMI_KEYBEEP_REQ
-    #define MMI_KEYBEEP_STOP_REQ              ( ( P_AUDIO << 8 ) |   1 ) // build: trigger
+    #define MMI_KEYBEEP_START_REQ             ( ( P_AUDIO << 8 ) |   0 )
+    #define MMI_KEYBEEP_STOP_REQ              ( ( P_AUDIO << 8 ) |   1 )
     #define MMI_KEYBEEP_START_CON             ( ( P_AUDIO << 8 ) |   2 )
     #define MMI_KEYBEEP_STOP_CON              ( ( P_AUDIO << 8 ) |   3 )
   #endif
   #if (TONE)
-    #define MMI_TONE_START_REQ                ( ( P_AUDIO << 8 ) |   4 ) // build: T_MMI_TONE_REQ 
-    #define MMI_TONE_STOP_REQ                 ( ( P_AUDIO << 8 ) |   5 ) // build: trigger
+    #define MMI_TONE_START_REQ                ( ( P_AUDIO << 8 ) |   4 )
+    #define MMI_TONE_STOP_REQ                 ( ( P_AUDIO << 8 ) |   5 )
     #define MMI_TONE_START_CON                ( ( P_AUDIO << 8 ) |   6 )
     #define MMI_TONE_STOP_CON                 ( ( P_AUDIO << 8 ) |   7 )
   #endif
   #if (MELODY_E1)
-    #define MMI_MELODY0_START_REQ             ( ( P_AUDIO << 8 ) |   8 ) // build: T_MMI_MELODY_REQ
-    #define MMI_MELODY0_STOP_REQ              ( ( P_AUDIO << 8 ) |   9 ) // build: trigger
+    #define MMI_MELODY0_START_REQ             ( ( P_AUDIO << 8 ) |   8 )
+    #define MMI_MELODY0_STOP_REQ              ( ( P_AUDIO << 8 ) |   9 )
     #define MMI_MELODY0_START_CON             ( ( P_AUDIO << 8 ) |  10 )
     #define MMI_MELODY0_STOP_CON              ( ( P_AUDIO << 8 ) |  11 )
 
-    #define MMI_MELODY1_START_REQ             ( ( P_AUDIO << 8 ) |  12 ) // build: T_MMI_MELODY_REQ
-    #define MMI_MELODY1_STOP_REQ              ( ( P_AUDIO << 8 ) |  13 ) // build: trigger
+    #define MMI_MELODY1_START_REQ             ( ( P_AUDIO << 8 ) |  12 )
+    #define MMI_MELODY1_STOP_REQ              ( ( P_AUDIO << 8 ) |  13 )
     #define MMI_MELODY1_START_CON             ( ( P_AUDIO << 8 ) |  14 )
     #define MMI_MELODY1_STOP_CON              ( ( P_AUDIO << 8 ) |  15 )
   #endif
   #if (VOICE_MEMO)
-    #define MMI_VM_PLAY_START_REQ             ( ( P_AUDIO << 8 ) |  16 ) // build: T_MMI_VM_PLAY_REQ
-    #define MMI_VM_PLAY_STOP_REQ              ( ( P_AUDIO << 8 ) |  17 ) // build: trigger
+    #define MMI_VM_PLAY_START_REQ             ( ( P_AUDIO << 8 ) |  16 )
+    #define MMI_VM_PLAY_STOP_REQ              ( ( P_AUDIO << 8 ) |  17 )
     #define MMI_VM_PLAY_START_CON             ( ( P_AUDIO << 8 ) |  18 )
     #define MMI_VM_PLAY_STOP_CON              ( ( P_AUDIO << 8 ) |  19 )
 
-    #define MMI_VM_RECORD_START_REQ           ( ( P_AUDIO << 8 ) |  20 ) // build: T_MMI_VM_RECORD_REQ
-    #define MMI_VM_RECORD_STOP_REQ            ( ( P_AUDIO << 8 ) |  21 ) // build: trigger
+    #define MMI_VM_RECORD_START_REQ           ( ( P_AUDIO << 8 ) |  20 )
+    #define MMI_VM_RECORD_STOP_REQ            ( ( P_AUDIO << 8 ) |  21 )
     #define MMI_VM_RECORD_START_CON           ( ( P_AUDIO << 8 ) |  22 )
     #define MMI_VM_RECORD_STOP_CON            ( ( P_AUDIO << 8 ) |  23 )
   #endif
-  #if (L1_PCM_EXTRACTION)
-    #define MMI_PCM_DOWNLOAD_START_REQ        ( ( P_AUDIO << 8 ) | 24 )
-    #define MMI_PCM_DOWNLOAD_STOP_REQ         ( ( P_AUDIO << 8 ) | 25 )
-    #define MMI_PCM_DOWNLOAD_START_CON        ( ( P_AUDIO << 8 ) | 26 )
-    #define MMI_PCM_DOWNLOAD_STOP_CON         ( ( P_AUDIO << 8 ) | 27 )
-
-    #define MMI_PCM_UPLOAD_START_REQ          ( ( P_AUDIO << 8 ) | 28 )
-    #define MMI_PCM_UPLOAD_STOP_REQ           ( ( P_AUDIO << 8 ) | 29 )
-    #define MMI_PCM_UPLOAD_START_CON          ( ( P_AUDIO << 8 ) | 30 )
-    #define MMI_PCM_UPLOAD_STOP_CON           ( ( P_AUDIO << 8 ) | 31 )
-  #endif
   #if (SPEECH_RECO)
-    #define MMI_SR_ENROLL_START_REQ           ( ( P_AUDIO << 8 ) |  24 ) // build: T_MMI_SR_ENROLL_REQ
-    #define MMI_SR_ENROLL_STOP_REQ            ( ( P_AUDIO << 8 ) |  25 ) // build: trigger
+    #define MMI_SR_ENROLL_START_REQ           ( ( P_AUDIO << 8 ) |  24 )
+    #define MMI_SR_ENROLL_STOP_REQ            ( ( P_AUDIO << 8 ) |  25 )
     #define MMI_SR_ENROLL_START_CON           ( ( P_AUDIO << 8 ) |  26 )
     #define MMI_SR_ENROLL_STOP_CON            ( ( P_AUDIO << 8 ) |  27 )
 
-    #define MMI_SR_UPDATE_START_REQ           ( ( P_AUDIO << 8 ) |  28 ) // build: T_MMI_SR_UPDATE_REQ
-    #define MMI_SR_UPDATE_STOP_REQ            ( ( P_AUDIO << 8 ) |  29 ) // build: trigger
+    #define MMI_SR_UPDATE_START_REQ           ( ( P_AUDIO << 8 ) |  28 )
+    #define MMI_SR_UPDATE_STOP_REQ            ( ( P_AUDIO << 8 ) |  29 )
     #define MMI_SR_UPDATE_START_CON           ( ( P_AUDIO << 8 ) |  30 )
     #define MMI_SR_UPDATE_STOP_CON            ( ( P_AUDIO << 8 ) |  31 )
 
-    #define MMI_SR_RECO_START_REQ             ( ( P_AUDIO << 8 ) |  32 ) // build: T_MMI_SR_RECO_REQ
-    #define MMI_SR_RECO_STOP_REQ              ( ( P_AUDIO << 8 ) |  33 ) // build: trigger
+    #define MMI_SR_RECO_START_REQ             ( ( P_AUDIO << 8 ) |  32 )
+    #define MMI_SR_RECO_STOP_REQ              ( ( P_AUDIO << 8 ) |  33 )
     #define MMI_SR_RECO_START_CON             ( ( P_AUDIO << 8 ) |  34 )
     #define MMI_SR_RECO_STOP_CON              ( ( P_AUDIO << 8 ) |  35 )
 
-    #define MMI_SR_UPDATE_CHECK_START_REQ     ( ( P_AUDIO << 8 ) |  36 ) // build: T_MMI_SR_UPDATE_CHECK_REQ
-    #define MMI_SR_UPDATE_CHECK_STOP_REQ      ( ( P_AUDIO << 8 ) |  37 ) // build: trigger
+    #define MMI_SR_UPDATE_CHECK_START_REQ     ( ( P_AUDIO << 8 ) |  36 )
+    #define MMI_SR_UPDATE_CHECK_STOP_REQ      ( ( P_AUDIO << 8 ) |  37 )
     #define MMI_SR_UPDATE_CHECK_START_CON     ( ( P_AUDIO << 8 ) |  38 )
     #define MMI_SR_UPDATE_CHECK_STOP_CON      ( ( P_AUDIO << 8 ) |  39 )
   #endif
-  #if (L1_AEC == 1)
-    #define MMI_AEC_REQ                       ( ( P_AUDIO << 8 ) |  40 ) // build: T_MMI_AEC_REQ
+  #if (AEC)
+    #define MMI_AEC_REQ                       ( ( P_AUDIO << 8 ) |  40 )
     #define MMI_AEC_CON                       ( ( P_AUDIO << 8 ) |  41 )
   #endif
-  #if (L1_AEC == 2)
-    #define MMI_AQI_AEC_REQ                   ( ( P_AUDIO << 8 ) |  143 ) // build: T_MMI_AQI_AEC_REQ
-    #define MMI_AQI_AEC_CON                   ( ( P_AUDIO << 8 ) |  144 )
-  #endif
   #if (FIR)
-    #define MMI_AUDIO_FIR_REQ                 ( ( P_AUDIO << 8 ) |  42 ) // build: T_MMI_AUDIO_FIR_REQ
+    #define MMI_AUDIO_FIR_REQ                 ( ( P_AUDIO << 8 ) |  42 )
     #define MMI_AUDIO_FIR_CON                 ( ( P_AUDIO << 8 ) |  43 )
   #endif
   #if (AUDIO_MODE)
-    #define MMI_AUDIO_MODE_REQ                ( ( P_AUDIO << 8 ) |  44 ) // build: T_MMI_AUDIO_MODE
+    #define MMI_AUDIO_MODE_REQ                ( ( P_AUDIO << 8 ) |  44 )
     #define MMI_AUDIO_MODE_CON                ( ( P_AUDIO << 8 ) |  45 )
   #endif
   #if (MELODY_E2)
-    #define MMI_MELODY0_E2_START_REQ          ( ( P_AUDIO << 8 ) |  46 ) // build: T_MMI_MELODY_E2_REQ
-    #define MMI_MELODY0_E2_STOP_REQ           ( ( P_AUDIO << 8 ) |  47 ) // build: trigger
+    #define MMI_MELODY0_E2_START_REQ          ( ( P_AUDIO << 8 ) |  46 )
+    #define MMI_MELODY0_E2_STOP_REQ           ( ( P_AUDIO << 8 ) |  47 )
     #define MMI_MELODY0_E2_START_CON          ( ( P_AUDIO << 8 ) |  48 )
     #define MMI_MELODY0_E2_STOP_CON           ( ( P_AUDIO << 8 ) |  49 )
 
-    #define MMI_MELODY1_E2_START_REQ          ( ( P_AUDIO << 8 ) |  50 ) // build: T_MMI_MELODY_E2_REQ
-    #define MMI_MELODY1_E2_STOP_REQ           ( ( P_AUDIO << 8 ) |  51 ) // build: trigger
+    #define MMI_MELODY1_E2_START_REQ          ( ( P_AUDIO << 8 ) |  50 )
+    #define MMI_MELODY1_E2_STOP_REQ           ( ( P_AUDIO << 8 ) |  51 )
     #define MMI_MELODY1_E2_START_CON          ( ( P_AUDIO << 8 ) |  52 )
     #define MMI_MELODY1_E2_STOP_CON           ( ( P_AUDIO << 8 ) |  53 )
   #endif
   #if (L1_VOICE_MEMO_AMR)
-    #define MMI_VM_AMR_PLAY_START_REQ         ( ( P_AUDIO << 8 ) |  54 ) // build: T_MMI_VM_AMR_PLAY_REQ
-    #define MMI_VM_AMR_PLAY_STOP_REQ          ( ( P_AUDIO << 8 ) |  55 ) // build: trigger
+    #define MMI_VM_AMR_PLAY_START_REQ         ( ( P_AUDIO << 8 ) |  54 )
+    #define MMI_VM_AMR_PLAY_STOP_REQ          ( ( P_AUDIO << 8 ) |  55 )
     #define MMI_VM_AMR_PLAY_START_CON         ( ( P_AUDIO << 8 ) |  56 )
     #define MMI_VM_AMR_PLAY_STOP_CON          ( ( P_AUDIO << 8 ) |  57 )
-    #define MMI_VM_AMR_PAUSE_REQ              ( ( P_AUDIO << 8 ) | 158 )
-    #define MMI_VM_AMR_RESUME_REQ             ( ( P_AUDIO << 8 ) | 159 )
-    #define MMI_VM_AMR_PAUSE_CON              ( ( P_AUDIO << 8 ) | 160 )
-    #define MMI_VM_AMR_RESUME_CON             ( ( P_AUDIO << 8 ) | 161 )
-    
 
-    #define MMI_VM_AMR_RECORD_START_REQ       ( ( P_AUDIO << 8 ) |  58 ) // build: T_MMI_VM_AMR_RECORD_REQ
-    #define MMI_VM_AMR_RECORD_STOP_REQ        ( ( P_AUDIO << 8 ) |  59 ) // build: trigger
+    #define MMI_VM_AMR_RECORD_START_REQ       ( ( P_AUDIO << 8 ) |  58 )
+    #define MMI_VM_AMR_RECORD_STOP_REQ        ( ( P_AUDIO << 8 ) |  59 )
     #define MMI_VM_AMR_RECORD_START_CON       ( ( P_AUDIO << 8 ) |  60 )
     #define MMI_VM_AMR_RECORD_STOP_CON        ( ( P_AUDIO << 8 ) |  61 )
   #endif
@@ -127,217 +104,86 @@
     #define MMI_CPORT_CONFIGURE_REQ           ( ( P_AUDIO << 8 ) |   62 )
     #define MMI_CPORT_CONFIGURE_CON           ( ( P_AUDIO << 8 ) |   63 )
   #endif
-  #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1 || L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-    #define MMI_AUDIO_ONOFF_REQ                 ( ( P_AUDIO << 8 ) |  64 )
-    #define MMI_AUDIO_ONOFF_CON                 ( ( P_AUDIO << 8 ) |  65 )
-  #endif
-  #if (L1_EXT_AUDIO_MGT == 1)
-    #define MMI_EXT_AUDIO_MGT_START_REQ       ( ( P_AUDIO << 8 ) |  66 )
-    #define MMI_EXT_AUDIO_MGT_STOP_REQ        ( ( P_AUDIO << 8 ) |  67 )
-    #define MMI_EXT_AUDIO_MGT_START_CON       ( ( P_AUDIO << 8 ) |  68 )
-    #define MMI_EXT_AUDIO_MGT_STOP_CON        ( ( P_AUDIO << 8 ) |  69 )
-  #endif
-  #if (L1_ANR == 1)
-    #define MMI_ANR_REQ                       ( ( P_AUDIO << 8 ) |  70 )
-    #define MMI_ANR_CON                       ( ( P_AUDIO << 8 ) |  71 )
-  #endif
-  #if (L1_IIR == 1)
-    #define MMI_IIR_REQ                       ( ( P_AUDIO << 8 ) |  72 )
-    #define MMI_IIR_CON                       ( ( P_AUDIO << 8 ) |  73 )
-  #endif
-  #if (L1_LIMITER == 1)
-    #define MMI_LIMITER_REQ                   ( ( P_AUDIO << 8 ) |  74 )
-    #define MMI_LIMITER_CON                   ( ( P_AUDIO << 8 ) |  75 )
-  #endif
-  #if (L1_ES == 1)
-    #define MMI_ES_REQ                        ( ( P_AUDIO << 8 ) |  76 )
-    #define MMI_ES_CON                        ( ( P_AUDIO << 8 ) |  77 )
-  #endif
-  #if (L1_DRC == 1)
-    #define MMI_AQI_DRC_REQ                   ( ( P_AUDIO << 8 ) |  146 )
-    #define MMI_AQI_DRC_CON                   ( ( P_AUDIO << 8 ) |  147 )
-  #endif
-  #if (L1_VOCODER_IF_CHANGE == 1)
-    #define MMI_TCH_VOCODER_CFG_REQ   0x0E0C
-    #define MMI_TCH_VOCODER_CFG_CON   0x4E08
-  #endif
-  #if (L1_WCM == 1)
-    #define MMI_AQI_WCM_REQ                    ( ( P_AUDIO << 8 ) |  149 )
-    #define MMI_AQI_WCM_CON                    ( ( P_AUDIO << 8 ) |  150 )
-  #endif
 
-  #if (L1_AGC_UL == 1)
-    #define MMI_AQI_AGC_UL_REQ                   ( ( P_AUDIO << 8 ) |  137)
-    #define MMI_AQI_AGC_UL_CON                   ( ( P_AUDIO << 8 ) |  138)
-  #endif
-
-  #if (L1_AGC_DL == 1)
-    #define MMI_AQI_AGC_DL_REQ                   ( ( P_AUDIO << 8 ) |  139)
-    #define MMI_AQI_AGC_DL_CON                   ( ( P_AUDIO << 8 ) |  140)
-  #endif
-
-
-  #if (L1_ANR == 2)
-    #define MMI_AQI_ANR_REQ                   ( ( P_AUDIO << 8 ) |  131)
-    #define MMI_AQI_ANR_CON                   ( ( P_AUDIO << 8 ) |  132)
-  #endif
-
-  #if (L1_IIR == 2)
-    #define MMI_AQI_IIR_DL_REQ                   ( ( P_AUDIO << 8 ) |  134)
-    #define MMI_AQI_IIR_DL_CON                   ( ( P_AUDIO << 8 ) |  135)
-  #endif
-
-  #define MMI_OUTEN_CFG_REQ                     ( ( P_AUDIO << 8) | 152)
-  #define MMI_OUTEN_CFG_CON                     ( ( P_AUDIO << 8) | 153)
-  #define MMI_OUTEN_CFG_READ_REQ                ( ( P_AUDIO << 8) | 154)
-  #define MMI_OUTEN_CFG_READ_CON                ( ( P_AUDIO << 8) | 155)
-
-  #if(L1_BT_AUDIO==1)
-    #define MMI_BT_ENABLE_REQ                            ((P_AUDIO<<8)|167)
-    #define MMI_BT_DISABLE_REQ                           ((P_AUDIO<<8)|169)
-  #endif
 
   // Messages L1S -> L1A
   #if (KEYBEEP)
-    #define L1_KEYBEEP_START_CON              ( ( P_AUDIO << 8 ) |  78 )
-    #define L1_KEYBEEP_STOP_CON               ( ( P_AUDIO << 8 ) |  79 )
+    #define L1_KEYBEEP_START_CON              ( ( P_AUDIO << 8 ) |  64 )
+    #define L1_KEYBEEP_STOP_CON               ( ( P_AUDIO << 8 ) |  65 )
   #endif
   #if (TONE)
-    #define L1_TONE_START_CON                 ( ( P_AUDIO << 8 ) |  80 )
-    #define L1_TONE_STOP_CON                  ( ( P_AUDIO << 8 ) |  81 )
+    #define L1_TONE_START_CON                 ( ( P_AUDIO << 8 ) |  66 )
+    #define L1_TONE_STOP_CON                  ( ( P_AUDIO << 8 ) |  67 )
   #endif
   #if (MELODY_E1)
-    #define L1_MELODY0_START_CON              ( ( P_AUDIO << 8 ) |  82 )
-    #define L1_MELODY0_STOP_CON               ( ( P_AUDIO << 8 ) |  83 )
+    #define L1_MELODY0_START_CON              ( ( P_AUDIO << 8 ) |  68 )
+    #define L1_MELODY0_STOP_CON               ( ( P_AUDIO << 8 ) |  69 )
 
-    #define L1_MELODY1_START_CON              ( ( P_AUDIO << 8 ) |  84 )
-    #define L1_MELODY1_STOP_CON               ( ( P_AUDIO << 8 ) |  85 )
+    #define L1_MELODY1_START_CON              ( ( P_AUDIO << 8 ) |  70 )
+    #define L1_MELODY1_STOP_CON               ( ( P_AUDIO << 8 ) |  71 )
   #endif
   #if (VOICE_MEMO)
-    #define L1_VM_PLAY_START_CON              ( ( P_AUDIO << 8 ) |  86 )
-    #define L1_VM_PLAY_STOP_CON               ( ( P_AUDIO << 8 ) |  87 )
+    #define L1_VM_PLAY_START_CON              ( ( P_AUDIO << 8 ) |  72 )
+    #define L1_VM_PLAY_STOP_CON               ( ( P_AUDIO << 8 ) |  73 )
 
-    #define L1_VM_RECORD_START_CON            ( ( P_AUDIO << 8 ) |  88 )
-    #define L1_VM_RECORD_STOP_CON             ( ( P_AUDIO << 8 ) |  89 )
-  #endif
-  #if (L1_PCM_EXTRACTION)
-    #define L1_PCM_DOWNLOAD_START_CON         ( ( P_AUDIO << 8 ) |  90 )
-    #define L1_PCM_DOWNLOAD_STOP_CON          ( ( P_AUDIO << 8 ) |  91 )
-
-    #define L1_PCM_UPLOAD_START_CON           ( ( P_AUDIO << 8 ) |  92 )
-    #define L1_PCM_UPLOAD_STOP_CON            ( ( P_AUDIO << 8 ) |  93 )
-
+    #define L1_VM_RECORD_START_CON            ( ( P_AUDIO << 8 ) |  74 )
+    #define L1_VM_RECORD_STOP_CON             ( ( P_AUDIO << 8 ) |  75 )
   #endif
   #if (SPEECH_RECO)
-    #define L1_SR_ENROLL_START_CON            ( ( P_AUDIO << 8 ) |  90 )
-    #define L1_SR_ENROLL_STOP_CON             ( ( P_AUDIO << 8 ) |  91 )
+    #define L1_SR_ENROLL_START_CON            ( ( P_AUDIO << 8 ) |  76 )
+    #define L1_SR_ENROLL_STOP_CON             ( ( P_AUDIO << 8 ) |  77 )
 
-    #define L1_SR_UPDATE_START_CON            ( ( P_AUDIO << 8 ) |  92 )
-    #define L1_SR_UPDATE_STOP_CON             ( ( P_AUDIO << 8 ) |  93 )
+    #define L1_SR_UPDATE_START_CON            ( ( P_AUDIO << 8 ) |  78 )
+    #define L1_SR_UPDATE_STOP_CON             ( ( P_AUDIO << 8 ) |  79 )
 
-    #define L1_SR_RECO_START_CON              ( ( P_AUDIO << 8 ) |  94 )
-    #define L1_SR_RECO_STOP_CON               ( ( P_AUDIO << 8 ) |  95 )
-    #define L1_SR_RECO_STOP_IND               ( ( P_AUDIO << 8 ) |  96 )
-    #define L1_SR_PROCESSING_STOP_CON         ( ( P_AUDIO << 8 ) |  97 )
+    #define L1_SR_RECO_START_CON              ( ( P_AUDIO << 8 ) |  80 )
+    #define L1_SR_RECO_STOP_CON               ( ( P_AUDIO << 8 ) |  81 )
+    #define L1_SR_RECO_STOP_IND               ( ( P_AUDIO << 8 ) |  82 )
+    #define L1_SR_PROCESSING_STOP_CON         ( ( P_AUDIO << 8 ) |  83 )
   #endif
-  #if (L1_AEC == 1)
-    #define L1_AEC_CON                        ( ( P_AUDIO << 8 ) |  98 )
-    #define L1_AEC_IND                        ( ( P_AUDIO << 8 ) |  99 )
-  #endif
-  #if (L1_AEC == 2)
-    #define L1_AQI_AEC_CON                    ( ( P_AUDIO << 8 ) |  145 )
+  #if (AEC)
+    #define L1_AEC_CON                        ( ( P_AUDIO << 8 ) |  84 )
+    #define L1_AEC_IND                        ( ( P_AUDIO << 8 ) |  85 )
   #endif
   #if (FIR)
-    #define L1_AUDIO_FIR_CON                  ( ( P_AUDIO << 8 ) | 100 )
+    #define L1_AUDIO_FIR_CON                  ( ( P_AUDIO << 8 ) |  86 )
   #endif
   #if (AUDIO_MODE)
-    #define L1_AUDIO_MODE_CON                 ( ( P_AUDIO << 8 ) | 101 )
+    #define L1_AUDIO_MODE_CON                 ( ( P_AUDIO << 8 ) |  87 )
   #endif
   #if (L1_VOICE_MEMO_AMR)
-    #define L1_VM_AMR_PLAY_START_CON          ( ( P_AUDIO << 8 ) | 102 )
-    #define L1_VM_AMR_PLAY_STOP_CON           ( ( P_AUDIO << 8 ) | 103 )
-    #define L1_VM_AMR_PAUSE_CON               ( ( P_AUDIO << 8 ) | 156 )
-    #define L1_VM_AMR_RESUME_CON              ( ( P_AUDIO << 8 ) | 157 )
-    
+    #define L1_VM_AMR_PLAY_START_CON          ( ( P_AUDIO << 8 ) |  88 )
+    #define L1_VM_AMR_PLAY_STOP_CON           ( ( P_AUDIO << 8 ) |  89 )
 
-    #define L1_VM_AMR_RECORD_START_CON        ( ( P_AUDIO << 8 ) | 104 )
-    #define L1_VM_AMR_RECORD_STOP_CON         ( ( P_AUDIO << 8 ) | 105 )
+    #define L1_VM_AMR_RECORD_START_CON        ( ( P_AUDIO << 8 ) |  90 )
+    #define L1_VM_AMR_RECORD_STOP_CON         ( ( P_AUDIO << 8 ) |  91 )
   #endif
   #if (L1_CPORT == 1)
-    #define L1_CPORT_CONFIGURE_CON            ( ( P_AUDIO << 8 ) | 106 )
-  #endif
-  #if (L1_STEREOPATH == 1)
-    #define L1_STEREOPATH_DRV_START_CON       ( ( P_AUDIO << 8 ) | 107 )
-    #define L1_STEREOPATH_DRV_STOP_CON        ( ( P_AUDIO << 8 ) | 108 )
-  #endif
-  #if (L1_ANR == 1)
-    #define L1_ANR_CON                        ( ( P_AUDIO << 8 ) | 109 )
-  #endif
-  #if (L1_IIR == 1)
-    #define L1_IIR_CON                        ( ( P_AUDIO << 8 ) | 110 )
-  #endif
-  #if (L1_DRC == 1)
-    #define L1_AQI_DRC_CON                    ( ( P_AUDIO << 8 ) | 148 )
-  #endif
-  #if (L1_LIMITER == 1)
-    #define L1_LIMITER_CON                    ( ( P_AUDIO << 8 ) | 111 )
-  #endif
-  #if (L1_ES == 1)
-    #define L1_ES_CON                         ( ( P_AUDIO << 8 ) | 112 )
-  #endif
-
-  #if (L1_VOCODER_IF_CHANGE == 1)
-    #define L1_VOCODER_CFG_ENABLE_CON        ( ( P_AUDIO << 8 ) |  129 )
-    #define L1_VOCODER_CFG_DISABLE_CON      ( ( P_AUDIO << 8 ) |  130 )
-  #endif
-
-  #if (L1_AGC_UL == 1)
-    #define L1_AQI_AGC_UL_CON                ( ( P_AUDIO << 8 ) |  141)
-  #endif
-
-  #if (L1_AGC_DL == 1)
-    #define L1_AQI_AGC_DL_CON                ( ( P_AUDIO << 8 ) |  142)
-  #endif
-
-  #if (L1_ANR == 2)
-    #define L1_AQI_ANR_CON                    ( ( P_AUDIO << 8 ) | 133 )
-  #endif
-
-  #if (L1_IIR == 2)
-    #define L1_AQI_IIR_DL_CON                   ( ( P_AUDIO << 8 ) |  136)
-  #endif
-
-  #if (L1_WCM == 1)
-    #define L1_AQI_WCM_CON                  ( ( P_AUDIO << 8 ) | 151 )
+    #define L1_CPORT_CONFIGURE_CON            ( ( P_AUDIO << 8 ) |  92 )
   #endif
 
   // Messages L1A <-> Audio background
   #if (SPEECH_RECO)
-    #define L1_SRBACK_SAVE_DATA_REQ                 ( ( P_AUDIO << 8 ) |  113 )
-    #define L1_SRBACK_SAVE_DATA_CON                 ( ( P_AUDIO << 8 ) |  114 )
-    #define L1_SRBACK_LOAD_MODEL_REQ                ( ( P_AUDIO << 8 ) |  115 )
-    #define L1_SRBACK_LOAD_MODEL_CON                ( ( P_AUDIO << 8 ) |  116 )
-    #define L1_SRBACK_TEMP_SAVE_DATA_REQ            ( ( P_AUDIO << 8 ) |  117 )
-    #define L1_SRBACK_TEMP_SAVE_DATA_CON            ( ( P_AUDIO << 8 ) |  118 )
+    #define L1_SRBACK_SAVE_DATA_REQ           ( ( P_AUDIO << 8 ) |  93 )
+    #define L1_SRBACK_SAVE_DATA_CON           ( ( P_AUDIO << 8 ) |  94 )
+    #define L1_SRBACK_LOAD_MODEL_REQ          ( ( P_AUDIO << 8 ) |  95 )
+    #define L1_SRBACK_LOAD_MODEL_CON          ( ( P_AUDIO << 8 ) |  96 )
+    #define L1_SRBACK_TEMP_SAVE_DATA_REQ      ( ( P_AUDIO << 8 ) |  97 )
+    #define L1_SRBACK_TEMP_SAVE_DATA_CON      ( ( P_AUDIO << 8 ) |  98 )
   #endif
   #if (MELODY_E2)
-    #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ   ( ( P_AUDIO << 8 ) |  119 )
-    #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON   ( ( P_AUDIO << 8 ) |  120 )
-    #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ ( ( P_AUDIO << 8 ) |  121 )
-    #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON ( ( P_AUDIO << 8 ) |  122 )
+    #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ   ( ( P_AUDIO << 8 ) |  99 )
+    #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON   ( ( P_AUDIO << 8 ) |  100 )
+    #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ ( ( P_AUDIO << 8 ) |  101 )
+    #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON ( ( P_AUDIO << 8 ) |  102 )
 
-    #define L1_MELODY0_E2_STOP_CON                  ( ( P_AUDIO << 8 ) |  123 )
-    #define L1_MELODY1_E2_STOP_CON                  ( ( P_AUDIO << 8 ) |  124 )
+    #define L1_MELODY0_E2_STOP_CON                  ( ( P_AUDIO << 8 ) |  103 )
+    #define L1_MELODY1_E2_STOP_CON                  ( ( P_AUDIO << 8 ) |  104 )
   #endif
 
   #if (OP_RIV_AUDIO == 1)
     #if (L1_AUDIO_DRIVER == 1)
-      #define L1_AUDIO_DRIVER_IND                   ( ( P_AUDIO << 8 ) |  125 )
+      #define L1_AUDIO_DRIVER_IND                 ( ( P_AUDIO << 8 ) |  105 )
     #endif
   #endif
-
-  #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1 || L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
-    #define L1_AUDIO_ONOFF_CON                      ( ( P_AUDIO << 8 ) |  126 )
-  #endif
-
 #endif // AUDIO_TASK == 1
--- a/L1/audio_include/l1audio_stereo.h	Thu Jun 09 00:53:13 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
- /************* Revision Controle System Header *************
- *                  GSM Layer 1 software
- * L1AUDIO_STEREO_H
- *
- *        Filename l1audio_stereo.h
- *  Copyright 2003 (C) Texas Instruments
- *
- ************* Revision Controle System Header *************/
-
-
-#if (L1_STEREOPATH == 1)
-  
-
-
-
-  //////////////////////////////////////////////////////
-  //              VARIABLES DEFINITIONS               //
-  //////////////////////////////////////////////////////
-
-  #if (TESTMODE && (OP_L1_STANDALONE == 1))
-
-    #define C_STP_DRV_API_BASE_ADDRESS      0x1AD0
-    #define C_STP_DRV_BUF_API_BASE_ADDRESS  0x1AD8
-    #define STEREOPATH_MAX_NB_OF_FRAMES     1152
-    #define NB_MAX_STEREOPATH_CONFIG        4
-    #define C_BGD_STP_DRV                   9
-
-    /***************************************************************************************/
-    /* AUDIO STEREOPATH MCU-DSP API                                                            */
-    /***************************************************************************************/
-    typedef struct
-    {
-      API d_cport_api_dma_install;
-      API d_cport_api_dma_channel;
-      API d_cport_api_dma_rootcause;
-    } T_STP_DRV_MCU_DSP;
-
-    #if (CODE_VERSION != SIMULATION)
-    #ifdef _L1AUDIO_STEREO_C_
-  
-      /***************************************************************************
-       *                      AUDIO_SP_MIDI_CONF configuration
-       **************************************************************************/
-      const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_midi_conf = 
-          {
-           AUDIO_SP_MIDI_CONF,       //   configuration
-           AUDIO_SP_FREQ_22,         //   sampling_frequency
-           AUDIO_SP_DMA_ALLOC_DSP,   //   DMA_allocation
-           2,                        //   DMA_channel_number
-           AUDIO_SP_DATA_S16,        //   data_type
-           AUDIO_SP_SOURCE_API,      //   source_port
-           2,                        //   element_number
-           864,                      //   frame_number
-           AUDIO_SP_STEREO_OUTPUT,   //   mono_stereo
-           AUDIO_SP_SINUS2_PATTERN   //   pattern_identifier
-          };
-
-      /***************************************************************************
-       *                      AUDIO_SP_MP3_CONF configuration
-       **************************************************************************/
-      const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_mp3_conf = 
-          {
-           AUDIO_SP_MP3_CONF,        //   configuration
-           AUDIO_SP_FREQ_48,         //   sampling_frequency
-           AUDIO_SP_DMA_ALLOC_DSP,   //   DMA_allocation
-           2,                        //   DMA_channel_number
-           AUDIO_SP_DATA_S16,        //   data_type
-           AUDIO_SP_SOURCE_API,      //   source_port
-           2,                        //   element_number
-           1152,                     //   frame_number
-           AUDIO_SP_STEREO_OUTPUT,   //   mono_stereo
-           AUDIO_SP_SINUS1_PATTERN   //   pattern_identifier
-          };
-
-      /***************************************************************************
-       *                      AUDIO_SP_EXTAUDIO_CONF configuration
-       **************************************************************************/
-
-      const T_TMODE_AUDIO_STEREOPATH_START_REQ tmode_audio_sp_extaudio_conf = 
-          {
-           AUDIO_SP_EXTAUDIO_CONF,   //   configuration
-           AUDIO_SP_FREQ_22,         //   sampling_frequency
-           AUDIO_SP_DMA_ALLOC_MCU,   //   DMA_allocation
-           2,                        //   DMA_channel_number
-           AUDIO_SP_DATA_S16,        //   data_type
-           AUDIO_SP_SOURCE_IMIF,     //   source_port
-           2,                        //   element_number
-           1100,                     //   frame_number
-           AUDIO_SP_MONO_OUTPUT,     //   mono_stereo
-           AUDIO_SP_SINUS3_PATTERN   //   pattern_identifier
-          };
-                                      
-
-      const T_TMODE_AUDIO_STEREOPATH_START_REQ * tmode_audio_sp_conf[NB_MAX_STEREOPATH_CONFIG] = {
-                          &tmode_audio_sp_midi_conf,        
-                          &tmode_audio_sp_mp3_conf,         
-                          &tmode_audio_sp_extaudio_conf,        
-                          (T_TMODE_AUDIO_STEREOPATH_START_REQ *) NULL,
-            };
-
-    #else
-       extern const T_TMODE_AUDIO_STEREOPATH_START_REQ * tmode_audio_sp_conf[NB_MAX_STEREOPATH_CONFIG];
-    #endif // _L1AUDIO_STEREO_C_
-    #endif // CODE_VERSION
-  #endif // TESTMODE
-
-  //////////////////////////////////////////////////////
-  //              CONSTANTS DEFINITIONS               //
-  //////////////////////////////////////////////////////
-
-  #define L1S_STEREOPATH_DRV_WAIT_PLL_COUNTER 3  
-
-  //////////////////////////////////////////////////////
-  //              FUNCTIONS PROTOTYPES                //
-  //////////////////////////////////////////////////////
-#if (CODE_VERSION == NOT_SIMULATION)
-  extern void l1s_stereopath_drv_config_ABB(UWORD8 mono_stereo,UWORD8 sampling_frequency);
-  extern void l1s_stereopath_drv_start_ABB(void);
-  extern void l1s_stereopath_drv_stop_ABB(void);
-#if ((CHIPSET == 12) || (CHIPSET == 15))
-  extern void l1s_stereopath_drv_start_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter,UWORD8 DMA_allocation);
-  extern void l1s_stereopath_drv_reset_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter);
-#endif
-  extern void l1s_stereopath_drv_reset_CPORT(void);
-  extern void l1s_stereopath_drv_stop_CPORT(void);
-  extern void l1s_stereopath_drv_config_CPORT(void);
-  extern void l1s_stereopath_drv_start_CPORT(void);
-
-  enum L1S_STEREOPATH_CALLBACK_CONSTANT
-  {
-    L1S_TWL3029_STEROPATH_CONFIG =10,
-    L1S_TWL3029_STEROPATH_STOP,
-    L1S_TWL3029_STEROPATH_START,
-    L1S_TWL3029_STEROPATH_OUTEN_CONFIG
-  };
-
-  //Add the call back function of the stereo path.
-  void l1s_stereopath_callback(UWORD8 cbvalue); 
-  
-#endif    // CODE_VERSION == NOT_SIMULATION
- 
-#endif /* L1_STEREOPATH == 1 */