[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6

MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF  modem version: NA

Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/interface/driver/audio/audio_cc.h b/mcu/interface/driver/audio/audio_cc.h
new file mode 100644
index 0000000..5049c05
--- /dev/null
+++ b/mcu/interface/driver/audio/audio_cc.h
@@ -0,0 +1,85 @@
+#ifndef AUDIO_CC
+#define AUDIO_CC
+
+typedef enum {
+   IRQ_L2P_TCH_NOTIFY,
+   IRQ_L2P_2G_HANDOVER,
+   IRQ_L2P_2G_AUDIOMANAGER_INFO,    
+   IRQ_L2P_D2M_L2P_NOTIFY,  
+   IRQ_L2P_BT_SCO_L2P_NOTIFY,  
+   //IRQ_SP3G_LOG_L1_INFO,
+   //IRQ_SP4G_EMAC_TIMING_UPDATE,
+}AUD_CC_IRQ_T;
+
+typedef enum {	
+	AUD_L2P_MESSAGE_BIT          = 1 << 0,	//bit 1 
+}AUD_CC_L2P_EG_MASK; //Event Group
+
+typedef enum {		
+	AUD_P2L_MESSAGE_BIT          = 1 << 0,	//bit 1 
+}AUD_CC_P2L_EG_MASK; //Event Group
+
+#define MSG_P2L_BASE 0x2E00
+#define MSG_L2P_BASE 0xAE00
+typedef enum {
+	//------------------ P2L -----------------------
+	MSG_P2L_2G_CALL_ON = MSG_P2L_BASE + 0x00,   
+	MSG_P2L_2G_CALL_OFF,
+	MSG_P2L_2G_HANDOVER,
+	MSG_P2L_3G_CALL_ON,	
+	MSG_P2L_3G_CALL_OFF,	
+	MSG_P2L_4G_CALL_ON,	
+	MSG_P2L_4G_CALL_OFF,
+	MSG_P2L_4G_G_Codec_CALL_ON, 
+	MSG_P2L_4G_G_Codec_CALL_OFF,
+	MSG_P2L_4G_EVS_Codec_CALL_ON,
+	MSG_P2L_4G_EVS_Codec_CALL_OFF,
+	MSG_P2L_C2K_CALL_ON,	
+	MSG_P2L_C2K_CALL_OFF,	
+	MSG_P2L_STANDBY_CALL_ON,  
+	MSG_P2L_STANDBY_CALL_OFF, 
+	MSG_P2L_SET_VBI_FOR_FSM,
+	MSG_P2L_AUD_RESTART_DSP,
+	MSG_P2L_AUD_NONEEDDSP,
+	MSG_P2L_L1D_AUD_CHKDSPINITDONE,
+	
+	//------------------- L2P ----------------------	
+	MSG_L2P_2G_CALL_ON_ACK = MSG_L2P_BASE,
+	MSG_L2P_2G_CALL_OFF_ACK,
+	MSG_L2P_2G_HANDOVER_ACK,
+	MSG_L2P_3G_CALL_ON_ACK,	
+	MSG_L2P_3G_CALL_OFF_ACK,	
+	MSG_L2P_4G_CALL_ON_ACK,	
+	MSG_L2P_4G_CALL_OFF_ACK,
+	MSG_L2P_4G_G_Codec_CALL_ON_ACK,
+	MSG_L2P_4G_G_Codec_CALL_OFF_ACK,
+	MSG_L2P_4G_EVS_Codec_CALL_ON_ACK,
+	MSG_L2P_4G_EVS_Codec_CALL_OFF_ACK,
+	MSG_L2P_C2K_CALL_ON_ACK,	
+	MSG_L2P_C2K_CALL_OFF_ACK,		
+	MSG_L2P_STANDBY_CALL_ON_ACK,  
+	MSG_L2P_STANDBY_CALL_OFF_ACK, 
+	MSG_L2P_SET_VBI_FOR_FSM_ACK,
+	MSG_L2P_AUD_RESTART_DSP_ACK,
+	MSG_L2P_AUD_NONEEDDSP_ACK,
+	MSG_L2P_L1D_AUD_CHKDSPINITDONE_ACK,
+	
+}AUD_CC_MSG_T;
+
+#define CC_MAX_DATA   (10)
+#define CC_BUFFER_SIZE (1 + 1 + CC_MAX_DATA)// msg id + # of 32-bit data + max # of 32-bit data
+
+// format structure
+// 32bits: MSG_ID
+// 32bits: # of 32-bit data,  # should be less than 10
+// 32-bit params
+#define CC_DUMMY_PARAM  (0)
+
+
+//L2P ILM Structure
+typedef struct{
+   LOCAL_PARA_HDR
+   kal_uint8 l1_info[2]; 
+}ilm_L2P_SP3G_UPDATE_L1_INFO;
+
+#endif
diff --git a/mcu/interface/driver/audio/audio_enum.h b/mcu/interface/driver/audio/audio_enum.h
new file mode 100644
index 0000000..123ff09
--- /dev/null
+++ b/mcu/interface/driver/audio/audio_enum.h
@@ -0,0 +1,462 @@
+/*****************************************************************************
+*  Copyright Statement:
+*  --------------------
+*  This software is protected by Copyright and the information contained
+*  herein is confidential. The software may not be copied and the information
+*  contained herein may not be used or disclosed except with the written
+*  permission of MediaTek Inc. (C) 2005
+*
+*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+*
+*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+ /*******************************************************************************
+ *  Copyright Statement:
+ *  --------------------
+ *  This software is protected by Copyright and the information contained
+ *  herein is confidential. The software may not be copied and the information
+ *  contained herein may not be used or disclosed except with the written
+ *  permission of MediaTek Inc. (C) 2001
+ *
+ *******************************************************************************/
+
+ /*******************************************************************************
+ * Filename:
+ * ---------
+ *   audio_enum.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   audio common enum
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *==============================================================================
+ * 				HISTORY
+ * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *------------------------------------------------------------------------------
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+#ifndef _L1AUDIO_COMMON_ENUM_H
+#define _L1AUDIO_COMMON_ENUM_H
+
+
+typedef enum {
+    SPC_ID_AUDIO_A2M_CCCI = 0, //MSG_ID_AUDIO_MSG_CODE_BEGIN,
+    SPC_ID_AUDIO_M2A_CCCI,
+    SPC_ID_AUDIO_STRM_PCM4WAY_DATA,
+    SPC_ID_AUDIO_STRM_PNW_UL_DATA_NOTIFY,
+    SPC_ID_AUDIO_STRM_PNW_DL_DATA_REQUEST,
+    SPC_ID_AUDIO_STRM_BGSND_DATA_REQUEST,
+    SPC_ID_AUDIO_STRM_VM_DATA_REQUEST,
+    SPC_ID_AUDIO_STRM_PCM_DATA_REQUEST,
+    SPC_ID_SPEECH_CUSTOM_DATA_REQUEST,
+
+	 // SPC_ID_AUDIO_STRM_PCMREC_DATA_NOTIFY,  removed after 93md
+	 SPC_ID_AUDIO_STRM_VMREC_DATA_NOTIFY,
+	 SPC_ID_AUDIO_STRM_CTM_DUMP_DATA_NOTIFY,
+
+	 SPC_ID_AUDIO_STRM_DACA_DL_DATA_NOTIFY, 
+	 SPC_ID_AUDIO_STRM_DACA_UL_DATA_REQUEST,
+	 
+	 SPC_ID_AUDIO_CONTROL_BGSND_CLOSE,
+	 SPC_ID_NETWORK_STATUS_NOTIFY,
+
+    SPC_ID_AUDIO_STRM_RAWPCMREC_DATA_NOTIFY,
+	SPC_ID_AUDIO_CONTROL_CTM_CLOSE,
+
+	SPC_ID_AUDIO_PCMMIXER_UL_DATA_REQUEST,
+	SPC_ID_AUDIO_PCMMIXER_DL_DATA_REQUEST,
+   SPC_ID_AUDIO_PCMMIXER3_UL_DATA_REQUEST,
+   SPC_ID_AUDIO_MAX
+} SPC_MSG_ID_T;  
+
+typedef enum {
+	SPC_MSG_FROM_CCCI = 0,
+	SPC_MSG_FROM_MED, 
+	SPC_MSG_FROM_AUDHISR, 
+	SPC_MSG_FROM_CCCI_STREAM,  
+	SPC_MSG_FROM_CCCI_STREAM_AND_SHM,
+} SPC_MSG_FROM_T;
+
+#define CCCIMSG_A2M_BASE 0x2F00
+#define CCCIMSG_M2A_BASE 0xAF00
+
+typedef enum {
+
+	//------------------ A2M -----------------------
+	MSG_A2M_SPH_DL_DIGIT_VOLUME = CCCIMSG_A2M_BASE,
+	MSG_A2M_SPH_UL_DIGIT_VOLUME,
+	MSG_A2M_MUTE_SPH_UL,
+	MSG_A2M_MUTE_SPH_DL,
+	MSG_A2M_SIDETONE_VOLUME, // remove from 93
+	MSG_A2M_SPH_DL_ENH_REF_DIGIT_VOLUME, 
+	MSG_A2M_SIDETONE_CONFIG, // remove from 93
+	MSG_A2M_MUTE_SPH_UL_ENH_RESULT,	
+	MSG_A2M_MUTE_SPH_UL_SOURCE,
+	MSG_A2M_MUTE_SPH_DL_CODEC,
+	MSG_A2M_MUTE_SPH_DL_DYNAMIC, 
+	
+	MSG_A2M_SET_SAMPLE_RATE = CCCIMSG_A2M_BASE + 0x10, // 
+	MSG_A2M_SET_DUAL_MIC, // remove from 93	
+	MSG_A2M_SET_BT_DELAY_TIME,	
+	MSG_A2M_SET_LPBK_POINT_DVT = CCCIMSG_A2M_BASE + 0x13,
+
+	MSG_A2M_SPH_ON = CCCIMSG_A2M_BASE + 0x20,
+	MSG_A2M_SPH_OFF,
+	MSG_A2M_SET_SPH_MODE, // remove from 93, but may comeback with customize 
+	MSG_A2M_CTRL_SPH_ENH, 
+	MSG_A2M_CONFIG_SPH_ENH, 
+	MSG_A2M_SET_ACOUSTIC_LOOPBACK,
+	MSG_A2M_PRINT_SPH_COEFF, // remove from 93 
+	MSG_A2M_SPH_ON_FOR_HOLD_CALL, // [Special] speech on with mute, for call hold use, no any other application can be turn on
+	MSG_A2M_SPH_ON_FOR_DACA, 
+	MSG_A2M_SPH_ROUTER_ON, // PCM wrouter on for enhancement and other application path. 	
+	MSG_A2M_SET_VOICE_ENCRYPTION, // +0x2a
+	MSG_A2M_SPH_DEV_CHANGE, // + 0x2b
+	MSG_A2M_ENH_CTRL_SUPPORT, // + 0x2C
+	
+	MSG_A2M_PNW_ON = CCCIMSG_A2M_BASE + 0x30,
+	MSG_A2M_PNW_OFF,
+	MSG_A2M_RECORD_ON, // removed from 93md
+	MSG_A2M_RECORD_OFF, // removed from 93md
+	MSG_A2M_DMNR_RECPLAY_ON, // not use in MT6582, removed from 93md
+	MSG_A2M_DMNR_RECPLAY_OFF, // not use in MT6582, removed from 93md
+	MSG_A2M_DMNR_REC_ONLY_ON, // not use in MT6582, removed from 93md
+	MSG_A2M_DMNR_REC_ONLY_OFF, // not use in MT6582, removed from 93md
+	MSG_A2M_PCM_REC_ON, // removed from 93md
+	MSG_A2M_PCM_REC_OFF, // removed from 93md
+	MSG_A2M_VM_REC_ON,
+	MSG_A2M_VM_REC_OFF,
+	MSG_A2M_RECORD_RAW_PCM_ON,  //CCCIMSG_A2M_BASE + 0x30 + 0xC
+	MSG_A2M_RECORD_RAW_PCM_OFF, //CCCIMSG_A2M_BASE + 0x30 + 0xD
+	MSG_A2M_PCMMIXER_ON,
+	MSG_A2M_PCMMIXER_OFF,
+	
+	MSG_A2M_CTM_ON = CCCIMSG_A2M_BASE + 0x40,
+	MSG_A2M_CTM_OFF,	
+	MSG_A2M_CTM_DUMP_DEBUG_FILE,
+	MSG_A2M_BGSND_ON,
+	MSG_A2M_BGSND_OFF,
+	MSG_A2M_BGSND_CONFIG,
+	MSG_A2M_RTT_CONFIG,
+	MSG_A2M_PCMMIXER_CONFIG,
+	MSG_A2M_TELEPHONY_TX_ON,
+	MSG_A2M_TELEPHONY_TX_OFF,
+	MSG_A2M_TELEPHONY_TX_CONFIG,
+	
+	MSG_A2M_PNW_DLDATA_NOTIFY = CCCIMSG_A2M_BASE + 0x50,
+	MSG_A2M_BGSND_DATA_NOTIFY,
+	MSG_A2M_CTM_DATA_NOTIFY,	
+	MSG_A2M_DACA_UL_DATA_NOTIFY,	
+	MSG_A2M_RESERVE, 
+	MSG_A2M_SPC_UL_ENC, 
+	MSG_A2M_SPC_DL_DEC,
+	MSG_A2M_PCMMIXER_DLDATA_NOTIFY, //CCCIMSG_A2M_BASE + 0x57
+	MSG_A2M_PCMMIXER_ULDATA_NOTIFY, 
+	MSG_A2M_TELEPHONY_TX_ULDATA_NOTIFY,
+
+	MSG_A2M_PNW_ULDATA_READ_ACK = CCCIMSG_A2M_BASE + 0x60,
+	MSG_A2M_REC_DATA_READ_ACK, // removed from 93md
+	MSG_A2M_CTM_DEBUG_DATA_READ_ACK,
+	MSG_A2M_PCM_REC_DATA_READ_ACK,// removed from 93md
+	MSG_A2M_VM_REC_DATA_READ_ACK,
+	MSG_A2M_DACA_DL_DATA_READ_ACK,
+	MSG_A2M_RAW_PCM_REC_DATA_READ_ACK, //CCCIMSG_A2M_BASE + 0x60 +0x6
+	MSG_A2B_CUST_DUMP_READ_ACK,
+
+	MSG_A2M_EM_DATA_REQUEST_ACK = CCCIMSG_A2M_BASE + 0x70, // not use
+	MSG_A2M_EM_INCALL, // not use after 91md
+	MSG_A2M_EM_DMNR, // not use after 91md
+	MSG_A2M_EM_WB, // not use after 91md
+	MSG_A2M_EM_MAGICON, // not use after 91md
+	MSG_A2M_NETWORK_STATUS_ACK,	
+	MSG_A2M_QUERY_RF_INFO, // remove from 93md
+	MSG_A2M_EM_HAC, // not use after 91md
+	MSG_A2M_EPOF_ACK, 
+	MSG_A2M_DYNAMIC_PAR, 
+	MSG_A2M_SPH_ENH_CORE, // for open dsp, not used in 93md 
+	MSG_A2M_DYNAMIC_PAR_IN_STRUCT_SHM, // + 0xb
+	
+	MSG_A2M_VIBSPK_PARAMETER = CCCIMSG_A2M_BASE + 0x80,
+	MSG_A2M_NXP_SMARTPA_PARAMETER, 
+
+	MSG_A2M_NW_CODEC_INFO_READ_ACK = CCCIMSG_A2M_BASE + 0x90,
+
+	MSG_A2M_AUD_ALIVE_READ_ACK = CCCIMSG_A2M_BASE + 0xa0,
+	
+	MSG_A2M_IVS_SWITCH= CCCIMSG_A2M_BASE + 0xb0,
+	MSG_A2M_PSAP_SWITCH,
+	MSG_A2M_IVS_SEND,
+	MSG_A2M_PSAP_SEND,
+	MSG_A2M_ECALL_CTL_SEQ_SWITCH,
+	MSG_A2M_ECALL_HANDSHAKE_INFO,
+	MSG_A2M_ECALL_MSD,
+	MSG_A2M_ECALL_TX_CTRL_PAR,
+	MSG_A2M_ECALL_RX_CTRL_PAR,//+b8
+	//------------------- M2A ----------------------
+	MSG_M2A_SPH_DL_DIGIT_VOLUME_ACK = CCCIMSG_M2A_BASE,
+	MSG_M2A_SPH_UL_DIGIT_VOLUME_ACK,
+	MSG_M2A_MUTE_SPH_UL_ACK,
+	MSG_M2A_MUTE_SPH_DL_ACK,
+	MSG_M2A_SIDETONE_VOLUME_ACK,
+	MSG_M2A_SPH_DL_ENH_REF_DIGIT_VOLUME_ACK,
+	MSG_M2A_SIDETONE_CONFIG_ACK,
+	MSG_M2A_MUTE_SPH_UL_ENH_RESULT_ACK,
+	MSG_M2A_MUTE_SPH_UL_SOURCE_ACK,
+	MSG_M2A_MUTE_SPH_DL_CODEC_ACK,
+	MSG_M2A_MUTE_SPH_DL_DYNAMIC_ACK,
+	
+	MSG_M2A_SET_SAMPLE_RATE_ACK = CCCIMSG_M2A_BASE + 0x10,
+	MSG_M2A_SET_DUAL_MIC_ACK,
+	MSG_M2A_SET_BT_DELAY_TIME_ACK,
+	MSG_M2A_SET_LPBK_POINT_DVT,
+	
+	MSG_M2A_SPH_ON_ACK = CCCIMSG_M2A_BASE + 0x20,
+	MSG_M2A_SPH_OFF_ACK,
+	MSG_M2A_SET_SPH_MODE_ACK,
+	MSG_M2A_CTRL_SPH_ENH_ACK,
+	MSG_M2A_CONFIG_SPH_ENH_ACK,
+	MSG_M2A_SET_ACOUSTIC_LOOPBACK_ACK,
+	MSG_M2A_PRINT_SPH_COEFF_ACK,
+	MSG_M2A_SPH_ON_FOR_HOLD_CALL_ACK, 
+	MSG_M2A_SPH_ON_FOR_DACA_ACK,
+	MSG_M2A_SPH_ROUTER_ON_ACK,
+	MSG_M2A_SET_VOICE_ENCRYPTION_ACK, // + 0x2a
+	MSG_M2A_SPH_DEV_CHANGE_ACK, // + 0x2b
+	MSG_M2A_ENH_CTRL_SUPPORT_ACK, // + 0x2C
+	
+	MSG_M2A_PNW_ON_ACK = CCCIMSG_M2A_BASE + 0x30,
+	MSG_M2A_PNW_OFF_ACK,
+	MSG_M2A_RECORD_ON_ACK,
+	MSG_M2A_RECORD_OFF_ACK,
+	MSG_M2A_DMNR_RECPLAY_ON_ACK, // not use in MT6582
+	MSG_M2A_DMNR_RECPLAY_OFF_ACK, // not use in MT6582
+	MSG_M2A_DMNR_REC_ONLY_ON_ACK, // not use in MT6582
+	MSG_M2A_DMNR_REC_ONLY_OFF_ACK, // not use in MT6582
+	MSG_M2A_PCM_REC_ON_ACK,
+	MSG_M2A_PCM_REC_OFF_ACK,
+	MSG_M2A_VM_REC_ON_ACK,
+	MSG_M2A_VM_REC_OFF_ACK,
+	MSG_M2A_RECORD_RAW_PCM_ON_ACK,  //CCCIMSG_M2A_BASE + 0x30 + 0xC
+	MSG_M2A_RECORD_RAW_PCM_OFF_ACK, //CCCIMSG_M2A_BASE + 0x30 + 0xD
+	MSG_M2A_PCMMIXER_ON_ACK,
+	MSG_M2A_PCMMIXER_OFF_ACK,
+	
+	MSG_M2A_CTM_ON_ACK = CCCIMSG_M2A_BASE + 0x40,
+	MSG_M2A_CTM_OFF_ACK,
+	MSG_M2A_CTM_DUMP_DEBUG_FILE_ACK,
+	MSG_M2A_BGSND_ON_ACK,
+	MSG_M2A_BGSND_OFF_ACK,
+	MSG_M2A_BGSND_CONFIG_ACK,
+  MSG_M2A_RTT_CONFIG_ACK,		
+	MSG_M2A_PCMMIXER_CONFIG_ACK,
+	MSG_M2A_TELEPHONY_TX_ON_ACK,
+	MSG_M2A_TELEPHONY_TX_OFF_ACK,
+	MSG_M2A_TELEPHONY_TX_CONFIG_ACK,
+	
+	MSG_M2A_PNW_DL_DATA_REQUEST = CCCIMSG_M2A_BASE + 0x50,
+	MSG_M2A_BGSND_DATA_REQUEST,
+	MSG_M2A_CTM_DATA_REQUEST,	
+	MSG_M2A_DACA_UL_DATA_REQUEST, 
+	MSG_M2A_ECALL_MSD_NOTIFY, 
+	MSG_M2A_SPC_UL_ENC_NOTIFY, 
+	MSG_M2A_SPC_DL_DEC_REQUEST,
+	MSG_M2A_PCMMIXER_DL_DATA_REQUEST, // 0x57
+	MSG_M2A_PCMMIXER_UL_DATA_REQUEST,
+	MSG_M2A_TELEPHONY_TX_UL_DATA_REQUEST,
+	
+	MSG_M2A_PNW_UL_DATA_NOTIFY = CCCIMSG_M2A_BASE + 0x60,
+	MSG_M2A_REC_DATA_NOTIFY, // removed from 93md
+	MSG_M2A_CTM_DEBUG_DATA_NOTIFY,
+	MSG_M2A_PCM_REC_DATA_NOTIFY, // removed from 93md
+	MSG_M2A_VM_REC_DATA_NOTIFY,	
+	MSG_A2M_DACA_DL_DATA_NOTIFY, 
+	MSG_M2A_RAW_PCM_REC_DATA_NOTIFY, //CCCIMSG_M2A_BASE + 0x60 + 0x6
+	MSG_M2A_CUST_DUMP_NOTIFY,
+
+	MSG_M2A_EM_DATA_REQUEST = CCCIMSG_M2A_BASE + 0x70,
+	MSG_M2A_EM_INCALL_ACK, // not use after 91md
+	MSG_M2A_EM_DMNR_ACK, // not use after 91md
+	MSG_M2A_EM_WB_ACK, // not use after 91md
+	MSG_M2A_EM_MAGICON_ACK, // not use after 91md
+	MSG_M2A_NETWORK_STATUS_NOTIFY,	
+	MSG_M2A_RF_INFO_NOTIFY,	// remove from 93md
+	MSG_M2A_EM_HAC_ACK, // not use after 91md
+	MSG_M2A_EPOF_NOTIFY,
+	MSG_M2A_DYNAMIC_PAR,	
+	MSG_M2A_SPH_ENH_CORE_ACK, // for open dsp, not used in 93md 
+	MSG_M2A_DYNAMIC_PAR_IN_STRUCT_SHM_ACK,  // + 0x7b
+
+	MSG_M2A_VIBSPK_PARAMETER_ACK = CCCIMSG_M2A_BASE + 0x80,
+	MSG_M2A_NXP_SMARTPA_PARAMETER_ACK,
+
+	MSG_M2A_NW_CODEC_INFO_NOTIFY = CCCIMSG_M2A_BASE + 0x90,
+
+	MSG_M2A_AUD_ALIVE_NOTIFY = CCCIMSG_M2A_BASE + 0xa0,
+	
+	MSG_M2A_IVS_SWITCH_ACK=CCCIMSG_M2A_BASE+0xb0,
+	MSG_M2A_PSAP_SWITCH_ACK,
+	MSG_M2A_IVS_SEND_ACK,
+	MSG_M2A_PSAP_SEND_ACK,
+	MSG_M2A_ECALL_CTL_SEQ_SWITCH,
+	MSG_M2A_ECALL_HANDSHAKE_INFO_ACK,
+	MSG_M2A_ECALL_MSD_ACK,
+	MSG_M2A_ECALL_TX_CTRL_PAR_ACK,
+	MSG_M2A_ECALL_RX_CTRL_PAR_NOTIFY,
+	
+} AUD_CCCI_MSG_T;
+
+typedef enum
+{
+    AUD_CCCI_STRMBUF_TYPE_PCM_FillSE = 0,
+    AUD_CCCI_STRMBUF_TYPE_PCM_FillSpk,
+    AUD_CCCI_STRMBUF_TYPE_PCM_GetFromMic,
+    AUD_CCCI_STRMBUF_TYPE_PCM_GetfromSD,
+    AUD_CCCI_STRMBUF_TYPE_VM_TYPE,
+    AUD_CCCI_STRMBUF_TYPE_PCM_TYPE,
+    AUD_CCCI_STRMBUF_TYPE_BGS_TYPE,
+    AUD_CCCI_STRMBUF_TYPE_EM_PARAM, //  7
+
+	AUD_CCCI_STRMBUF_TYPE_CTM_UL_IN, // 8
+    AUD_CCCI_STRMBUF_TYPE_CTM_DL_IN,
+    AUD_CCCI_STRMBUF_TYPE_CTM_UL_OUT,
+    AUD_CCCI_STRMBUF_TYPE_CTM_DL_OUT,
+    AUD_CCCI_STRMBUF_TYPE_VIBSPK_PARAM, // 12, for viberation speaker 
+    
+	AUD_CCCI_STRMBUF_TYPE_DACA_GetSpk, // 13
+	AUD_CCCI_STRMBUF_TYPE_DACA_FillMic,
+    AUD_CCCI_STRMBUF_TYPE_NXP_SMARTPA_PARAM, // 15
+
+	AUD_CCCI_STRMBUF_TYPE_MAGI_CONFERENCE_PARAM, // 16
+    AUD_CCCI_STRMBUF_TYPE_HAC_PARAM, 
+    AUD_CCCI_STRMBUF_TYPE_RAW_PCM_TYPE, //18
+    AUD_CCCI_STRMBUF_TYPE_DYNAMCI_PAR_TYPE,
+
+	AUD_CCCI_STRMBUF_TYPE_NW_CODEC_INFO, // 20
+
+	AUD_CCCI_STRMBUF_TYPE_CUST_DUMP,	
+
+	AUD_CCCI_STRMBUF_TYPE_UL_ENC,//22 
+	AUD_CCCI_STRMBUF_TYPE_DL_DEC,//23 
+	AUD_CCCI_ECALL_MSD_TYPE, //24
+	AUD_CCCI_STRMBUF_TYPE_SPH_INFO, // 25
+	AUD_CCCI_EMI_PAR_INFO, // 26
+	AUD_CCCI_STRMBUF_TYPE_PCM_MIXER_DL, //27
+  AUD_CCCI_STRMBUF_TYPE_TELEPHONYTX_UL, //28
+  AUD_CCCI_STRMBUF_TYPE_MAX_TYPE=29        
+}AUD_CCCI_STRMBUF_TYPE_T;
+
+typedef enum
+{
+
+    Vol_de_speech_unit = 0xaa01, // volume dependent speech unit 
+	Vol_in_general_unit = 0xaa02, //volume independent general unot
+	Vol_in_DMNR = 0xaa03, //DMNR
+	Vol_in_MagiClarity = 0xaa04, //MagiClarity
+	
+	Vol_in_echoRefforUsbAudio = 0xaa06, // USB audio echo reference path 
+} AUD_SPC_DYNAMIC_PARAM_MAGICNUM_T; 
+
+#endif
diff --git a/mcu/interface/driver/audio/audio_ringbuf.h b/mcu/interface/driver/audio/audio_ringbuf.h
new file mode 100644
index 0000000..0ba8a98
--- /dev/null
+++ b/mcu/interface/driver/audio/audio_ringbuf.h
@@ -0,0 +1,92 @@
+#ifndef __AUD_RINGBUF_H__
+#define __AUD_RINGBUF_H__
+
+#include "kal_public_api.h"
+
+/*
+============================================================================================================
+------------------------------------------------------------------------------------------------------------
+||                       Ring buffer handling
+------------------------------------------------------------------------------------------------------------
+============================================================================================================
+*/
+
+
+#ifndef RINGBUFFER_T
+#define RINGBUFFER_T(elemtype,size) \
+   struct \
+   { \
+      volatile kal_uint32 write; /* must be unsigned */ \
+      volatile kal_uint32 read;  /* must be unsigned */ \
+      elemtype volatile queue[size]; \
+   }
+
+#define RB_SIZE( rb ) \
+   ( sizeof( rb.queue ) / sizeof( *rb.queue ) )
+
+#define RB_MASK( rb ) \
+   ( RB_SIZE( rb ) - 1 )
+
+#define RB_INIT( rb ) \
+   ( rb.read = rb.write = 0 )
+
+#define RB_COUNT( rb ) \
+   ( rb.write - rb.read )
+
+#define RB_FULL( rb ) \
+   ( RB_COUNT( rb ) >= RB_SIZE( rb ) )
+
+#define RB_EMPTY( rb ) \
+   ( rb.write == rb.read )
+
+#define RB_PUT( rb, value ) \
+{ \
+   ASSERT( !RB_FULL( rb ) ); \
+   rb.queue[ rb.write & RB_MASK( rb ) ] = value; \
+   ++rb.write; \
+}
+
+#define RB_GET( rb, value ) \
+{ \
+   ASSERT( !RB_EMPTY( rb ) ); \
+   value = rb.queue[ rb.read & RB_MASK( rb ) ]; \
+   ++rb.read; \
+}
+
+#define RB_PEEK( rb, value ) \
+{ \
+   ASSERT( !RB_EMPTY( rb ) ); \
+   value = rb.queue[ rb.read & RB_MASK( rb ) ]; \
+}
+
+#define RB_PEEK_THROUGH( rb, idx, value ) \
+{ \
+   ASSERT( (rb.read+idx) < rb.write ); \
+   value = rb.queue[ (rb.read+idx) & RB_MASK( rb ) ]; \
+}
+
+#define RB_CONSUME( rb ) \
+{ \
+   ASSERT( !RB_EMPTY( rb ) ); \
+   ++rb.read; \
+}
+
+#define RB_UNPUT( rb, value ) \
+{ \
+   ASSERT( !RB_EMPTY( rb ) ); \
+   --rb.write; \
+   value = rb.queue[ rb.write & RB_MASK( rb ) ]; \
+}
+
+#define RB_UNGET( rb, value ) \
+{ \
+   ASSERT( !RB_FULL( rb ) ); \
+   --rb.read; \
+   rb.queue[ rb.read & RB_MASK( rb ) ] = value; \
+}
+#endif /* RINGBUFFER_T */
+
+
+
+#endif //__AUD_RINGBUF_H__
+
diff --git a/mcu/interface/driver/audio/audlp_exp.h b/mcu/interface/driver/audio/audlp_exp.h
new file mode 100644
index 0000000..d9c0b4a
--- /dev/null
+++ b/mcu/interface/driver/audio/audlp_exp.h
@@ -0,0 +1,29 @@
+
+#ifndef __AUDIO_LP_EXPORT__
+#define __AUDIO_LP_EXPORT__
+
+
+typedef enum {
+   AUDLP_OK = 0,
+   AUDLP_WARN_LAST_SEVERAL_PST,
+   AUDLP_ERR_NO_ENOUGH_PST,
+   AUDLP_ERR_FS_GET_DEVICEID,
+   AUDLP_ERR_FS_PST_API,
+   AUDLP_ERR_FS_PST_VALIDENTRY_NOTENOUGH,
+   AUDLP_ERR_XXX1
+} AUDLP_STATUS;
+
+typedef enum {
+   AUDMA_ID_MED = 0,
+   AUDMA_ID_FS = 1,
+   AUDMA_ID_NFI = 2,
+   AUDMA_ID_ECC = 3,
+   AUDMA_ID_MSDC = 4,
+   AUDMA_ID_RESERVED = 5
+} AUDMA_USER_ID;
+
+AUDLP_STATUS AUDMA_LOCK( AUDMA_USER_ID register_id);
+AUDLP_STATUS AUDMA_UNLOCK( AUDMA_USER_ID register_id);
+
+
+#endif //__AUDIO_LP_EXPORT__
diff --git a/mcu/interface/driver/audio/ddload.h b/mcu/interface/driver/audio/ddload.h
new file mode 100644
index 0000000..233301e
--- /dev/null
+++ b/mcu/interface/driver/audio/ddload.h
@@ -0,0 +1,225 @@
+/*****************************************************************************
+*  Copyright Statement:
+*  --------------------
+*  This software is protected by Copyright and the information contained
+*  herein is confidential. The software may not be copied and the information
+*  contained herein may not be used or disclosed except with the written
+*  permission of MediaTek Inc. (C) 2005
+*
+*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
+*
+*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+
+/*******************************************************************************
+ *
+ * Filename:
+ * ---------
+ * ddload.h
+ *
+ * Project:
+ * --------
+ *   MAUI
+ *
+ * Description:
+ * ------------
+ *   Dynamic Download for DSP(MT6218 and later)
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ *******************************************************************************/
+#ifndef  _DDLOAD_H_
+#define  _DDLOAD_H_
+
+typedef struct{
+   int        Dsp_Start_Addr;
+   const char *Array_Addr;
+   int        Array_Len;
+}DLL_Func;
+
+typedef struct{
+   const DLL_Func *dspFunc;
+   const char *Compressed_Array_Addr;
+   int        Compressed_Array_Len;
+}DLL_FuncCompress;
+
+typedef struct{
+   DLL_Func dll;
+   unsigned char isAlloc;
+}DLL_FuncGen;
+
+
+/* ------------------------------------------------------------------------- */
+
+#define CM_PAGE   4
+
+#if (DPCHIP_DATACARD_DSP)
+  #define CM_PAGE_TCH_DDL               8
+  #define CM_PAGE_TCH2_DDL              8
+#endif
+
+/* ------------------------------------------------------------------------- */
+#define DDID_NONE                       0
+#if (SPH_ENH_DDLOAD_TWO_PARTS) || (SPH_ENH_DDLOAD_THREE_PARTS)
+    #define DDID_TCH_COMMON             7
+#else
+    #define DDID_NOISE_REDUCTION        7
+#endif
+#define DDID_AudioHeader               24
+#define DDID_Internal_TCH2            254
+#define DDID_Internal_Header_Kernal   255
+#define DDID_SPH_TCH_1               6001     // For SPH ENH seperate into two parts
+#define DDID_SPH_TCH_2               6002     // For SPH ENH seperate into two parts
+#define DDID_SPH_TCH_3               6003     // For SPH ENH seperate into three parts
+
+/* ------------------------------------------------------------------------- */
+
+
+/* ----------------------------Speech Scheduler----------------------------- */
+
+//CM Page
+#define DDL_CM_PAGE_SPH_SCH        6
+
+//DDID
+#define DDID_SPH_SCH         21
+
+//DDID_INTERNAL for code table mapping
+#define DDID_INTERNAL_SPH_SCH    2010 
+
+/* ------------------------------------------------------------------------- */
+
+
+void _idma_load_pm_d2(unsigned short int page, unsigned short int addr, unsigned int len, const unsigned char *image);
+void FreeFuncPtr(DLL_FuncGen *dllGenPtr);
+int GetPmDllFuncPtr(unsigned int fw_id, DLL_FuncGen *dllResult);
+
+void DSP_DynamicDownload_Init( void );
+int DSP_DynamicDownload( int dsp_fw_id );
+
+/* ------------------------------------------------------------------------- */
+
+#endif  /*_DDLOAD_H_ */
+
+
diff --git a/mcu/interface/driver/audio/l1audio.h b/mcu/interface/driver/audio/l1audio.h
new file mode 100644
index 0000000..20de053
--- /dev/null
+++ b/mcu/interface/driver/audio/l1audio.h
@@ -0,0 +1,1401 @@
+/*****************************************************************************
+*  Copyright Statement:
+*  --------------------
+*  This software is protected by Copyright and the information contained
+*  herein is confidential. The software may not be copied and the information
+*  contained herein may not be used or disclosed except with the written
+*  permission of MediaTek Inc. (C) 2005
+*
+*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
+*
+*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+
+/*******************************************************************************
+ * Filename:
+ * ---------
+ *  l1audio.h
+ *
+ * Project:
+ * --------
+ *   MTK6208
+ *
+ * Description:
+ * ------------
+ *   Audio Task interface definition
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ *------------------------------------------------------------------------------
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ * removed!
+ * removed!
+ * removed!
+ *
+ *------------------------------------------------------------------------------
+ * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
+ *==============================================================================
+ *******************************************************************************/
+
+#ifndef L1AUDIO_H
+#define L1AUDIO_H
+
+
+#include "kal_general_types.h"
+#include "kal_public_defs.h"
+
+
+#define MED_STAT_AUDIO_START          200
+
+
+/* ------------------------------------------------------------------------------ */
+/*  Function ptr prototype [HAL rule]                                             */ 
+/* ------------------------------------------------------------------------------ */
+// For In Process Call
+typedef void (*in_proc_call_type)( kal_uint32 arg1, void* arg2 );
+
+typedef void*      (*fp_audio_alloc_aud_mem)(kal_uint32 size, char* file_p, long line_p);
+typedef void       (*fp_audio_free_aud_mem)(void** ptr, char* file_p, long line_p);
+typedef void       (*fp_audio_set_path_volume)(kal_uint8 audio_mode);
+typedef kal_uint8  (*fp_audio_get_active_mode)(void);
+typedef void       (*fp_send_proc_call_req)(module_type src_mod_id, in_proc_call_type func, kal_uint32 func_arg1, void *func_arg2);
+typedef kal_bool   (*fp_get_meta_data_file)(kal_wchar *filename, void *aud_info_p);
+typedef kal_bool   (*fp_get_meta_data_array)(kal_char *ptr, kal_uint32 size, void *aud_info_p);
+
+
+extern void *audio_alloc_ext_mem (kal_int32 size,char* file_p, long line_p);
+extern void *audio_alloc_ext_mem_cacheable (kal_int32 size,char* file_p, long line_p);
+extern void  audio_free_ext_mem (void **ptr,char* file_p, long line_p);
+
+#define audio_alloc_mem(size)	            audio_alloc_ext_mem(size,__FILE__,__LINE__)
+#define audio_alloc_mem_cacheable(size)   audio_alloc_ext_mem_cacheable(size,__FILE__,__LINE__)
+#define audio_free_mem(ptr)               audio_free_ext_mem(ptr,__FILE__,__LINE__)
+
+
+typedef struct {
+   fp_audio_alloc_aud_mem      alloc_mem;          
+   fp_audio_alloc_aud_mem      alloc_mem_cacheable;                                    
+   fp_audio_free_aud_mem       free_mem;  
+   fp_audio_set_path_volume    set_path_volume;
+   fp_audio_get_active_mode    get_active_mode; 
+   fp_send_proc_call_req       send_proc_call;
+   fp_send_proc_call_req       send_proc_call2;
+   fp_get_meta_data_file       get_meta_file;
+   fp_get_meta_data_array      get_meta_array;
+} Media_Func_Reg_Type;
+
+void  Audio_MedFuncReg(Media_Func_Reg_Type *func);
+
+typedef void       (*fp_a2dp_set_br_from_qos_init)(kal_uint32 bit_rate_cur);
+typedef kal_uint32 (*fp_a2dp_set_br_from_qos)(kal_uint8 qos, kal_uint32 bit_rate_prev, kal_uint32 (*SetCodecBitRate)(kal_uint32));
+
+
+/* ------------------------------------------------------------------------------ */
+/*  Audio memory allocation.                                                      */
+/* ------------------------------------------------------------------------------ */
+//for new tone interface, MD-DSP and MD-MCU can generate tone at the same time.
+#define  MAX_AUDIO_FUNCTIONS     25
+
+/* ------------------------------------------------------------------------------ */
+/*  Audio Function Definition                                                     */
+/* ------------------------------------------------------------------------------ */
+#define  L1SP_KEYTONE         0
+#define  L1SP_TONE            1
+#define  L1SP_SPEECH          2
+#define  L1SP_SND_EFFECT      3
+#define  L1SP_AUDIO           4
+#define  L1SP_VOICE           5
+#define  L1SP_DAI             6
+#define  L1SP_LINEIN          7
+#define  L1SP_MAX_AUDIO       8
+
+#define  SRC_VOICE_DAC        0
+#define  SRC_AUDIO_DAC        1
+#define  SRC_EXT_INPUT        2
+
+
+#define  INVALID_AUDIO_ID        MAX_AUDIO_FUNCTIONS
+
+typedef  void  (*L1Audio_EventHandler)(void*);
+
+// kal_int8 L1Audio_Disable_DSPSlowIdle(void);
+// kal_int8 L1Audio_Enable_DSPSlowIdle(void);
+
+// void        L1Audio_SendILM(kal_uint16 msg_id, module_type src_module, module_type dst_module, void *local_param_ptr, void *peer_buf_ptr);
+kal_uint16  L1Audio_GetAudioID( void );
+void        L1Audio_FreeAudioID( kal_uint16 aud_id );
+kal_bool    L1Audio_CheckAudioID( kal_uint16 audio_id );
+void        L1Audio_SetEventHandler( kal_uint16 audio_id, L1Audio_EventHandler handler );
+void        L1Audio_SetEvent( kal_uint16 audio_id, void *data );
+void        L1Audio_LSetEvent( kal_uint16 audio_id, void *data );
+kal_bool    L1Audio_CheckFlag( kal_uint16 audio_id );
+void        L1Audio_SetFlag( kal_uint16 audio_id );
+void        L1Audio_ClearFlag( kal_uint16 audio_id );
+void        L1Audio_AllowSleep( kal_uint16 audio_id );
+void        L1Audio_DisallowSleep( kal_uint16 audio_id );
+void        L1Audio_HookHisrHandler( kal_uint16 magic_no, L1Audio_EventHandler handler, void *userData );
+void        L1Audio_UnhookHisrHandler( kal_uint16 magic_no );
+// void        L1Audio_SetPostHisrHandler( L1Audio_EventHandler handler );
+// void        L1Audio_ResetPostHisrHandler( void );
+
+void        L1Audio_ResetDevice( void );
+
+void        L1Audio_SetDebugInfoN( kal_uint16 index, kal_uint16 debug_info );
+
+#define  NUM_DEBUG_INFO      16
+#define  VM_DEBUG_INFO       0
+#define  VOIPEVL_DEBUG_INFO  1
+#define  AMR_REC_DEBUG_INFO  2
+#define  AWB_REC_DEBUG_INFO  3
+#define  APM_DEBUG_INFO      4
+#define  STEREO_RECORD_INFO  5
+#define  AUDIO_DEBUG_MISC    6  // factory mode audio debug parameter 6
+#define  CTM_DEBUG_INFO      7
+#define  AVB_DEBUG_INFO      8
+
+
+void        L1Audio_SetDebugInfo( kal_uint16 debug_info[NUM_DEBUG_INFO]);
+kal_uint16  L1Audio_GetDebugInfo( kal_uint8 index );
+/* ------------------------------------------------------------------------------ */
+/*  Audio Front End Interface                                                     */
+/* ------------------------------------------------------------------------------ */
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif 
+
+/* ------------------------------------------------------------------------------ */
+/*  Audio Related Global Variables                                                */
+/* ------------------------------------------------------------------------------ */
+extern const signed short     Speech_Input_FIR_Coeff[6][45];
+extern const signed short     Speech_Output_FIR_Coeff[6][45];
+extern const signed short     WB_Speech_Input_FIR_Coeff[6][90];
+extern const signed short     WB_Speech_Output_FIR_Coeff[6][90];
+
+
+// extern const unsigned short   Media_Playback_Maximum_Swing;
+// extern const signed short     Melody_FIR[25];
+
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif
+/* ------------------------------------------------------------------------------ */
+/*  Key Tone Interface                                                            */
+/* ------------------------------------------------------------------------------ */
+typedef enum {
+  DSP_TONE = 0,
+  MCU_TONE,
+  TOTAL_TONE_NUM
+}TONE_TYPE;
+
+void  KT_SetOutputDevice( kal_uint8 device );
+void  KT_SetOutputVolume( kal_uint8 volume1, kal_int8 digital_gain_index );
+void  KT_Play( kal_uint16 freq1, kal_uint16 freq2, kal_uint16 duration, TONE_TYPE type);
+void  KT_Stop( TONE_TYPE type );
+void  KT_StopAndWait(void);
+void  KT_SetAmplitude( kal_int16 amp );
+void  KT_SetFIR( kal_bool enable );
+kal_bool KT_IsPlayable(void);
+
+/* ------------------------------------------------------------------------------ */
+/*  Tone Interface                                                                */
+/* ------------------------------------------------------------------------------ */
+typedef struct {
+   kal_uint16   freq1;         /* First frequency                              */
+   kal_uint16   freq2;         /* Second frequency                             */
+   kal_uint16   on_duration;   /* Tone on duation(ms), 0 for continuous tone   */
+   kal_uint16   off_duration;  /* Tone off duation(ms), 0 for end of playing   */
+   kal_int8     next_tone;     /* Index of the next tone                       */
+} L1SP_Tones;
+
+typedef struct {
+   kal_uint16   freq1;         /* First frequency                              */
+   kal_uint16   freq2;         /* Second frequency                             */
+   kal_uint16   on_duration;   /* Tone on duation(ms), 0 for continuous tone   */
+   kal_uint16   off_duration;  /* Tone off duation(ms), 0 for end of playing   */
+   kal_int8     next_tone;     /* Index of the next tone                       */
+   kal_uint16   freq3;         /* Third frequency                              */
+   kal_uint16   freq4;         /* Fourth frequency                             */
+} L1SP_QTMF;
+
+/* -------------------------------- */
+/*  Example of Tone Definition      */
+/* -------------------------------- */
+/*
+static const L1SP_Tones tone1_gsm[] = { { 425,   0,   0,   0,   0 } };
+static const L1SP_Tones tone1_pcs[] = { { 350, 440,   0,   0,   0 } };
+static const L1SP_Tones tone2_gsm[] = { { 425,   0, 500, 500,   0 } };
+static const L1SP_Tones tone2_pcs[] = { { 480, 620, 500, 500,   0 } };
+static const L1SP_Tones tone3_gsm[] = { { 425,   0, 200, 200,   0 } };
+static const L1SP_Tones tone3_pcs[] = { { 480, 620, 200, 200,   0 } };
+static const L1SP_Tones tone4[]     = { { 425,   0, 200,   0,   0 } };
+static const L1SP_Tones tone5[]     = { { 425,   0, 200, 200,   1 },
+                                        { 425,   0, 200, 200,   2 },
+                                        { 425,   0, 200,   0,   0 } };
+static const L1SP_Tones tone61[]    = { { 950,   0, 330,1000,   0 } };
+static const L1SP_Tones tone62[]    = { {1400,   0, 330,1000,   0 } };
+static const L1SP_Tones tone63[]    = { {1800,   0, 330,1000,   0 } };
+static const L1SP_Tones tone7[]     = { { 425,   0, 200, 600,   1 },
+                                        { 425,   0, 200,3000,   2 },
+                                        { 425,   0, 200, 600,   3 },
+                                        { 425,   0, 200,   0,   0 } };
+*/
+
+void  TONE_SetOutputDevice( kal_uint8 device );
+void  TONE_SetOutputVolume( kal_uint8 volume1, kal_int8 digital_gain_index );
+void  TONE_Play( const L1SP_Tones *tonelist, TONE_TYPE type );
+void  TONE_Stop( TONE_TYPE type );
+void  TONE_StopAndWait( void );
+void  TONE_SetAmplitude( kal_int16 amp );
+void  TONE_SetFIR( kal_bool enable );
+void  TONE_SetHandler( void (*handler)(void), TONE_TYPE type );
+void  TONE_PlayQTMF( const L1SP_QTMF *tonelist ); /* QTMF Play Interface */
+
+void  SP4G_PSR_DL_KT_Play(kal_int16 freq1, kal_int16 freq2, kal_int16 duration);
+void  SP4G_PSR_DL_KT_Stop( void );
+void  SP4G_PSR_UL_KT_Play(kal_int16 freq1, kal_int16 freq2, kal_int16 duration);
+void  SP4G_PSR_UL_KT_Stop( void );
+
+void  SP4G_PSR_UL_Tone_Play(const L1SP_Tones *pToneList );
+void  SP4G_PSR_UL_Tone_Stop( void );
+void  SP4G_PSR_DL_Tone_Play(const L1SP_Tones *pToneList );
+void  SP4G_PSR_DL_Tone_Stop( void );
+
+/* ------------------------------------------------------------------------------ */
+/*  Speech Interface                                                              */
+/* ------------------------------------------------------------------------------ */
+ typedef enum {
+  L1SP_NVRAM_INFO_INDEX_UNDEF = 0,
+  L1SP_NVRAM_INFO_INDEX_PARAM,
+  L1SP_NVRAM_INFO_INDEX_WB_SPEECH_INPUT_FIR,
+  L1SP_NVRAM_INFO_INDEX_WB_SPEECH_OUTPUT_FIR,
+  L1SP_NVRAM_INFO_INDEX_WB_SPEECH_MODE_PARAM,
+  L1SP_NVRAM_INFO_INDEX_HD_RECORD,  
+} L1SP_NVRAM_INFO_INDEX;
+
+void        L1SP_SetNvramInfoByIndex(L1SP_NVRAM_INFO_INDEX index,kal_uint8* buffer, kal_uint16 len);
+
+void        L1SP_SetOutputDevice( kal_uint8 device );
+void        L1SP_SetOutputVolume( kal_uint8 volume1, kal_int8 digital_gain_index );
+void        L1SP_Speech_On( kal_uint8 RAT_Mode );
+void        L1SP_Speech_Off( void );
+void        L1SP_SetInputSource( kal_uint8 src );
+kal_uint8   L1SP_GetInputSource( void );
+void        L1SP_SetMicrophoneVolume( kal_uint8 mic_volume );
+kal_uint8   L1SP_GetMicrophoneVolume( void );
+void        L1SP_MuteSpeaker( kal_bool mute );
+void        L1SP_MutePCMOuputPort ( kal_bool fMute );
+void        L1SP_SetSidetoneVolume( kal_uint8 sidetone );
+kal_uint8   L1SP_GetSidetoneVolume( void );
+void        L1SP_MuteMicrophone( kal_bool mute );
+kal_bool    L1SP_IsMicrophoneMuted( void );
+void        L1SP_SetFIR( kal_bool enable );
+void        L1SP_Set_DAI_Mode( kal_uint8 mode );
+// void        l1sp_Write_Audio_Coefficients( const kal_int16 in_coeff[30], const kal_int16 out_coeff[30] );
+// void L1SP_Write_Audio_Coefficients_ByFirIndex( const kal_uint8 inOrOut2FirIndex, const kal_uint8 outFirIndex); 
+
+void        L1SP_SetAfeLoopback( kal_bool enable );
+
+kal_bool    L1SP_IsBluetoothOn( void );
+kal_bool    L1SP_IsSpeechOn( void );
+// void        L1SP_EnableSpeechEnhancement( kal_bool enable );
+#define     FIRST_MIC (0)
+
+// void        l1sp_Write_WB_Audio_Coefficients( const kal_int16 in_coeff[90], const kal_int16 out_coeff[90] );
+// void        L1SP_UpdateSpeechPara(kal_uint16 sph_m_para[16] );//NUM_MAX_MODE_PARAS
+void        L1SP_LoadSpeechPara( void );
+
+
+#define     NUM_DMNR_PARAM (44)
+#define     NUM_WB_DMNR_PARAM (76)
+#define     NUM_SWB_DMNR_PARAM (120)
+#define     NUM_ABF_PARAM  (44)
+#define     NUM_MAGI_CLARITY_PARAM (32)
+void        L1SP_SetDMNRPara( const kal_int16 DMNR_para[NUM_DMNR_PARAM] );
+void        L1SP_SetLSpkDMNRPara( const kal_int16 LSpk_DMNR_para[NUM_DMNR_PARAM] );
+void        L1SP_SetWbDMNRPara( const kal_int16 WB_DMNR_para[NUM_WB_DMNR_PARAM] );
+void        L1SP_SetSWbDMNRPara( const kal_int16 SWB_DMNR_para[NUM_SWB_DMNR_PARAM] );
+void        L1SP_SetLSpkWbDMNRPara( const kal_int16 LSpk_Wb_DMNR_para[NUM_WB_DMNR_PARAM] );
+void        L1SP_SetLSpkSWbDMNRPara( const kal_int16 LSpk_SWb_DMNR_para[NUM_SWB_DMNR_PARAM] );
+
+/* -------------------------------e-call modem ---------------------------------------- */
+// eCall modem interface
+typedef enum {
+   eCALL_OPERATION_SUCCESS,
+   eCALL_OPERATION_FAIL,
+   eCALL_OPERATION_ALREADY_OPEN,
+   eCALL_OPERATION_ALREADY_CLOSE,
+   eCALL_OPERATION_DURING_TRANSMISSION,
+   eCALL_OPERATION_STOP
+} eCall_Modem_Status;
+
+typedef enum {
+   eCALL_EVENT_SEND_START,
+   eCALL_EVENT_RECV_START,
+   eCALL_EVENT_RECV_NACK,
+   eCALL_EVENT_RECV_LL_ACK,
+   eCALL_EVENT_RECV_HL_ACK_CORRECT,
+   eCALL_EVENT_RECV_HL_ACK_MISMATCH,
+   eCALL_EVENT_PSAP_RECV_MSD
+} eCall_Modem_Event;
+
+typedef void (*eCall_Callback)(eCall_Modem_Event event, void *param);
+void eCall_Init(void);
+eCall_Modem_Status eCall_IVS_Open(eCall_Callback handler);
+eCall_Modem_Status eCall_IVS_Close(void);
+eCall_Modem_Status eCall_IVS_PutMSD(const kal_uint8 *pMSD, const kal_uint32 uLen, kal_uint8 from);
+eCall_Modem_Status eCall_IVS_SendStart(void);
+eCall_Modem_Status eCall_PSAP_Open(eCall_Callback handler);
+eCall_Modem_Status eCall_PSAP_Close(void);
+eCall_Modem_Status eCall_PSAP_SendStart(void);
+void Set_eCall_Par_Crtl_Switch(kal_uint8 Switch);
+
+
+/* ------------------------------------------------------------------------------ */
+
+
+/*******************************************************************/
+/*   The new interface for DSP speech enhancement function / Bluetooth */
+/*******************************************************************/
+#define SPH_MODE_NORMAL  0
+#define SPH_MODE_EARPHONE  1
+#define SPH_MODE_LOUDSPK  2
+#define SPH_MODE_BT_EARPHONE 3
+#define SPH_MODE_BT_CORDLESS 4
+#define SPH_MODE_BT_CARKIT   5
+#define SPH_MODE_AUX1  6
+#define SPH_MODE_AUX2  7
+#define SPH_MODE_HAC   8
+#define SPH_MODE_USB   9
+#define SPH_MODE_LINEIN_VIA_BT_CORDLESS 10
+#define SPH_MODE_UNDEFINED  11
+
+#define NUM_SPH_MODE      8
+#define NUM_SPH_INPUT_FIR  6
+#define NUM_SPH_OUTPUT_FIR 6
+
+#define SPH_FIR_COEFF_NORMAL           0
+#define SPH_FIR_COEFF_HEADSET          1
+#define SPH_FIR_COEFF_HANDFREE         2
+#define SPH_FIR_COEFF_BT               3
+#define SPH_FIR_COEFF_VOIP_NORMAL      4
+#define SPH_FIR_COEFF_VOIP_HANDFREE    5
+#define SPH_FIR_COEFF_HAC              6
+#define SPH_FIR_COEFF_USB              7
+
+
+
+#define NUM_COMMON_PARAS  12
+
+
+
+#define NUM_MODE_PARAS 48
+
+#define NUM_VOL_PARAS     4
+
+#define NUM_FIR_COEFFS    90
+#define NUM_WB_FIR_COEFFS    90
+#define NUM_SWB_FIR_COEFFS   90
+#define NUM_IIR_COEFFS       42
+#define NUM_MIC1_IIR_COEFFS  20
+#define NUM_MIC2_IIR_COEFFS  20
+
+#define TOTAL_NETWORK_NUMBER 5 //GSM WCDMA CDMA VOLTE 
+
+/* ------------------------------------------------------------------------------ */
+/*  Network defined for audio tuning tool                                                          */
+/* ------------------------------------------------------------------------------ */
+#define NETWORK_GSM     0 
+#define NETWORK_WCDMA_TDD   1
+#define NETWORK_WCDMA_FDD   2
+#define NETWORK_VOLTE   3
+#define NETWORK_C2K     4
+#define NETWORK_3GVT    5
+#define NETWORK_VILTE   6
+#define NETWORK_VOWIFI  7
+#define NETWORK_VIWIFI  8
+
+
+void L1SP_LoadCommonSpeechPara( kal_uint16 c_para[NUM_COMMON_PARAS] );
+
+// void L1SP_SetSpeechVolumeLevel( kal_uint8 level, kal_uint16 v_para[NUM_VOL_PARAS] );
+// kal_uint8 L1SP_GetSpeechMode( void );
+
+/**
+	this function is to replace L1SP_SetSpeechVolumeLevel()
+	
+	@level: [input] speech volume level for speech
+	@v_paraIndex: [input] volume paramter (saving in nvram) index
+*/
+void L1SP_SetSpeechVolumeLevelByIndex(kal_uint8 level, kal_uint8 v_paraIndex);
+
+typedef enum {
+	SPH_ENH_AND_FIR_SCENE_NORMAL = 0, //from 0 to 8, it is one to one mapping to speech mode. ie. SPH_MODE_NORMAL to SPH_MODE_LINEIN_VIA_BT_CORDLESS
+	SPH_ENH_AND_FIR_SCENE_EARPHONE,
+	SPH_ENH_AND_FIR_SCENE_LOUDSPK,
+	SPH_ENH_AND_FIR_SCENE_BT_EARPHONE,
+	SPH_ENH_AND_FIR_SCENE_BT_CORDLESS,
+	SPH_ENH_AND_FIR_SCENE_BT_CARKIT, 
+	SPH_ENH_AND_FIR_SCENE_AUX1,
+	SPH_ENH_AND_FIR_SCENE_AUX2,
+	SPH_ENH_AND_FIR_SCENE_HAC,
+	SPH_ENH_AND_FIR_SCENE_USB,
+    
+	SPH_ENH_AND_FIR_SCENE_UNDEF = 0xFFFF,  
+} SPH_ENH_AND_FIR_SCENE;
+
+typedef enum {
+	SPH_ENH_AND_FIR_UPDATE_TYPE_ALL = 0,
+	SPH_ENH_AND_FIR_UPDATE_TYPE_NB_ENH_MODE = 0x2,
+	SPH_ENH_AND_FIR_UPDATE_TYPE_NB_FIR = 0x4,	
+	SPH_ENH_AND_FIR_UPDATE_TYPE_WB_ENH_MODE = 0x8,
+	SPH_ENH_AND_FIR_UPDATE_TYPE_WB_FIR = 0x10,
+	
+} SPH_ENH_AND_FIR_UPDATE_TYPE;
+
+/**
+	new interface to replace L1SP_SetSpeechMode(), L1SP_Write_Audio_Coefficients(), 
+	L1SP_Write_WB_Audio_Coefficients() in the same time. 
+
+	if you want to use personal configuration, you can use original interfaces. 
+
+	@scene: [Input] scenario for different enhancement and fir combination. Please refer to "SPH_ENH_AND_FIR_SCENE"
+	@updatedCoeff: [Input] Please refer to "SPH_ENH_AND_FIR_UPDATE_TYPE"
+*/
+void L1SP_SetSpeechEnhanceAndFir(kal_uint32 scene, kal_uint32 updatedCoeff);
+
+/**
+	MED can get nvram values from this function.
+	
+	@index: [Input] Identify which LID is going to provide
+	@buffer: [Output] Buffer with the contain the result
+	@len: [Input] Length of the output buffer
+*/
+void L1SP_GetNvramInfoByIndex(L1SP_NVRAM_INFO_INDEX index, void *buffer, kal_uint16 len);
+#define LEN_OF_ENHANCEMENT_MODE_NAME 30
+
+#define LEN_OF_ENHANCEMENT_CATEGORY_NAME 20
+/**
+	user: should be META only
+	(realted to customer folder)
+	
+	@return: number of all enhancement category
+*/
+kal_int16 L1SP_GetNumOfAllEnhancementCategory(void);
+
+
+
+typedef struct {
+   kal_uint32      fc_format;
+   kal_uint8       *rb_base;         // Pointer to the ring buffer
+   kal_int32       rb_size;          // Size of the ring buffer
+   kal_int32       write;
+   kal_int32       read;
+   void            *param;           // Extend parameter or information
+   kal_uint8       fc_operation;
+} AUD_RB_INFO;
+
+// void          Media_MuteSpeaker( kal_bool mute );
+// void  Media_SetMelodyFilter( kal_uint16 len, const kal_int16 *filter );
+/* ------------------------------------------------------------------------------ */
+// L1CTM interface 
+/*
+// Due to CTM is not use in the outside, so mode the interface in to ctm_drv.h to prevent redeclaration
+typedef enum{
+   DIRECT_MODE,
+   BAUDOT_MODE       
+} L1Ctm_Interface; 
+
+typedef enum{
+   CTM_MO_SUCCESS,
+   CTM_MO_FAIL, 
+   CTM_MT_DETECTED, 
+   CTM_CHAR_SENT, 
+   CTM_CHAR_RECEIVED,
+   CTM_TX_BURST_START,
+   CTM_TX_BURST_END   
+} L1Ctm_Event; 
+
+typedef struct
+{
+    kal_int16   cprm_tone_demod_down_samp;                  // 1 (0, 1)   
+} CTM_Param;
+
+typedef void (*L1Ctm_Callback)(L1Ctm_Event , void*); 
+kal_uint32 L1Ctm_GetMemReq(void);
+void L1Ctm_Open(L1Ctm_Interface a, L1Ctm_Callback handler, kal_uint8 *buf, kal_uint32 buf_len, CTM_Param *ctm_param);
+void L1Ctm_Close(void);
+void L1Ctm_StartNegotiation(void);
+kal_uint32 L1Ctm_TxPutText(const kal_uint8 *text, kal_uint32 len, kal_uint32 *left_space);
+kal_uint32 L1Ctm_RxGetText(kal_uint8 *text, kal_uint32 len, kal_uint32 *left_count);
+*/
+
+
+kal_bool BT_PcmLoopbackTest(void);
+
+/* Ket tone detection interface*/
+void KtDetectStart(void (*callback)(kal_int16 key));
+void KtDetectStop( void );
+
+typedef enum {
+  L1SP_L4C_NONE       = 0x0000, 
+  L1SP_L4C_QCELP13K   = 0x0001, 
+  L1SP_L4C_EVRC       = 0x0002, 
+  L1SP_L4C_EVRC_B     = 0x0003, 
+  L1SP_L4C_EVRC_WB    = 0x0004, 
+  L1SP_L4C_EVRC_NW    = 0x0005, 
+  L1SP_L4C_AMR_NB     = 0x0006, 
+  L1SP_L4C_AMR_WB     = 0x0007, 
+  L1SP_L4C_GSM_EFR    = 0x0008, 
+  L1SP_L4C_GSM_FR     = 0x0009, 
+  L1SP_L4C_GSM_HR     = 0x000A, 
+  
+  L1SP_L4C_EVS_NB     = 0x0017, 
+  L1SP_L4C_EVS_WB     = 0x0018, 
+  L1SP_L4C_EVS_SW     = 0x0019, 
+  L1SP_L4C_EVS_FB     = 0x0020, 
+  L1SP_L4C_EVS_AWB    = 0x0021, 
+} L1SP_L4C_Codec;
+
+typedef enum {
+   L1SP_C2K_LINK_ESTABLISH,
+   L1SP_C2K_LINK_DEESTABLISH,
+   L1SP_C2K_LINK_INTRARAT,
+} L1SP_C2K_Event;
+
+typedef enum {
+   L1SP_L4C_ESPEECH_0,
+   L1SP_L4C_ESPEECH_1,
+   L1SP_L4C_START_GENERATE_SID,
+   L1SP_L4C_STOP_GENERATE_SID,
+} L1SP_L4C_Event;
+
+typedef enum {
+   L1SP_L4C_EVENT_NONE,
+   L1SP_L4C_EVENT_CS,
+   L1SP_L4C_EVENT_PS,   
+} L1SP_L4C_Event_Mode;
+
+void SP_L4C_SetEvent(L1SP_L4C_Event event, L1SP_L4C_Event_Mode mode);
+
+//L5ECALL
+#if defined(__ECALL_SUPPORT__)
+#if defined(__L5_SUPPORT__)
+typedef enum {
+   L1SP_L5ECALL_INITIAL,
+   L1SP_L5ECALL_UPDATE_MSD,
+   L1SP_L5ECALL_RESET,
+} L1SP_L5ECALL_Event;
+
+void SP_L5ECALL_SetEvent(L1SP_L5ECALL_Event event, kal_uint8 *data);
+
+typedef struct {
+   LOCAL_PARA_HDR
+   kal_uint16 Status;
+   kal_uint32 Data;
+}ilm_SP_L5ECALL_Status_INFO_t;
+#endif 
+#endif 
+/*====================start of 3G interface ===================*/
+//[REMIND] The following definition is related to L1SP_STATE_2G_SPEECH_ON, please use L1SP_GetState() to search the relationship
+#define RAT_2G_MODE  0
+#define RAT_3G_MODE  1 
+#define RAT_3G324M_MODE 2
+#define RAT_4G_MODE  3
+#define RAT_C2K_MODE  4
+#define RAT_NONE_MODE 0xF
+
+typedef enum {
+   SP3G_CODEC_READY,
+   SP3G_CODEC_CLOSED,
+   SP3G_UL_DATA_NOTIFY,
+   SP3G_UL_DATA_DEALY_TICK
+} SP3G_Event;
+
+void SP3G_Request(void);
+void SP3G_UL_SetFrameType(kal_uint8 amr_frame_type);
+void SP3G_UL_GetSpeechFrame(kal_uint16*frame_index, kal_uint8 *frame_type, kal_uint8 *rab_byte_array, kal_uint8 *len);
+void SP3G_DL_PutSpeechFrame(kal_uint32 CFN, kal_uint8 sub_flow_id, kal_uint8 frame_type, kal_bool crc_status, kal_uint8 *subflow);
+void SP3G_Closed_Confirm( void );
+void SP3G_Rab_Deest( void );
+void SP3G_Rab_Est( kal_uint32 rab_id, kal_uint8 default_speech_codec ); //Cosine_NAS_Sync_Ind
+void SP3G_SetDTX(kal_bool on);
+//void SP3GVT_DL_PutSpeechFrame(kal_uint8 *dl_data, kal_uint32 size, kal_bool error_flag);
+kal_uint8 SP3GVT_DL_PutSpeechFrame(kal_uint8 *dl_data, kal_uint32 size, kal_bool error_flag, kal_uint8 *dl_frame_number);
+kal_uint8 SP3GVT_DL_DropSpeechFrame(kal_uint32 number, kal_uint8 *dl_frame_number);
+void SP3GVT_UL_GetSpeechFrame(kal_uint8 *ul_data, kal_uint32 ul_space, kal_uint32 *size);
+void SP3GVT_SetDelayValue(kal_uint32 delay);
+void SP3G_UpdateL1AInFo( kal_uint8 bitmap, kal_uint8 value );
+/*====================end of 3G interface =====================*/
+
+/* ------------------------------------------------------------------------------ */
+typedef enum {
+   SP4G_CODEC_READY,
+   SP4G_CODEC_CLOSED,
+   SP4G_UL_DATA_NOTIFY,
+   SP4G_UL_MUTE_NOTIFY,
+   SP4G_UL_DATA_DEALY_TICK,
+   SP4G_DL_DATA_NOTIFY,
+   SP4G_DL_MUTE_NOTIFY,
+   SP4G_DL_DATA_DEALY_TICK
+} SP4G_Event;
+
+typedef enum{
+   SP4G_PSR_AMR,
+   SP4G_PSR_WBAMR,
+   SP4G_PSR_G711,
+   SP4G_PSR_G722,   
+   SP4G_PSR_G723_1,
+   SP4G_PSR_G726,
+   SP4G_PSR_G729,
+   SP4G_PSR_EVS_NB,
+   SP4G_PSR_EVS_WB,
+   SP4G_PSR_EVS_SWB,
+   SP4G_PSR_EVS_FB,
+   SP4G_PSR_EVS_WBAMR,
+}SP4G_PSR_Codec;
+
+#define SP4G_CODEC_ID_BITSHIFT          (0x4)
+#define SP4G_CODEC_NON_EVS_ID_MASK              (0xF0)
+#define SP4G_CODEC_AMR_ID                       (0x00)
+#define SP4G_CODEC_AMR_WB_ID          	 	(0x10)
+#define SP4G_CODEC_AMR_WB_LOST_FRAME_ID 	(0x40)
+#define SP4G_CODEC_GSERISE_ID          		(0x60)
+
+#define SP4G_CODEC_EVS_ID_MASK          (0xC0)
+#define SP4G_CODEC_EVS_SAMPLE_RATE_MASK (0x30)
+#define SP4G_CODEC_EVS_CODEC_RATE_MASK  (0x0F)
+
+#define SP4G_CODEC_EVS_ID           (0x80)
+#define SP4G_CODEC_EVS_AWB_ID       (0xC0)
+
+#define SP4G_CODEC_EVS_BW_BITSHIFT  (0x4)
+#define SP4G_CODEC_EVS_08K          (0x00)
+#define SP4G_CODEC_EVS_16K          (0x10)
+#define SP4G_CODEC_EVS_32K          (0x20)
+#define SP4G_CODEC_EVS_48K          (0x30)
+
+#define SP4G_CODEC_EVS_005_9        (0x00)
+#define SP4G_CODEC_EVS_002_8        (0x00)
+#define SP4G_CODEC_EVS_007_2        (0x01)
+#define SP4G_CODEC_EVS_008_0        (0x02)
+#define SP4G_CODEC_EVS_009_6        (0x03)
+#define SP4G_CODEC_EVS_013_2        (0x04)
+#define SP4G_CODEC_EVS_016_4        (0x05)
+#define SP4G_CODEC_EVS_024_4        (0x06)
+#define SP4G_CODEC_EVS_032_0        (0x07)
+#define SP4G_CODEC_EVS_048_0        (0x08)
+#define SP4G_CODEC_EVS_064_0        (0x09)
+#define SP4G_CODEC_EVS_096_0        (0x0A)
+#define SP4G_CODEC_EVS_128_0        (0x0B)
+#define SP4G_CODEC_EVS_002_4_SID    (0x0C)
+#define SP4G_CODEC_EVS_000_0_REV    (0x0D)
+#define SP4G_CODEC_EVS_000_0_LOST   (0x0E)
+#define SP4G_CODEC_EVS_000_0_NODATA (0x0F)
+
+#define SP4G_CODEC_EVS_AWB_RATE_06_60        (0x00)
+#define SP4G_CODEC_EVS_AWB_RATE_08_85        (0x01)
+#define SP4G_CODEC_EVS_AWB_RATE_12_65        (0x02)
+#define SP4G_CODEC_EVS_AWB_RATE_14_25        (0x03)
+#define SP4G_CODEC_EVS_AWB_RATE_15_85        (0x04)
+#define SP4G_CODEC_EVS_AWB_RATE_18_25        (0x05)
+#define SP4G_CODEC_EVS_AWB_RATE_19_85        (0x06)
+#define SP4G_CODEC_EVS_AWB_RATE_23_05        (0x07)
+#define SP4G_CODEC_EVS_AWB_RATE_23_85        (0x08)
+#define SP4G_CODEC_EVS_AWB_RATE_02_00_SID    (0x09)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_REV0   (0x0A)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_REV1   (0x0B)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_REV2   (0x0C)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_REV3   (0x0D)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_LOST   (0x0E)
+#define SP4G_CODEC_EVS_AWB_RATE_00_00_NODATA (0x0F)
+
+typedef enum{
+   SP4G_CODEC_AMR_4_75=0x00,
+   SP4G_CODEC_AMR_5_15,
+   SP4G_CODEC_AMR_5_9,
+   SP4G_CODEC_AMR_6_7,
+   SP4G_CODEC_AMR_7_4,
+   SP4G_CODEC_AMR_7_95,
+   SP4G_CODEC_AMR_10_2,
+   SP4G_CODEC_AMR_12_2,
+   SP4G_CODEC_AMR_SID,
+   SP4G_CODEC_AMR_NO_DATA=0xF,
+   SP4G_CODEC_WBAMR_6_6=0x10,
+   SP4G_CODEC_WBAMR_8_85,
+   SP4G_CODEC_WBAMR_12_65,
+   SP4G_CODEC_WBAMR_14_25,
+   SP4G_CODEC_WBAMR_15_85,
+   SP4G_CODEC_WBAMR_18_25,
+   SP4G_CODEC_WBAMR_19_85,
+   SP4G_CODEC_WBAMR_23_05,
+   SP4G_CODEC_WBAMR_23_85,
+   SP4G_CODEC_WBAMR_SID,
+   SP4G_CODEC_LOST_FRAME,
+   SP4G_CODEC_G711=0x60,
+   SP4G_CODEC_G722,   
+   SP4G_CODEC_G723_1,
+   SP4G_CODEC_G726,
+   SP4G_CODEC_G729,
+
+   //bit[7:6]=10: EVS
+   //bit[7:6]=11: EVS AMR-WB
+   //bit[5:4]=00: 08k sample rate, NB
+   //bit[5:4]=01: 16k sample rate, WB
+   //bit[5:4]=10: 32k sample rate, SWB
+   //bit[5:4]=11: 48k sample rate, FB
+   //bit[3:0]: bit rate from low to high
+   SP4G_CODEC_EVS_08K_005_9       =0x80,
+   SP4G_CODEC_EVS_08K_002_8       =0x80,
+   SP4G_CODEC_EVS_08K_007_2       =0x81,
+   SP4G_CODEC_EVS_08K_008_0       =0x82,
+   SP4G_CODEC_EVS_08K_009_6       =0x83,
+   SP4G_CODEC_EVS_08K_013_2       =0x84,
+   SP4G_CODEC_EVS_08K_016_4       =0x85,
+   SP4G_CODEC_EVS_08K_024_4       =0x86,
+   SP4G_CODEC_EVS_08K_032_0       =0x87,
+   SP4G_CODEC_EVS_08K_048_0       =0x88,
+   SP4G_CODEC_EVS_08K_064_0       =0x89,
+   SP4G_CODEC_EVS_08K_096_0       =0x8A,
+   SP4G_CODEC_EVS_08K_128_0       =0x8B,
+   SP4G_CODEC_EVS_08K_002_4_SID   =0x8C,
+   SP4G_CODEC_EVS_08K_000_0_REV   =0x8D,
+   SP4G_CODEC_EVS_08K_000_0_LOST  =0x8E,
+   SP4G_CODEC_EVS_08K_000_0_NODATA=0x8F,
+
+   SP4G_CODEC_EVS_16K_005_9       =0x90,
+   SP4G_CODEC_EVS_16K_002_8       =0x90,
+   SP4G_CODEC_EVS_16K_007_2       =0x91,
+   SP4G_CODEC_EVS_16K_008_0       =0x92,
+   SP4G_CODEC_EVS_16K_009_6       =0x93,
+   SP4G_CODEC_EVS_16K_013_2       =0x94,
+   SP4G_CODEC_EVS_16K_016_4       =0x95,
+   SP4G_CODEC_EVS_16K_024_4       =0x96,
+   SP4G_CODEC_EVS_16K_032_0       =0x97,
+   SP4G_CODEC_EVS_16K_048_0       =0x98,
+   SP4G_CODEC_EVS_16K_064_0       =0x99,
+   SP4G_CODEC_EVS_16K_096_0       =0x9A,
+   SP4G_CODEC_EVS_16K_128_0       =0x9B,
+   SP4G_CODEC_EVS_16K_002_4_SID   =0x9C,
+   SP4G_CODEC_EVS_16K_000_0_REV   =0x9D,
+   SP4G_CODEC_EVS_16K_000_0_LOST  =0x9E,
+   SP4G_CODEC_EVS_16K_000_0_NODATA=0x9F,
+
+   SP4G_CODEC_EVS_32K_005_9       =0xA0,
+   SP4G_CODEC_EVS_32K_002_8       =0xA0,
+   SP4G_CODEC_EVS_32K_007_2       =0xA1,
+   SP4G_CODEC_EVS_32K_008_0       =0xA2,
+   SP4G_CODEC_EVS_32K_009_6       =0xA3,
+   SP4G_CODEC_EVS_32K_013_2       =0xA4,
+   SP4G_CODEC_EVS_32K_016_4       =0xA5,
+   SP4G_CODEC_EVS_32K_024_4       =0xA6,
+   SP4G_CODEC_EVS_32K_032_0       =0xA7,
+   SP4G_CODEC_EVS_32K_048_0       =0xA8,
+   SP4G_CODEC_EVS_32K_064_0       =0xA9,
+   SP4G_CODEC_EVS_32K_096_0       =0xAA,
+   SP4G_CODEC_EVS_32K_128_0       =0xAB,
+   SP4G_CODEC_EVS_32K_002_4_SID   =0xAC,
+   SP4G_CODEC_EVS_32K_000_0_REV   =0xAD,
+   SP4G_CODEC_EVS_32K_000_0_LOST  =0xAE,
+   SP4G_CODEC_EVS_32K_000_0_NODATA=0xAF,
+
+   SP4G_CODEC_EVS_48K_005_9       =0xB0,
+   SP4G_CODEC_EVS_48K_002_8       =0xB0,
+   SP4G_CODEC_EVS_48K_007_2       =0xB1,
+   SP4G_CODEC_EVS_48K_008_0       =0xB2,
+   SP4G_CODEC_EVS_48K_009_6       =0xB3,
+   SP4G_CODEC_EVS_48K_013_2       =0xB4,
+   SP4G_CODEC_EVS_48K_016_4       =0xB5,
+   SP4G_CODEC_EVS_48K_024_4       =0xB6,
+   SP4G_CODEC_EVS_48K_032_0       =0xB7,
+   SP4G_CODEC_EVS_48K_048_0       =0xB8,
+   SP4G_CODEC_EVS_48K_064_0       =0xB9,
+   SP4G_CODEC_EVS_48K_096_0       =0xBA,
+   SP4G_CODEC_EVS_48K_128_0       =0xBB,
+   SP4G_CODEC_EVS_48K_002_4_SID   =0xBC,
+   SP4G_CODEC_EVS_48K_000_0_REV   =0xBD,
+   SP4G_CODEC_EVS_48K_000_0_LOST  =0xBE,
+   SP4G_CODEC_EVS_48K_000_0_NODATA=0xBF,
+
+   SP4G_CODEC_EVS_AWB_06_60       =0xD0,
+   SP4G_CODEC_EVS_AWB_08_85       =0xD1,
+   SP4G_CODEC_EVS_AWB_12_65       =0xD2,
+   SP4G_CODEC_EVS_AWB_14_25       =0xD3,
+   SP4G_CODEC_EVS_AWB_15_85       =0xD4,
+   SP4G_CODEC_EVS_AWB_18_25       =0xD5,
+   SP4G_CODEC_EVS_AWB_19_85       =0xD6,
+   SP4G_CODEC_EVS_AWB_23_05       =0xD7,
+   SP4G_CODEC_EVS_AWB_23_85       =0xD8,
+   SP4G_CODEC_EVS_AWB_02_00_SID   =0xD9,
+   SP4G_CODEC_EVS_AWB_00_00_REV0  =0xDA,
+   SP4G_CODEC_EVS_AWB_00_00_REV1  =0xDB,
+   SP4G_CODEC_EVS_AWB_00_00_REV2  =0xDC,
+   SP4G_CODEC_EVS_AWB_00_00_REV3  =0xDD,
+   SP4G_CODEC_EVS_AWB_00_00_LOST  =0xDE,
+   SP4G_CODEC_EVS_AWB_00_00_NODATA=0xDF,
+
+   SP4G_CODEC_NONE                =0xFF,
+}SP4G_Codec;
+
+typedef enum{
+   SP4G_CODEC_EVS_AWB_SID_TYPE_FIRST  = 0x00,
+   SP4G_CODEC_EVS_AWB_SID_TYPE_UPDATE = 0x01,
+   SP4G_CODEC_EVS_AWB_SID_TYPE_NONSID = 0x02
+}SP4G_CODEC_EVS_AWB_SID_TYPE;
+
+
+/*====================
+JBM 2.0 - start
+=====================*/
+#define JBM_TS_RESERVE (16)
+
+typedef enum 
+{
+    JBM_NODATA_NORMAL = 0,
+    JBM_NODATA_JBM_DROP,
+    JBM_NODATA_JBM_QUEUE,
+    JBM_NODATA_BUF_EMPTY,
+    JBM_NODATA_PKT_LOSS,
+    JBM_NODATA_DSP_REMAIN
+} JBM_NODATA_TYPE;
+
+typedef struct VoLTE_JBM_TS_Info_Struct
+{
+   kal_uint8 TS_Switch;
+   kal_uint8 TS_HB_Frm_Num;
+   kal_uint8 TS_Frm_ID;
+   kal_uint8 TS_isRemainFrame;
+   kal_int16 TS_Scale;
+   kal_int16 TS_Max_Scale;
+   kal_uint8 TS_JBM_Reset_Flag;
+   kal_uint8 TS_DSP_Reset_Flag;
+   kal_int16 TS_Remain_Length_ms;
+   kal_int16 TS_Total_Length_ms;
+   kal_int16 TS_Reserve[JBM_TS_RESERVE];      
+   JBM_NODATA_TYPE Nodata_Type;
+} VoLTE_JBM_TS_Info_t;
+#if 0
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+/* under construction !*/
+#endif //#if 0
+/*====================
+JBM 2.0 - end
+=====================*/
+typedef struct {
+   LOCAL_PARA_HDR
+   VoLTE_JBM_TS_Info_t JBM_info;
+}ilm_SP4G_PSR_DL_INFO_t;
+
+typedef enum{ 
+	SP4G_PSR_CallType_VoLTE  = 0x00,   
+	SP4G_PSR_CallType_ViLTE  = 0x01,   
+	SP4G_PSR_CallType_VoWiFi = 0x02,   
+	SP4G_PSR_CallType_ViWiFi = 0x03,   
+	SP4G_PSR_CallType_None   = 0xFF,
+}SP4G_PSR_CallType;
+void SP4G_PSR_SetCallType(SP4G_PSR_CallType type);
+SP4G_PSR_CallType SP4G_PSR_GetCallType(void);
+
+
+void SP4G_PSR_UL_AMR_GetSpeechFrame(SP4G_Codec *frame_type, kal_uint8 *encodebits, kal_uint8 *bitlen, VoLTE_JBM_TS_Info_t *JBM_info);
+void SP4G_PSR_DL_AMR_PutSpeechFrame(kal_uint32 CFN, SP4G_PSR_Codec codec, SP4G_Codec frame_type, kal_bool crc_status, kal_uint8 *encodebits, VoLTE_JBM_TS_Info_t *JBM_info);
+void SP4G_PSR_UL_GSeries_GetSpeechFrame(SP4G_Codec *codec, kal_uint8 *encodebits, kal_uint8 *bitlen);
+void SP4G_PSR_DL_GSeries_PutSpeechFrame(SP4G_Codec codec, kal_uint8 *encodebits, kal_uint8 *bitlen);
+int SP4G_PSR_UL_GSeries_IsMoreData(void);
+
+void SP4G_PSR_UL_SetFrameType(SP4G_Codec codec);
+
+kal_uint32 SP4G_PSR_Link_Est( SP4G_Codec default_speech_codec );
+void SP4G_PSR_Link_Deest(kal_uint32 id);
+
+kal_uint16 SP4G_PSR_GetCodecBitLength(SP4G_Codec codec);
+
+kal_uint32 SP4G_JBM_GetDLVADFlag(void);
+
+/* law:
+        1: G711_ALAW
+        2: G711_ULAW
+    dec_init_CNG_enable:
+        0: disable (default)
+        1: enable              */
+void SP4G_Set_G711Parameters(kal_int32 law, kal_int32 dec_init_CNG_enable);
+
+/*====================start of PCM2WAY interface =====================*/
+
+
+void PCM2WAY_Start(void (*pcm2way_hdlr)(void), kal_uint32 type); //@type please refer to P2W_App_Type
+void PCM2WAY_Stop(kal_uint32 type);
+
+// void PCM2Way_SetFormat(kal_uint32 format);
+
+kal_uint16 PCM2WAY_GetFromMic(kal_uint16 *ul_buf);
+kal_uint16 PCM2WAY_PutToSpk(const kal_uint16 *dl_data);
+kal_uint16 PCM2WAY_FillSpk(kal_uint16 value);
+// void PCM2WAY_QueryBufSize(P2W_Format format, kal_uint32 *mic_bufsize, kal_uint32 *spk_bufsize);
+/*====================end of PCM2WAY interface =====================*/
+
+/* ------------------------------------------------------------------------- */
+
+
+/*====================start of AFE =====================*/
+
+void L1SP_SetOutputGainControl(kal_uint32 vol);
+void l1audio_consoleDVT(kal_char *string);
+
+/*====================end   of AFE =====================*/
+
+/* ------------------------------------------------------------------------- */
+
+void SP_Strm_Audl_Handler( ilm_struct *ilm_ptr );
+void SpcIO_Msg_Handler_inAudL(ilm_struct *ilm_ptr);
+kal_bool SP_Drv_Init_Bootup(void);
+kal_bool SP_Drv_Init_Task(void);
+
+/*====================start of EPOF =====================*/
+typedef enum{
+   ENUM_EPOF_DO_FORCEENDALLAPP = 0x0001,
+   ENUM_EPOF_MD1_L4C_NOTIFY    = 0x0002,
+   ENUM_EPOF_C2K_NOTIFY        = 0x0004,
+   ENUM_EPOF_AP_ACK_NOTIFY     = 0x0008,
+}enum_EPOF_event;
+kal_uint16 get_spcGetEpofTimes(enum_EPOF_event EPOF_event);
+void set_spcGetEpofTimes(enum_EPOF_event EPOF_event, int on);
+/*====================end   of EPOF =====================*/
+
+
+
+/*====================Start of EVS codec =====================*/
+typedef enum{ 
+   FRAMEMODE_NORMAL  = 0x0, /**< frame available */ 
+   FRAMEMODE_MISSING = 0x1, /**< frame missing => conceal */ 
+   FRAMEMODE_FUTURE  = 0x2, 
+}frameMode_fx;
+
+typedef struct {
+   kal_int32 enable;
+   kal_int32 rf_fec_indicator; // 0: Low(frame error rate < 5%).    1: High(frame error rate > 5%)
+   kal_int32 rf_fec_offset;
+   kal_int32 rev3;
+   kal_int32 rev4;
+   kal_int32 rev5;
+} EVS_ENC_CA_PARAMETER;
+
+typedef struct {
+   frameMode_fx FrameMode;
+   kal_int32 rev1;
+   kal_int32 rev2;
+   kal_int32 rev3;
+   kal_int32 rev4;
+   kal_int32 rev5;
+} EVS_DEC_CA_PARAMETER;
+
+typedef struct {
+   SP4G_Codec           codec;
+   kal_int32            DTX;
+   kal_int32            EVS_network_request_bw;
+   kal_int32            EVS_capability_bw;
+   kal_int32            EVS_PCM_bw;
+   EVS_ENC_CA_PARAMETER EVS_CA_Par;
+} EVS_ENCODER_PARAMETER;
+
+
+typedef struct {
+   SP4G_Codec           codec;
+   kal_int32            EVS_network_request_bw;
+   kal_int32            EVS_capability_bw;
+   kal_int32            EVS_PCM_bw;
+   kal_int32            EVS_HBLen;
+   kal_int32            EVS_BFI;
+   EVS_DEC_CA_PARAMETER EVS_CA_Par;
+} EVS_DECODER_PARAMETER;
+
+#define GET_SP4G_CODEC_ENUM_NON_EVS_ID(SP4GCodecEnum)   ((SP4GCodecEnum)&SP4G_CODEC_NON_EVS_ID_MASK)
+
+#define GET_SP4G_CODEC_ENUM_EVS_ID(SP4GCodecEnum)   ((SP4GCodecEnum)&SP4G_CODEC_EVS_ID_MASK)
+#define GET_SP4G_CODEC_ENUM_EVS_BW(SP4GCodecEnum)   ((SP4GCodecEnum)&SP4G_CODEC_EVS_SAMPLE_RATE_MASK)
+#define GET_SP4G_CODEC_ENUM_EVS_RATE(SP4GCodecEnum) ((SP4GCodecEnum)&SP4G_CODEC_EVS_CODEC_RATE_MASK)
+
+#define SET_SP4G_CODEC_ENUM_EVS_ID(SP4GCodecEnum, newID)     ( ((SP4GCodecEnum)&(~SP4G_CODEC_EVS_ID_MASK)) | (newID) )
+#define SET_SP4G_CODEC_ENUM_EVS_BW(SP4GCodecEnum, newBW)     ( ((SP4GCodecEnum)&(~SP4G_CODEC_EVS_SAMPLE_RATE_MASK)) | (newBW) )
+#define SET_SP4G_CODEC_ENUM_EVS_RATE(SP4GCodecEnum, newRATE) ( ((SP4GCodecEnum)&(~SP4G_CODEC_EVS_CODEC_RATE_MASK)) | (newRATE) )
+
+#define GET_IS_SP4G_CODEC_ENUM_EVS_PRIMARY_ID(SP4GCodecEnum) (GET_SP4G_CODEC_ENUM_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_EVS_ID)
+#define GET_IS_SP4G_CODEC_ENUM_EVS_AMRIO_ID(SP4GCodecEnum) (GET_SP4G_CODEC_ENUM_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_EVS_AWB_ID)
+#define GET_IS_SP4G_CODEC_ENUM_EVS_ID(SP4GCodecEnum)   ( GET_IS_SP4G_CODEC_ENUM_EVS_PRIMARY_ID(SP4GCodecEnum) || GET_IS_SP4G_CODEC_ENUM_EVS_AMRIO_ID(SP4GCodecEnum) )
+
+#define GET_IS_SP4G_CODEC_ENUM_AMR_ID(SP4GCodecEnum)   ( GET_SP4G_CODEC_ENUM_NON_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_AMR_ID )
+#define GET_IS_SP4G_CODEC_ENUM_AMR_WB_ID(SP4GCodecEnum)   ( GET_SP4G_CODEC_ENUM_NON_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_AMR_WB_ID )
+#define GET_IS_SP4G_CODEC_ENUM_AMR_WB_LOST_FRAME_ID(SP4GCodecEnum)   ( GET_SP4G_CODEC_ENUM_NON_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_AMR_WB_LOST_FRAME_ID )
+#define GET_IS_SP4G_CODEC_ENUM_AMR_NO_DATA_ID(SP4GCodecEnum) ( SP4GCodecEnum==SP4G_CODEC_AMR_NO_DATA )
+#define GET_IS_SP4G_CODEC_ENUM_GSERIES_ID(SP4GCodecEnum)   ( GET_SP4G_CODEC_ENUM_NON_EVS_ID(SP4GCodecEnum)==SP4G_CODEC_GSERISE_ID )
+
+#define GET_SP4G_CODEC_ENUM_EVS_BW_to_SAL(SP4GCodecEnum) (((SP4GCodecEnum)&SP4G_CODEC_EVS_SAMPLE_RATE_MASK)>>4)
+#define GET_SP4G_CODEC_ENUM_EVS_BW_from_SAL(SAL_BW)      ((SAL_BW<<4)&SP4G_CODEC_EVS_SAMPLE_RATE_MASK)
+
+void SP4G_PSR_SetEVSEncCAPara(EVS_ENC_CA_PARAMETER *pEVS_CA_Par);
+kal_bool SP4G_PSR_GetEVSDecCAPara(kal_uint8* CA_RF_Flag, kal_uint8* CA_RF_Offset, SP4G_Codec codec, kal_uint8* frame_pt, kal_uint8 offset);
+kal_uint32 SP4G_Get_Bit_Value(kal_uint8* frame_pt, kal_uint32 offset, kal_uint8 size);
+void SP4G_PSR_UL_EVS_GetSpeechFrame(SP4G_Codec *frame_type, kal_uint8 *encodebits, kal_uint32 *bitlen, VoLTE_JBM_TS_Info_t *JBM_info);
+void SP4G_PSR_DL_EVS_PutSpeechFrame(kal_uint32 CFN, SP4G_Codec frame_type, kal_uint8 *encodebits, EVS_DEC_CA_PARAMETER *pEVS_Dec_CA_Par, kal_bool crc_status, VoLTE_JBM_TS_Info_t *JBM_info);
+kal_bool convert_EVSHeaderFullCMR_to_SP4GCodecEnum(kal_uint8 CMR_value, SP4G_Codec *pSP4G_Codec, EVS_ENC_CA_PARAMETER *pEVS_ENC_CA_PARAMETER);
+kal_bool convert_EVSHeaderFullTOC_to_SP4GCodecEnum(kal_uint8 TOC_value, kal_uint8 EVS_band, SP4G_Codec *pSP4G_Codec);
+kal_bool convert_EVSCompactFormatCMR_to_SP4GCodecEnum(kal_uint8 CMR_value, SP4G_Codec *pSP4G_Codec);
+
+/*====================End   of EVS codec =====================*/
+
+void SP_L2P_Handler(ilm_struct *ilm_ptr);
+void spc_setLoopback_dl_ul(kal_bool enable);
+
+/*===================start of 4G TTY =====================*/
+kal_uint8 TTY_LTE_PSR_UL_Get(void);
+kal_uint16 TTY_LTE_PSR_UL_Queue_Size(void);
+
+void TTY_LTE_PSR_DL_Put(kal_uint8 tty_char);
+kal_uint16 TTY_LTE_PSR_DL_Queue_Size(void);
+void TTY_LTE_PSR_UL_Queue_Init();
+void TTY_LTE_PSR_DL_Queue_Init();
+void SP_L4C_SetERTTSTR(kal_uint8 call_id, kal_uint8 string[256], kal_uint16 length);
+void TTY_LTE_PSR_DL_PutString(kal_uint8 call_id, kal_uint8 string[256], kal_uint16 length);
+kal_uint16 TTY_LTE_PSR_UL_GetString(kal_uint8 call_id, kal_uint8 *buf, kal_uint16 *length);
+kal_uint16 TTY_LTE_PSR_UL_GetChar(kal_uint8 call_id, kal_uint8 *buf);
+
+
+typedef struct {
+   LOCAL_PARA_HDR 
+   kal_uint8 call_id;
+   kal_uint8 string[256];
+   kal_uint16 length;
+} ilm_L4C_ERTT_STRING_t; 
+
+/*====================end of 4G TTY ======================*/
+/*===================start of sp_4g_opt =====================*/
+kal_int32 SP4G_PSR_getToneDeteResult(void);
+kal_int32 SP4G_PSR_getEarPhone(void);
+/*====================end of sp_4g_opt ======================*/
+
+
+typedef enum{
+   SP_PS_RADIO_TYPE_UNKNOWN = 0x00,
+   SP_PS_RADIO_TYPE_LTE     = 0x01, 
+   SP_PS_RADIO_TYPE_NR      = 0x02,
+   SP_PS_RADIO_TYPE_WIFI    = 0x04,
+} SP_PS_RADIO_TYPE;
+
+
+#if defined(ATEST_ENABLE)
+#define SP_SetUSIP_MPU_Info()
+#else
+void SP_SetUSIP_MPU_Info(void);
+#endif // #if defined(ATEST_ENABLE)
+#endif
+
+// ============================================================================
+// EM related
+// ============================================================================
+
+void SP_setEmCodecNotifyOff(kal_bool isOff);
+void SP_setEmVoiceQualityEvent(kal_bool isOn);
+
+// ============================================================================
+
diff --git a/mcu/interface/driver/audio/sal_def.h b/mcu/interface/driver/audio/sal_def.h
new file mode 100644
index 0000000..e2595dd
--- /dev/null
+++ b/mcu/interface/driver/audio/sal_def.h
@@ -0,0 +1,859 @@
+#ifndef SAL_DEF_H
+#define SAL_DEF_H
+
+#include "l1aud_common_def.h"
+#include "audio_dsp_d2c_def.h"
+
+//For Gen93, all project support 2-Mic/3-Mic(ER), not support 4-Mic
+#define _SAL_DUALMIC_SUPPORT_    1  
+#define _SAL_MIC3_SUPPORT_      1
+#define _SAL_MIC4_SUPPORT_      1
+#define _SAL_ANC_SUPPORT_        0
+
+#define SAL_BIT0   0x0001
+#define SAL_BIT1   0x0002
+#define SAL_BIT2   0x0004
+#define SAL_BIT3   0x0008
+#define SAL_BIT4   0x0010
+#define SAL_BIT5   0x0020
+#define SAL_BIT6   0x0040
+#define SAL_BIT7   0x0080
+#define SAL_BIT8   0x0100
+#define SAL_BIT9   0x0200
+#define SAL_BIT10  0x0400
+#define SAL_BIT11  0x0800
+#define SAL_BIT12  0x1000
+#define SAL_BIT13  0x2000
+#define SAL_BIT14  0x4000
+#define SAL_BIT15  0x8000
+
+#define SAL_NB     0
+#define SAL_WB     1
+#define SAL_SWB    2
+#define SAL_FB     3
+
+#define SAL_NB_PCM_SIZE  160
+#define SAL_WB_PCM_SIZE  320
+#define SAL_SWB_PCM_SIZE 640
+#define SAL_FB_PCM_SIZE  960
+
+#define SAL_DEV_NORMAL	  		0
+#define SAL_DEV_EARPHONE  		1
+#define SAL_DEV_LOUDSPK			2
+#define SAL_DEV_BT_EARPHONE_NB 	3
+#define SAL_DEV_BT_EARPHONE_WB 	4
+#define SAL_DEV_BT_CORDLESS 	5
+#define SAL_DEV_MAX_NUM 		6
+
+#define SAL_APP_TYPE_2GCall 0
+#define SAL_APP_TYPE_3GCall 1
+#define SAL_APP_TYPE_4GCall 2
+#define SAL_APP_TYPE_PCM_Router 3
+#define SAL_APP_TYPE_C2KCall 4
+#define SAL_APP_TYPE_Standby 5
+
+#define SAL_ENH_AEC		0
+#define SAL_ENH_NR_UL	1
+#define SAL_ENH_NR_DL	2
+#define SAL_ENH_TDNC	3
+#define SAL_ENH_DMNR	4
+#define SAL_ENH_MAGICCONFERENCE	5
+#define SAL_ENH_EXTECHOREF	6
+
+#define SAL_ENH_DYN_STA_PAR_INIT       0xFFF0
+#define SAL_ENH_DYN_STA_PAR_SET        SAL_BIT0
+#define SAL_ENH_DYN_STA_PAR_SET_RDY    SAL_BIT1
+#define SAL_ENH_DYN_STA_DDL_SET        SAL_BIT4
+#define SAL_ENH_DYN_STA_DDL_SET_RDY    SAL_BIT5
+#define SAL_ENH_DYN_STA_DDL_DONE       SAL_BIT6
+#define SAL_ENH_DYN_STA_DDL_DONE_CHK   (SAL_ENH_DYN_STA_DDL_SET + SAL_ENH_DYN_STA_DDL_SET_RDY + SAL_ENH_DYN_STA_DDL_DONE)
+
+#define SAL_ENH_FLAG_PAR_UL               SAL_BIT0
+#define SAL_ENH_FLAG_PAR_DL               SAL_BIT1
+#define SAL_ENH_FLAG_PAR_NB_BKF_UL        SAL_BIT2
+#define SAL_ENH_FLAG_PAR_NB_BKF_DL        SAL_BIT3
+#define SAL_ENH_FLAG_PAR_NB_MOD           SAL_BIT4 
+#define SAL_ENH_FLAG_PAR_WB_BKF_UL        SAL_BIT5 
+#define SAL_ENH_FLAG_PAR_WB_BKF_DL        SAL_BIT6 
+#define SAL_ENH_FLAG_PAR_WB_MOD           SAL_BIT7
+#define SAL_ENH_FLAG_PAR_SWB_BKF_UL       SAL_BIT8 
+#define SAL_ENH_FLAG_PAR_SWB_BKF_DL       SAL_BIT9
+#define SAL_ENH_FLAG_PAR_SWB_MOD          SAL_BIT10 
+
+#define SAL_FLTCOEFLEN_SIDETONE 31
+#define SAL_FLTCOEFLEN_BKF_NB 	90
+#define SAL_FLTCOEFLEN_BKF_WB 	90
+#define SAL_FLTCOEFLEN_BKF_SWB 	90
+#define SAL_FLTCOEFLEN_ENH_IIR 	42
+#define SAL_FLTCOEFLEN_MIC_IIR 	20
+
+#define SAL_FLTCOEFLEN_SRC 		82
+#define SAL_FLTCOEFLEN_AGC 		40
+#define SAL_FLTCOEFLEN_DMNR_NB 	44
+#define SAL_FLTCOEFLEN_DMNR_WB	76
+#define SAL_FLTCOEFLEN_DMNR_SWB	120
+#define SAL_PARAMETERLEN_COMMON 12
+#define SAL_PARAMETERLEN_MODE_NB 	16
+#define SAL_PARAMETERLEN_MODE_WB 	16
+#define SAL_PARAMETERLEN_NOTCH 	15
+#define SAL_PARAMETERLEN_INTERNAL 16
+#define SAL_FLTCOEFLEN_SRCPLUS 148
+#define SAL_FLTCOEFLEN_SRCPLUS_SWB 296
+#define SAL_FLTCOEFLEN_SRC_IIR 12
+
+#define SPH_SFE_SRC_UL_DS            SAL_BIT1
+#define SPH_SFE_SRC_DL_US            SAL_BIT2
+#define SPH_SFE_SRC_UL4_DS           SAL_BIT4
+#define SPH_SFE_SRC_UL3_DS           SAL_BIT5
+#define SPH_SFE_SRC_UL2_DS           SAL_BIT6
+#define SPH_SFE_SRC_UL_US            SAL_BIT7
+#define SPH_SFE_SRC_DL_DS            SAL_BIT8
+#define SPH_SFE_SRC_PCM_RT_8K2SD_US  SAL_BIT12
+#define SPH_SFE_SRC_PCM_RT_8K2SD_DS  SAL_BIT13
+#define SPH_SFE_SRC_PCM_RT_SE28K_US  SAL_BIT14
+#define SPH_SFE_SRC_PCM_RT_SE28K_DS  SAL_BIT15
+
+#define SAL_3G_VALUE_TX_CODEC_MODE 0
+#define SAL_3G_VALUE_RX_CODEC_MODE 1
+#define SAL_3G_VALUE_TX_TYPE 2
+#define SAL_3G_VALUE_RX_TYPE 3
+
+#define SAL_3G_ADDR_TXHB   0
+#define SAL_3G_ADDR_RXHB   1
+
+#define SAL_3G_TX_SPEECH_GOOD  2
+#define SAL_3G_TX_SID_FIRST    1
+#define SAL_3G_TX_SID_UPDATE   3
+#define SAL_3G_TX_NO_DATA      0
+
+#define SAL_3G_RX_SPEECH_GOOD  0
+#define SAL_3G_RX_SPEECH_BAD   4
+#define SAL_3G_RX_SID_FIRST    6
+#define SAL_3G_RX_SID_UPDATE   8
+#define SAL_3G_RX_SID_BAD      10
+#define SAL_3G_RX_NO_DATA      14
+
+#define SAL_4G_RX_FIRST_FRM  0
+#define SAL_4G_RX_SECOND_FRM 1
+
+#define SAL_4G_RX_SPEECH_GOOD  0
+#define SAL_4G_RX_SPEECH_BAD   4
+#define SAL_4G_RX_SID_FIRST    6
+#define SAL_4G_RX_SID_UPDATE   8
+#define SAL_4G_RX_SID_BAD      10
+#define SAL_4G_RX_NO_DATA      14
+
+#define SAL_4G_VALUE_TX_CODEC_MODE 0
+#define SAL_4G_VALUE_RX_CODEC_MODE 1
+#define SAL_4G_VALUE_TX_TYPE 2
+#define SAL_4G_VALUE_RX_TYPE 3
+
+#define SAL_4G_ADDR_TXHB   0
+#define SAL_4G_ADDR_RXHB   1
+
+#define SAL_COD_FR 0
+#define SAL_COD_HR 1
+#define SAL_COD_EFR 2
+#define SAL_COD_AMR122 3
+#define SAL_COD_AMR102 4
+#define SAL_COD_AMR795 5
+#define SAL_COD_AMR74 6
+#define SAL_COD_AMR67 7
+#define SAL_COD_AMR59 8
+#define SAL_COD_AMR515 9
+#define SAL_COD_AMR475 10
+        
+#define SAL_COD_AWB660 0x20
+#define SAL_COD_AWB885 0x21
+#define SAL_COD_AWB1265 0x22
+#define SAL_COD_AWB1425 0x23
+#define SAL_COD_AWB1585 0x24
+#define SAL_COD_AWB1825 0x25
+#define SAL_COD_AWB1985 0x26
+#define SAL_COD_AWB2305 0x27
+#define SAL_COD_AWB2385 0x28
+#define SAL_COD_QCELP8K 0x30
+#define SAL_COD_QCELP13K 0x31
+#define SAL_COD_EVRCA 0x32
+#define SAL_COD_EVRCB 0x33
+#define SAL_COD_EVRCNW_NB 0x34
+#define SAL_COD_EVRCNW_WB 0x35
+#define SAL_COD_UNDEF 0x39
+        
+#define SAL_COD_EVSMIN  0x80
+#define SAL_COD_EVSMAX  0xDF
+
+#define SAL_DSPINT_PRIO_REC_EPL 1 //uplink
+#define SAL_DSPINT_PRIO_REC_PCM 2 //uplink
+#define SAL_DSPINT_PRIO_REC_VM  3 //downlink
+#define SAL_DSPINT_PRIO_3G_DL	4
+#define SAL_DSPINT_PRIO_3G_UL	5
+#define SAL_DSPINT_PRIO_EXTCOD_DL	6
+#define SAL_DSPINT_PRIO_EXTCOD_UL	7
+#define SAL_DSPINT_PRIO_PNW_DL	8
+#define SAL_DSPINT_PRIO_PNW_UL	9
+#define SAL_DSPINT_PRIO_DACA_DL	10
+#define SAL_DSPINT_PRIO_DACA_UL	11
+#define SAL_DSPINT_PRIO_BGS_DL	12 //downlink, ping pong
+#define SAL_DSPINT_PRIO_BGS_UL	13 
+#define SAL_DSPINT_PRIO_AVBT	14
+#define SAL_DSPINT_PRIO_WARN_MSG_UL	15
+#define SAL_DSPINT_PRIO_WARN_MSG_DL	16
+#define SAL_DSPINT_PRIO_4G_DL	17
+#define SAL_DSPINT_PRIO_4G_UL	18
+#define SAL_DSPINT_PRIO_C2K_DL	19
+#define SAL_DSPINT_PRIO_C2K_UL	20
+#define SAL_DSPINT_PRIO_4G_AAMPLUS	21
+#define SAL_DSPINT_PRIO_RAMP_DONE	22
+#define SAL_DSPINT_PRIO_MIXER2_DL	23
+#define SAL_DSPINT_PRIO_MIXER3       24
+#define SAL_DSPINT_PRIO_DMF	        25
+#define SAL_DSPINT_PRIO_4G_AAM      26
+#define SAL_DSPINT_PRIO_MAX         27
+
+#define SAL_DSPINT_ID_REC_EPL   (1 << SAL_DSPINT_PRIO_REC_EPL)
+#define SAL_DSPINT_ID_REC_PCM   (1 << SAL_DSPINT_PRIO_REC_PCM)
+#define SAL_DSPINT_ID_REC_VM    (1 << SAL_DSPINT_PRIO_REC_VM)
+#define SAL_DSPINT_ID_3G_DL		(1 << SAL_DSPINT_PRIO_3G_DL)
+#define SAL_DSPINT_ID_3G_UL		(1 << SAL_DSPINT_PRIO_3G_UL)
+#define SAL_DSPINT_ID_EXTCOD_DL	(1 << SAL_DSPINT_PRIO_EXTCOD_DL)
+#define SAL_DSPINT_ID_EXTCOD_UL	(1 << SAL_DSPINT_PRIO_EXTCOD_UL)
+#define SAL_DSPINT_ID_PNW_DL	(1 << SAL_DSPINT_PRIO_PNW_DL)
+#define SAL_DSPINT_ID_PNW_UL	(1 << SAL_DSPINT_PRIO_PNW_UL)
+#define SAL_DSPINT_ID_DACA_DL	(1 << SAL_DSPINT_PRIO_DACA_DL)
+#define SAL_DSPINT_ID_DACA_UL	(1 << SAL_DSPINT_PRIO_DACA_UL)
+#define SAL_DSPINT_ID_BGS_DL	(1 << SAL_DSPINT_PRIO_BGS_DL)
+#define SAL_DSPINT_ID_BGS_UL	(1 << SAL_DSPINT_PRIO_BGS_UL)
+#define SAL_DSPINT_ID_AVBT		(1 << SAL_DSPINT_PRIO_AVBT)
+#define SAL_DSPINT_ID_WARN_MSG_UL		(1 << SAL_DSPINT_PRIO_WARN_MSG_UL)
+#define SAL_DSPINT_ID_WARN_MSG_DL		(1 << SAL_DSPINT_PRIO_WARN_MSG_DL)
+#define SAL_DSPINT_ID_4G_DL		(1 << SAL_DSPINT_PRIO_4G_DL)
+#define SAL_DSPINT_ID_4G_UL		(1 << SAL_DSPINT_PRIO_4G_UL)
+#define SAL_DSPINT_ID_C2K_DL		(1 << SAL_DSPINT_PRIO_C2K_DL)
+#define SAL_DSPINT_ID_C2K_UL		(1 << SAL_DSPINT_PRIO_C2K_UL)
+#define SAL_DSPINT_ID_4G_AAMPLUS		(1 << SAL_DSPINT_PRIO_4G_AAMPLUS)
+#define SAL_DSPINT_ID_RAMP_DONE         (1 << SAL_DSPINT_PRIO_RAMP_DONE)
+#define SAL_DSPINT_ID_MIXER2_DL (1 << SAL_DSPINT_PRIO_MIXER2_DL)
+#define SAL_DSPINT_ID_MIXER3    (1 << SAL_DSPINT_PRIO_MIXER3)
+#define SAL_DSPINT_ID_4G_AAM		(1 << SAL_DSPINT_PRIO_4G_AAM)
+#define SAL_DSPINT_ID_DMF       (1 << SAL_DSPINT_PRIO_DMF)
+
+//C2K
+#define SAL_DSPINT_ID_C2K_DL		(1 << SAL_DSPINT_PRIO_C2K_DL)
+#define SAL_DSPINT_ID_C2K_UL		(1 << SAL_DSPINT_PRIO_C2K_UL)
+
+// C2K
+#define SAL_C2K_SO_NULL   0       /* Invalid service option  */
+#define SAL_C2K_SO1       1       /* SO1.   QCELP8. not supported  */
+#define SAL_C2K_SO3       3       /* SO3.   EVRC-A */
+#define SAL_C2K_SO17      17      /* SO17.  QCELP13 */
+#define SAL_C2K_SO68      68      /* SO68.  EVRC-B */
+#define SAL_C2K_SO73      73      /* SO73.  EVRC-NB */
+#define SAL_C2K_SO73WB    173     /* SO73.  EVRC-WB */
+
+//ToDo:
+//#define SAL_C2K_COD_QCELP8K         C2K_COD_QCELP8K   
+//#define SAL_C2K_COD_QCELP13K        C2K_COD_QCELP13K  
+//#define SAL_C2K_COD_EVRCA           C2K_COD_EVRCA     
+//#define SAL_C2K_COD_EVRCB           C2K_COD_EVRCB     
+//#define SAL_C2K_COD_EVRCNW_NB       C2K_COD_EVRCNW_NB    
+//#define SAL_C2K_COD_EVRCNW_WB       C2K_COD_EVRCNW_WB
+//#define SAL_C2K_COD_MODE_UNDEF      C2K_COD_UNDEF
+
+#define SAL_C2K_COD_QCELP8K         0x30   
+#define SAL_C2K_COD_QCELP13K        0x31
+#define SAL_C2K_COD_EVRCA           0x32
+#define SAL_C2K_COD_EVRCB           0x33
+#define SAL_C2K_COD_EVRCNW_NB       0x34
+#define SAL_C2K_COD_EVRCNW_WB       0x35
+#define SAL_C2K_COD_MODE_UNDEF      0x39
+
+//ToDo:
+//#define SAL_C2K_RATE_BLANK          IPC_SPCH_BLANK   
+//#define SAL_C2K_RATE_EIGHTH         IPC_SPCH_EIGHTH  
+//#define SAL_C2K_RATE_QUARTER        IPC_SPCH_QUARTER     
+//#define SAL_C2K_RATE_HALF           IPC_SPCH_HALF     
+//#define SAL_C2K_RATE_FULL           IPC_SPCH_FULL    
+//#define SAL_C2K_RATE_ERASURE        IPC_SPCH_ERASURE
+//#define SAL_C2K_RATE_FULL_LIKELY    IPC_SPCH_FULL_LIKELY
+
+#define SAL_C2K_RATE_BLANK          0x0      
+#define SAL_C2K_RATE_EIGHTH         0x1
+#define SAL_C2K_RATE_QUARTER        0x2
+#define SAL_C2K_RATE_HALF           0x3
+#define SAL_C2K_RATE_FULL           0x4
+#define SAL_C2K_RATE_ERASURE        0xE
+#define SAL_C2K_RATE_FULL_LIKELY    0xF
+
+#define SAL_C2K_VALUE_SO 0
+#define SAL_C2K_VALUE_UL_RATE 1
+#define SAL_C2K_VALUE_DL_RATE 2
+
+#define SAL_C2K_ADDR_TXHB   0
+#define SAL_C2K_ADDR_RXHB   1
+
+#define SAL_C2K_SOCM_QCELP13K         0
+#define SAL_C2K_SOCM_EVRCA            1
+#define SAL_C2K_SOCM_EVRCB            2
+#define SAL_C2K_SOCM_EVRCNW_NB        3
+#define SAL_C2K_SOCM_EVRCNW_WB        4
+#define SAL_C2K_ENC_MAX_RATE          5
+#define SAL_C2K_EBNT                  6
+#define SAL_C2K_DL_RATE               7
+
+#define SAL_C2K_COD_FEATURE_HPF              0
+#define SAL_C2K_COD_FEATURE_POS_FLT          1
+#define SAL_C2K_COD_FEATURE_PITCH_PRE_FLT    2
+
+#define SAL_SCH_FEATURE_SDSP_CONFIG_DEL_RW 0
+#define SAL_SCH_FEATURE_C2K_SMR            1
+
+//Test mode
+#define SAL_DSP_TESTMODE_2G_FR      0x20
+#define SAL_DSP_TESTMODE_2G_HR      0x21
+#define SAL_DSP_TESTMODE_2G_EFR     0x22
+#define SAL_DSP_TESTMODE_2G_AMR     0x23
+#define SAL_DSP_TESTMODE_2G_AWB     0x24
+#define SAL_DSP_TESTMODE_3G_AMR     0x30
+#define SAL_DSP_TESTMODE_3G_AWB     0x31
+#define SAL_DSP_TESTMODE_4G_AMR     0x40
+#define SAL_DSP_TESTMODE_4G_AWB     0x41
+#define SAL_DSP_TESTMODE_4G_EVS     0x42
+#define SAL_DSP_TESTMODE_4G_EVSSWB  0x43
+#define SAL_DSP_TESTMODE_C2K_EVRCA  0x90
+#define SAL_DSP_TESTMODE_C2K_EVRCB  0x91
+
+//Test mode - AFE DVT
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH0    0
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH1    1
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH2    2
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH3    3
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH4    4
+#define SAL_DSP_TESTMODE_AFEDVT_UL_CH5    5
+
+#define SAL_DSP_TESTMODE_AFEDVT_DL_CH0    0
+#define SAL_DSP_TESTMODE_AFEDVT_DL_CH1    1
+
+//Debug mode
+#define SAL_DSP_DBGMODE_SSP_PCM_U2D_AFE       SAL_BIT0
+#define SAL_DSP_DBGMODE_SSP_PCM_U2D_SFE       SAL_BIT1
+#define SAL_DSP_DBGMODE_SSP_MUTE_UL           SAL_BIT2
+#define SAL_DSP_DBGMODE_SSP_MUTE_DL           SAL_BIT3
+#define SAL_DSP_DBGMODE_SSP_TONE_UL           SAL_BIT4
+#define SAL_DSP_DBGMODE_SSP_TONE_DL           SAL_BIT5
+#define SAL_DSP_DBGMODE_SFP_HB_U2D            SAL_BIT6
+#define SAL_DSP_DBGMODE_SFP_PCM_U2D           SAL_BIT7
+#define SAL_DSP_DBGMODE_SFP_MUTE_POSENHU      SAL_BIT8
+#define SAL_DSP_DBGMODE_SFP_MUTE_PREENHD      SAL_BIT9
+#define SAL_DSP_DBGMODE_SFP_MUTE_POSENHD      SAL_BIT10
+#define SAL_DSP_DBGMODE_SFP_TONE_POSENHU      SAL_BIT11
+#define SAL_DSP_DBGMODE_SFP_TONE_PREENHD      SAL_BIT12
+#define SAL_DSP_DBGMODE_SFP_TONE_POSENHD      SAL_BIT13
+#define SAL_DSP_DBGMODE_SFP_DISABLE_ENHU      SAL_BIT14
+#define SAL_DSP_DBGMODE_SFP_DISABLE_ENHD      SAL_BIT15
+
+//Debug mode 2
+#define SAL_DSP_DBGMODE2_SFP_PCM_D2U          SAL_BIT0
+
+// SAL trace                                             
+#define SAL_SPH_CALL_OPEN                         0x3000 
+#define SAL_SPH_CALL_CLOSE                        0x3001 
+#define SAL_SPH_SET_VALUE                         0x3002 
+#define SAL_SPH_SET_TTY                           0x3003
+#define SAL_SPH_FEATURE_SWITCH                    0x3004
+#define SAL_SPH_GET_ADDR                          0x3005
+#define SAL_SPH_GET_VALUE                         0x3006 
+#define SAL_SPH_SET_COD_STATE                     0x3007
+
+//DL gain smooth
+#define SAL_ATTACK_GAIN_DL_NB  47
+#define SAL_RELEASE_GAIN_DL_NB 32720
+#define SAL_ATTACK_GAIN_DL_WB  23
+#define SAL_RELEASE_GAIN_DL_WB 32744
+#define SAL_ATTACK_GAIN_DL_SWB  12
+#define SAL_RELEASE_GAIN_DL_SWB 32756
+
+//EVS
+#define SAL_EVS_SPEECH_GOOD_FRAME  0x6b21
+#define SAL_EVS_SPEECH_BAD_FRAME   0x6b20
+
+#define SAL_EVS_TX_CODEC_MODE 1
+#define SAL_EVS_RX_CODEC_MODE 2
+
+//3G mode
+#define SAL_3GLINK_MODE_NONE     0
+#define SAL_3GLINK_MODE_WCDMA    1
+#define SAL_3GLINK_MODE_TDSCDMA  2
+
+//PS mode
+#define SAL_PSRAN_TYPE_NONE     0
+#define SAL_PSRAN_TYPE_LTE      1
+#define SAL_PSRAN_TYPE_NR       2
+
+//LinkStatus
+#define SAL_LINKSTATUS_2G  2
+#define SAL_LINKSTATUS_3G  3
+#define SAL_LINKSTATUS_4G  4
+#define SAL_LINKSTATUS_C2K  10
+
+#define SAL_DELAY_NA  (0xFFFF)
+//PCM Rec DL Position
+#define SAL_PCMREC_DL_POS_DL_END     0
+#define SAL_PCMREC_DL_POS_POS_ENH    1
+#define SAL_PCMREC_DL_POS_PRE_MIXER2 2
+#define SAL_PCMREC_DL_POS_MAX        2
+
+#define SAL_SVC_VERSION_NA  (0xFF)
+
+//DMF
+#define SAL_DMF_SOURCE_SPH_UL  SAL_BIT0
+#define SAL_DMF_SOURCE_SPH_DL  SAL_BIT1
+#define SAL_DMF_SOURCE_ENH_UL  SAL_BIT2
+
+#define SAL_DMF_RATE_NONE   (0)
+#define SAL_DMF_RATE_C2K    (1)
+#define SAL_DMF_RATE_2G     (2)
+#define SAL_DMF_RATE_3G     (3)
+#define SAL_DMF_RATE_4G     (4)
+
+#define SAL_DMF_DL_STATUS_DISCON_NW   SPH_BIT0
+#define SAL_DMF_DL_STATUS_DISCON_SPH  SPH_BIT1
+#define SAL_DMF_DL_STATUS_SILENCE_NW  SPH_BIT2
+#define SAL_DMF_DL_STATUS_SILENCE_SPH SPH_BIT3
+#define SAL_DMF_DL_STATUS_NOISE_NW    SPH_BIT4
+#define SAL_DMF_DL_STATUS_NOISE_SPH   SPH_BIT5
+
+#define SAL_DMF_BADFRM_ID_FR_BFI          (0)
+#define SAL_DMF_BADFRM_ID_HR_BFI          (1)
+#define SAL_DMF_BADFRM_ID_EFR_BFI         (2)
+#define SAL_DMF_BADFRM_ID_AMR_DEG         (3)
+#define SAL_DMF_BADFRM_ID_AMR_ONSET       (4)
+#define SAL_DMF_BADFRM_ID_AMR_BAD         (5)
+#define SAL_DMF_BADFRM_ID_AWB_BAD         (6)
+#define SAL_DMF_BADFRM_ID_AWB_PRBLY_DEG   (7)
+#define SAL_DMF_BADFRM_ID_EVA_ERASURE     (8)
+#define SAL_DMF_BADFRM_ID_EVB_ERASURE     (9)
+#define SAL_DMF_BADFRM_ID_EVS_BFI        (10)
+#define SAL_DMF_BADFRM_ID_NUM            (11)
+
+#define SAL_DMF_HOMFRM_ID_FR         (0)
+#define SAL_DMF_HOMFRM_ID_HR         (1)
+#define SAL_DMF_HOMFRM_ID_EFR        (2)
+#define SAL_DMF_HOMFRM_ID_AMR        (3)
+#define SAL_DMF_HOMFRM_ID_AWB        (4)
+#define SAL_DMF_HOMFRM_ID_NUM        (5)
+
+#define SAL_DMF_NODATA_ID_AMR        (0)
+#define SAL_DMF_NODATA_ID_AWB        (1)
+#define SAL_DMF_NODATA_ID_EVS        (2)
+#define SAL_DMF_NODATA_ID_NUM        (3)
+
+#define SAL_DMF_ENH_ROBUST_STATUS_NORMAL        (0)
+#define SAL_DMF_ENH_ROBUST_STATUS_WA            (1)
+#define SAL_DMF_ENH_ROBUST_STATUS_NORMAL_CLEAN  (2)
+#define SAL_DMF_ENH_ROBUST_STATUS_WA_CLEAN      (3)
+#define SAL_DMF_ENH_ROBUST_STATUS_MIC1_ONLY     (4)
+#define SAL_DMF_ENH_ROBUST_STATUS_MIC2_ONLY     (5)
+
+//TS
+typedef enum{
+	SAL_VM_TS_INFO_CTRL = 0,
+	SAL_VM_TS_INFO_TARGET_SCALE,
+	SAL_VM_TS_INFO_MAX_SCALE,
+	SAL_VM_TS_INFO_OUTPUT_SIZE_1,
+	SAL_VM_TS_INFO_OUTPUT_SIZE_2
+}Sal_VM_TS_Info_t;
+
+//AAMPlus
+typedef enum{
+	SAL_AAMPLUS_STA_SILENCE_SID_FIRST = 0,
+	SAL_AAMPLUS_STA_SILENCE_SID_UPDATE,
+	SAL_AAMPLUS_STA_TALK
+}Sal_AAMPlus_State_t;
+
+typedef enum{
+	SAL_PCM_NARROWBAND = 0,
+	SAL_PCM_WIDEBAND,
+	SAL_PCM_SUPERWIDEBAND,
+	SAL_PCM_FULLBAND,
+	SAL_PCM_DYNAMIC
+}Sal_PcmBand_Config_t;
+
+typedef enum{
+	SAL_PCMEX_OFF = 0,
+	SAL_PCMEX_ON,
+	SAL_PCMEX_RDY,
+}Sal_PcmEx_State_t;
+
+typedef enum{
+	SAL_GSERIES = 0,
+	SAL_EVS
+		
+}Sal_ExtCod_t;
+
+typedef enum{
+	SAL_PCMEX_TYPE_PNW = 0,
+	SAL_PCMEX_TYPE_DACA,
+	SAL_PCMEX_TYPE_REC_NML,
+	SAL_PCMEX_TYPE_REC_EPL, //no actual dsp control before MT6589
+	SAL_PCMEX_TYPE_EXT_COD
+}Sal_PcmEx_Type_t;
+
+typedef enum{
+	SAL_PCMEX_SWITCH_OFF = 0,
+	SAL_PCMEX_SWITCH_ON
+}Sal_PcmEx_Switch_t;
+
+typedef enum{
+	SAL_PCMEX_PNW_BUF_M2D_UL1 = 0,//D2M
+	SAL_PCMEX_PNW_BUF_D2M_UL1,
+	SAL_PCMEX_PNW_BUF_M2D_UL2,
+	SAL_PCMEX_PNW_BUF_D2M_UL2,
+	SAL_PCMEX_PNW_BUF_M2D_UL3,
+	SAL_PCMEX_PNW_BUF_D2M_UL3,
+	SAL_PCMEX_PNW_BUF_M2D_UL4,
+	SAL_PCMEX_PNW_BUF_D2M_UL4,
+	SAL_PCMEX_PNW_BUF_M2D_DL1,
+	SAL_PCMEX_PNW_BUF_D2M_DL1,
+	SAL_PCMEX_DACA_BUF_UL,
+	SAL_PCMEX_DACA_BUF_DL,
+	SAL_PCMEX_BUF_SE,
+	SAL_PCMEX_BUF_SE2,//mic2
+	SAL_PCMEX_BUF_SD,
+	SAL_PCMEX_EXTCOD_BUF_UL,
+	SAL_PCMEX_EXTCOD_BUF_DL,
+	//For pcm4way.c build pass
+    SAL_PCMEX_PNW_BUF_UL1,//D2M
+	SAL_PCMEX_PNW_BUF_UL2,//M2D
+	SAL_PCMEX_PNW_BUF_UL3,
+	SAL_PCMEX_PNW_BUF_UL4,
+	SAL_PCMEX_PNW_BUF_DL1,//D2M
+	SAL_PCMEX_PNW_BUF_DL2,//M2D	
+}Sal_PcmEx_BufId_t;
+
+typedef enum{
+	SAL_ENH_IIR_COEF_UL_NB,
+	SAL_ENH_IIR_COEF_DL_NB,
+	SAL_ENH_IIR_COEF_UL_WB,
+	SAL_ENH_IIR_COEF_DL_WB,
+	SAL_ENH_IIR_COEF_UL_SWB,
+	SAL_ENH_IIR_COEF_DL_SWB,
+	SAL_MIC1_IIR_COEF_UL_NB,
+	SAL_MIC2_IIR_COEF_UL_NB,
+	SAL_MIC1_IIR_COEF_UL_WB,
+	SAL_MIC2_IIR_COEF_UL_WB,
+	SAL_MIC1_IIR_COEF_UL_SWB,
+	SAL_MIC2_IIR_COEF_UL_SWB
+}Sal_IIR_Coef_t;
+
+typedef struct{
+	Sal_PcmEx_Switch_t swi;
+
+	Sal_PcmEx_Type_t type;
+	
+	bool idle;//must be assinged
+	Sal_PcmBand_Config_t band;//taking effect only when idle is true
+	uint16 delR;
+	uint16 delW;
+	uint16 delM;
+
+	//for pcm n way
+	bool afterEnh_ul1;
+	bool D2M_ul1;
+	bool M2D_ul1;
+	bool afterEnh_ul2;
+	bool D2M_ul2;
+	bool M2D_ul2;
+	bool afterEnh_ul3;
+	bool D2M_ul3;
+	bool M2D_ul3;
+	bool afterEnh_ul4;
+	bool D2M_ul4;
+	bool M2D_ul4;
+	bool DMNR_cal;//dsp pnw ul will copy pcm to M2D buffer
+
+	bool afterEnh_dl; //position
+	bool D2M_dl; //dl position is different from daca on bgs and keytone
+	bool M2D_dl;
+	
+	//for PCM Rec
+	uint16 PCMRec_DL_Pos;	
+}Sal_PCMEx_Config_t;
+
+typedef enum{
+	SAL_VM_SWITCH_OFF = 0,
+	SAL_VM_SWITCH_ON
+}Sal_VM_Switch_t;
+
+typedef struct{	
+	Sal_VM_Switch_t swi;
+	bool idle;
+
+	uint16 delR;
+	uint16 delW;
+	uint16 delM;
+	uint16 codec;
+}Sal_VM_Config_t;
+
+typedef struct{
+	uint16 enc_mode;
+	uint16 dec_mode;
+
+	uint16 dec_frm_num;
+
+	uint16 enc_hdr;
+	uint16 dec_hdr;
+	uint16 dec_hdr_1;
+
+	volatile uint16 *enc_hb_addr;
+	volatile uint16 *dec_hb_addr;
+	volatile uint16 *dec_hb_addr_1;
+
+	volatile uint16 *dbgInfo_addr;
+	volatile uint16 *enh_dbgInfo_addr;
+	volatile uint16 *svc_dbgInfo_addr;
+}Sal_VM_Frame;
+
+typedef struct{
+	uint16 ul_pre_len;
+	uint16 ul_pos_len;
+	uint16 dl_pre_len;
+	uint16 dl_pos_len;
+	
+	uint16 ul2_pos_len;
+	uint16 ul3_pos_len;
+	uint16 ul4_pos_len;
+	uint16 ul5_pos_len;
+
+	volatile uint16 *ul_pre_buf;
+	volatile uint16 *ul_pos_buf;
+	volatile uint16 *dl_pre_buf;
+	volatile uint16 *dl_pos_buf;
+
+	volatile uint16 *ul2_pos_buf;	
+	volatile uint16 *ul3_pos_buf;
+	volatile uint16 *ul4_pos_buf;
+	volatile uint16 *ul5_pos_buf;
+}Sal_EPL_Frame;
+
+typedef enum{
+	SAL_BT_MODE_LINEAR = 0,
+	SAL_BT_MODE_SIGNEXT,
+	SAL_BT_MODE_GAIN
+}Sal_BT_Mode_t;
+
+typedef enum{
+	SAL_BT_LINEAR_GAIN_FIXED = 0,//fixed to 18db
+	SAL_BT_LINEAR_ZPAD,//last 3 bits
+	SAL_BT_LINEAR_GAIN_CONFIG_ZPAD
+}Sal_BT_Linear_Ctrl_t;
+
+typedef struct{
+
+	bool feed_cfg;// false: clear bt config
+	Sal_BT_Mode_t mode;
+
+	//for linear mode
+	Sal_BT_Linear_Ctrl_t linear_ctrl;
+	bool linear_reverse;
+	uint8 linear_ul_gain;
+
+	//for gain mode
+	uint8 gainmode_dl_gain;
+	
+}Sal_BT_Config;
+
+typedef enum{
+	SAL_MUTE_UL_POS_EN,
+	SAL_MUTE_UL_PRE_EN,
+	SAL_MUTE_UL_IN_EN,
+	SAL_MUTE_DL_PRE_SD,
+	SAL_MUTE_DL_PRE_EN,
+	SAL_MUTE_UL_8K,
+	SAL_MUTE_DL_8K,	
+	SAL_MUTE_UL_PRE_EXTCOD,
+	SAL_MUTE_DL_POS_EXTCOD	
+}Sal_Mute_Point_t;
+
+typedef enum{
+	SAL_RAMP_UL_POS_EN,
+	SAL_RAMP_UL_PRE_EN,
+	SAL_RAMP_UL_IN_EN,
+//	SAL_RAMP_DL_PRE_SD,
+	SAL_RAMP_DL_PRE_EN,
+	SAL_RAMP_UL_8K,
+	SAL_RAMP_DL_8K,	
+	SAL_RAMP_UL_PRE_EXTCOD,
+	SAL_RAMP_DL_POS_EXTCOD,	
+	SAL_RAMP_DL_PRE_DACA,	
+	SAL_RAMP_DL_PRE_MIXER2
+}Sal_Ramp_Point_t;
+
+typedef enum{
+    SAL_RAMP_IDLE = 0,
+    SAL_RAMP_DOWN_INIT,
+    SAL_RAMP_DOWN_RUN,
+    SAL_RAMP_DOWN_DONE,
+    SAL_RAMP_UP_INIT,
+    SAL_RAMP_UP_RUN,
+    SAL_RAMP_UP_DONE
+}Sal_Ramp_State_t;
+
+typedef enum{
+	SAL_DTMF_REMOVAL_UL_PRE_EN
+}Sal_DTMF_Removal_Point_t;
+
+typedef enum{
+	SAL_ENH_DYNAMIC_MUTE_UL,
+	SAL_ENH_DYNAMIC_DMNR_MUX,
+	SAL_ENH_DYNAMIC_VCE_MUX,
+	SAL_ENH_DYNAMIC_BWE_MUX,
+	SAL_ENH_DYNAMIC_UL_NR_MUX,
+	SAL_ENH_DYNAMIC_DL_NR_MUX,
+	SAL_ENH_DYNAMIC_DMNR_HF_MUX,
+	SAL_ENH_DYNAMIC_SIDEKEYCTRL_DGAIN_MUX,
+	SAL_ENH_DYNAMIC_DL_NR_INIT_CTRL_MUX,
+	SAL_ENH_DYNAMIC_AEC_MUX,
+	SAL_ENH_DYNAMIC_NUM //for salu using
+}Sal_Enh_Dynamic_t;
+
+typedef enum{
+	SAL_ENH_DYN_PAR,
+	SAL_ENH_DYN_DDL_SET,
+	SAL_ENH_DYN_DDL_DONE
+}Sal_Enh_Dyn_Sta_t;
+
+typedef enum{
+	SAL_ENH_FLAG_PAR_SET_UL,
+	SAL_ENH_FLAG_PAR_SET_DL,
+	SAL_ENH_FLAG_PAR_SET_UL_DL,
+	SAL_ENH_FLAG_PAR_SET_NB_BKF_UL,
+	SAL_ENH_FLAG_PAR_SET_NB_BKF_DL,
+	SAL_ENH_FLAG_PAR_SET_NB_MOD,
+	SAL_ENH_FLAG_PAR_SET_WB_BKF_UL,
+	SAL_ENH_FLAG_PAR_SET_WB_BKF_DL,
+	SAL_ENH_FLAG_PAR_SET_WB_MOD
+}Sal_Enh_Flag_Par_t;
+
+typedef enum{
+	SAL_DEVINFO_INT_NORMAL = 1,
+	SAL_DEVINFO_INT_BT_PCM,
+	SAL_DEVINFO_INT_CVSD_MSBC
+}Sal_DevInfo_Int_t;
+
+typedef enum{
+	SAL_DEVINFO_EXT_DEFAULT = 0,
+	SAL_DEVINFO_EXT_VIBRATION_RECEIVER,
+	SAL_DEVINFO_EXT_VIBRATION_SPEAKER,
+	SAL_DEVINFO_EXT_SMARTPA_SPEAKER,
+	SAL_DEVINFO_EXT_SMARTPA_VIBRATION_SPEAKER,
+	SAL_DEVINFO_EXT_USB_AUDIO,
+	SAL_DEVINFO_EXT_EARPHONE,
+	SAL_DEVINFO_EXT_DUALSMARTPA_SPEAKER,
+	SAL_DEVINFO_EXT_DUALSMARTPA_VIBRATION_SPEAKER
+}Sal_DevInfo_Ext_t;
+
+typedef enum{
+    SAL_SMARTPA_SINGLE = 0,
+    SAL_SMARTPA_DUAL
+}Sal_SmartPA_Config_t;
+
+typedef enum{
+	SAL_EXTAUIF_MEM_TYPE_SPHALL = 0,
+	SAL_EXTAUIF_MEM_TYPE_ENH,
+	SAL_EXTAUIF_MEM_TYPE_OD
+}Sal_ExtAUIF_Mem_Type_t;
+
+typedef struct{
+
+	bool main_switch;
+	bool gain_switch;//false->fixed_gain
+	bool hpiir_switch;
+	bool vad_switch;
+	bool cosim;
+	bool init_req;
+	
+}Sal_AGC_Config_t;
+
+typedef enum{
+	SAL_VOLTE_INFO_JBM_OUT_SN,//for vm logging
+	SAL_VOLTE_INFO_NUM, //for salu using
+	SAL_VOLTE_INFO_JBM_NODATA_TYPE
+}Sal_VOLTE_info_t;
+
+typedef struct{
+	
+	uint16 cod_band; //0: NB, 1: WB
+	uint16 dev_band; //0: NB, 1: WB
+	uint16 delR;
+	uint16 delW;
+	uint16 delM_DL;
+	uint16 delM_UL;	
+	
+}Sal_PCM_Router_t;
+
+typedef enum{
+	SAL_DEALY_2G = 0,
+	SAL_DEALY_3G_FDD,
+	SAL_DEALY_3G_TDD,
+	SAL_DEALY_4G,
+	SAL_DEALY_5G,
+	SAL_DEALY_C2K,
+	SAL_DEALY_AMR,
+	SAL_DEALY_NOTAMR,
+	SAL_DEALY_PCM8K_PB,
+	SAL_DEALY_PCM16K,
+	SAL_DEALY_KT,
+	SAL_DEALY_PCM8K_PB_VOIP,
+	SAL_DEALY_NONE = 99
+}Sal_Delay_Type_t;
+
+typedef enum{
+	SAL_SRST_TYPE_CALLON = 0,
+	SAL_SRST_TYPE_HO,
+	SAL_SRST_TYPE_UNSYNC,
+	SAL_SRST_TYPE_DEV
+}Sal_SRst_Type_t;
+
+typedef struct{
+    uint16 DMFRate;
+    uint16 DMFULMutePosENHCnt;
+
+}Sal_DMF_SPH_UL_Info_t;
+
+typedef struct{
+    uint16 DMFRate;
+    uint16 DMFDLStatus;
+    uint16 DMFDLVoice;
+    uint16 DMFCRCFailCnt;
+    uint16 DMFSphRstCnt;
+    uint16 DMFPktLossCnt;
+    uint16 DMFJitterLossCnt;
+    uint16 DMFBadFrmCnt[SAL_DMF_BADFRM_ID_NUM];
+    uint16 DMFHomFrmCnt[SAL_DMF_HOMFRM_ID_NUM];
+    uint16 DMFNoDataCnt[SAL_DMF_NODATA_ID_NUM];
+
+}Sal_DMF_SPH_DL_Info_t;
+
+typedef struct{
+    uint16 DMFRate;
+    uint16 DMFENHRobustStatusPre;
+    uint16 DMFENHRobustStatusPos;
+
+}Sal_DMF_ENH_UL_Info_t;
+
+#define SAL_CTM_VALUE_TYPE_FACCH_REPORT 0
+#define SAL_CTM_VALUE_TYPE_AMR_RX_RATE 1
+
+#define SAL_UNKNOWN 0xeeee
+
+#define DSP_IID_SPEECH_UL_ID    1
+#define DSP_IID_SPEECH_DL_ID    2
+#define DSP_IID_SPEECH_UL_ID2   3
+#define DSP_IID_SPEECH_DL_ID2   4
+#define DSP_IID_SPEECH_AUX_ID   5
+#define DSP_IID_SPEECH_MM_ID    6
+#define DSP_IID_SPEECH_UL_ID3   10
+#define DSP_IID_SPEECH_UL_ID4   11
+
+#endif
diff --git a/mcu/interface/driver/audio/sal_exp.h b/mcu/interface/driver/audio/sal_exp.h
new file mode 100644
index 0000000..681def1
--- /dev/null
+++ b/mcu/interface/driver/audio/sal_exp.h
@@ -0,0 +1,276 @@
+#ifndef SAL_H
+#define SAL_H
+#include "l1aud_common_def.h"
+#include "l1audio.h"
+
+
+void SAL_Set_Device(uint32 dev,uint16 band);
+void SAL_2G_Call_Open(uint32 enc_mod, uint32 dec_mod, uint32 sub_channel, uint32 tch_state, Sal_SRst_Type_t type);
+void SAL_2G_Handover(uint32 enc_mod, uint32 dec_mod, uint32 sub_channel, uint32 tch_state, Sal_SRst_Type_t type);
+void SAL_3G_Call_Open(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, uint16 LinkMode, Sal_SRst_Type_t type);
+void SAL_4G_Call_Open_temp(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+void SAL_3G_Upd_Enc_Cod(uint32 enc_mod);
+void SAL_3G_Upd_Dec_Cod(uint32 dec_mod);
+void SAL_2G_Call_Close(uint32 dsp_end);
+void SAL_3G_Call_Close(uint32 dsp_end);
+void SAL_4G_Call_Close_temp(uint32 dsp_end);
+void SAL_4G_G_Codec_Call_Close(uint32 dsp_end);
+void SAL_3G_Set_TxType(uint32 tx_type);
+void SAL_3G_Set_RxType(uint32 rx_type);
+volatile uint16* SAL_3G_GetAddr(uint16 type);
+uint16 SAL_3G_GetValue(uint16 type);
+bool SAL_3G_IsDLEmpty();
+bool SAL_3G_IsULReady();
+void SAL_3G_SetDLReady();
+void SAL_3G_SetULEmpty();
+void SAL_3G_SetULUnsync();
+void SAL_3G_SetDtx(bool on);
+void SAL_App_Open(uint32 delR, uint32 delW, uint32 delM);
+void SAL_App_Close(uint32 dsp_end);
+void SAL_Bgsnd_SetInit();
+bool SAL_Bgsnd_IsRunning();
+bool SAL_Bgsnd_IsIdle();
+void SAL_Bgsnd_SetFinal();
+void SAL_Bgsnd_Config(uint32 ulgain, uint32 dlgain, uint32 ulmix, uint32 dlmix);
+volatile uint16* SAL_Bgsnd_GetBuf_DL();
+uint32 SAL_Bgsnd_GetDataLen_DL();
+volatile uint16* SAL_Bgsnd_GetBuf_UL();
+uint32 SAL_Bgsnd_GetDataLen_UL();
+void SAL_Dsp_Sph_Init();
+volatile uint16* SAL_Sidetone_GetFltCoefAddr();
+volatile uint16* SAL_Notch_GetFltCoefAddr();
+volatile uint16* SAL_BKF_GetFltCoefAddr_NB_UL();
+volatile uint16* SAL_BKF_GetFltCoefAddr_NB_DL();
+volatile uint16* SAL_BKF_GetFltCoefAddr_WB_UL();
+volatile uint16* SAL_BKF_GetFltCoefAddr_WB_DL();
+volatile uint16* SAL_BKF_GetFltCoefAddr_SWB_UL();
+volatile uint16* SAL_BKF_GetFltCoefAddr_SWB_DL();
+void SAL_BKF_Switch(uint32 ul, uint32 dl);
+volatile uint16* SAL_SRC_GetFltCoefAddr();
+volatile uint16* SAL_SRCPlus_GetFltCoefAddr();
+volatile uint16* SAL_SRCPlusSWB_GetFltCoefAddr();
+volatile uint16* SAL_SRC_IIR_GetFltCoefAddr();
+volatile uint16* SAL_AGC_GetFltCoefAddr();
+void SAL_ENH_SetULPath(bool on);
+void SAL_ENH_SetDLPath(bool on);
+bool SAL_ENH_ParUpdPState_IsIdle();
+void SAL_ENH_ParUpdState_SetUpd();
+void SAL_ENH_ParUpdState_SetUpd_Offset(kal_uint32 Offset, kal_uint32 Len);
+bool SAL_ENH_CtrlUpdPState_IsIdle();
+void SAL_ENH_CtrlUpdState_SetUpd();
+void SAL_ENH_SetInit(uint32 enh_mod);
+void SAL_ENH_SetOff(uint32 enh_mod);
+bool SAL_ENH_IsReady(uint32 enh_mod);
+bool SAL_ENH_IsIdle(uint32 enh_mod);
+void SAL_ENH_Dynamic_Ctrl(bool on, Sal_Enh_Dynamic_t fea);
+void SAL_ENH_Gain_Set_DL(uint16 val);
+void SAL_ENH_Dynamic_State_Par_Init(void);
+void SAL_ENH_Dynamic_State_Set(Sal_Enh_Dyn_Sta_t sta);
+bool SAL_ENH_Dynamic_State_Check(Sal_Enh_Dyn_Sta_t sta);
+void SAL_ENH_Flag_Par_Set(Sal_Enh_Flag_Par_t par);
+void SAL_ENH_SetDMNR(bool on);
+void SAL_ENH_SetTDNC(bool on);
+void SAL_ENH_SetMagicConference(bool on);
+void SAL_ENH_SetMainSwitch(bool on);
+void SAL_ENH_Set3GNetworkType(uint16 type);
+volatile uint16* SAL_CommonPar_GetBuf();
+volatile uint16* SAL_ModePar_GetBuf_NB();
+volatile uint16* SAL_ModePar_GetBuf2_NB();
+volatile uint16* SAL_ModePar_GetBuf3_NB();
+volatile uint16* SAL_ModePar_GetBuf_WB();
+volatile uint16* SAL_ModePar_GetBuf2_WB();
+volatile uint16* SAL_ModePar_GetBuf3_WB();
+volatile uint16* SAL_ModePar_GetBuf_SWB();
+volatile uint16* SAL_EMP_DebugInfo_GetBuf();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_NB();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_WB();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_SWB();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_LSPK_NB();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_LSPK_WB();
+volatile uint16* SAL_DMNR_GetFltCoefAddr_LSPK_SWB();
+void SAL_TST_Handler(int16 cmd);
+bool SAL_DSPINT_Resolve(uint16 iid, uint32 * sph_int);
+void SAL_PcmEx_Config(Sal_PCMEx_Config_t* cfg);
+void SAL_PcmEx_SetStateUL(Sal_PcmEx_Type_t type, Sal_PcmEx_State_t sta);
+void SAL_PcmEx_SetStateDL(Sal_PcmEx_Type_t type, Sal_PcmEx_State_t sta);
+bool SAL_PcmEx_CheckStateUL(Sal_PcmEx_Type_t type, Sal_PcmEx_State_t sta);
+bool SAL_PcmEx_CheckStateDL(Sal_PcmEx_Type_t type, Sal_PcmEx_State_t sta);
+bool SAL_PcmEx_IsCtrlClean(Sal_PcmEx_Type_t type);
+void SAL_PcmEx_SetCtrlClean(Sal_PcmEx_Type_t type);//dangerous operation
+volatile uint16* SAL_PcmEx_GetBuf(Sal_PcmEx_BufId_t id);
+volatile uint16* SAL_IIR_Coef_GetBuf(Sal_IIR_Coef_t id);
+uint16 SAL_PcmEx_GetBufLen(Sal_PcmEx_BufId_t id);
+uint16 SAL_AGC_GetSWGain(uint8 mic); // 0 -> mic1, 1 -> mic2
+bool SAL_3G_Mode();
+void SAL_VM_Config(Sal_VM_Config_t * cfg);
+void SAL_VM_GetFrame2G(Sal_VM_Frame * vmfrm);
+void SAL_VM_GetFrame3G(Sal_VM_Frame * vmfrm);
+void SAL_EPL_GetFrame(Sal_EPL_Frame * eplfrm);
+void SAL_LBK_Codec(bool on);
+uint16 SAL_Sidetone_GetAdaptiveGain();
+void SAL_Sidetone_SetGain(uint16 val);
+void SAL_Sidetone_Enable(bool ena);
+uint16 SAL_DGain_Get_DL();
+void SAL_DGain_Set_DL(uint16 val);
+uint16 SAL_DGain_Get_UL();
+void SAL_DGain_Set_UL(uint16 val);
+void SAL_AGC_SetGain(uint16 val);
+void SAL_BT_Config(Sal_BT_Config *cfg);
+bool SAL_BT_IsEnable();
+void SAL_Mute_Ctrl(Sal_Mute_Point_t ctrl, bool mute);
+bool SAL_Mute_Check(Sal_Mute_Point_t ctrl);
+void SAL_CTM_Switch(bool on);
+void SAL_CTM_SetGain(uint16 limit, uint16 update);
+uint16 SAL_CTM_GetValue(uint16 type);
+bool SAL_CTM_IsIdle();
+bool SAL_CTM_IsOff();
+void SAL_AGC1_Config(Sal_AGC_Config_t *cfg);
+void SAL_AGC2_Config(Sal_AGC_Config_t *cfg);
+void SAL_AGC3_Config(Sal_AGC_Config_t *cfg);
+void SAL_AGC4_Config(Sal_AGC_Config_t *cfg);
+void SAL_NotchFilter_Enable(bool ena, bool thirdStageIIR);
+void SAL_8K_Resync(bool ul, int16 ul_offset, bool dl, int16 dl_offset);
+void SAL_GetWarnMsg(uint16 *ulcode, uint16 *dlcode);
+void SAL_2G_SMR_Switch(bool on);
+void SAL_VOLTE_SetInfo(Sal_VOLTE_info_t info, uint16 val);
+volatile uint16* SAL_ENH_GetInternalParAddr();
+void SAL_PCM_Router_Open(Sal_PCM_Router_t *pcmrt, Sal_SRst_Type_t type);
+void SAL_PCM_Router_Close(uint32 dsp_end);
+uint16 SAL_GetDLVADFlag();
+volatile uint16* SAL_FS_GetFltCoefAddr();
+void SAL_4G_ExtCod_Call_Open(uint32 band, Sal_ExtCod_t Cod,uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+void SAL_4G_ExtCod_Call_Close(uint32 dsp_end);
+void SAL_C2K_Call_Open(uint16 u2SO, bool bDtx, uint16 u2DelR, uint16 u2DelW, uint16 u2DelM, Sal_SRst_Type_t type);
+void SAL_C2K_Call_Close(bool bDsp_end);
+bool SAL_C2K_IsULReady(void);
+void SAL_C2K_SetULEmpty(void);
+bool SAL_C2K_IsDLEmpty(void);
+void SAL_C2K_SetDLReady(void);
+void SAL_C2K_SetULUnsync(void);
+void SAL_C2K_SetValue(uint16 u2ValId, uint16 u2Val);
+void SAL_C2K_TTY_Switch(bool bOn);
+void SAL_C2K_SetTTYStatus(bool bUL, bool bDL);
+void SAL_C2K_COD_Feature_Switch(uint16 u2CodFea, bool bOn);
+volatile uint16* SAL_C2K_GetAddr(uint16 type);
+uint16 SAL_C2K_GetValue(uint16 type);
+void SAL_VM_GetFrameC2K(Sal_VM_Frame *vmfrm);
+void SAL_SCH_Feature_Switch(uint16 u2SchFea, bool bOn);
+void SAL_TestMode_Config(uint16 TestMode_Ctrl, uint16 TestMode_Scenario);
+void SAL_DebugMode_Config(uint16 DebugMode);
+void SAL_TestMode_AFEDVT_Config(uint16 UL_Ch, uint16 DL_Ch);
+void SAL_4G_EVS_Call_Open(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+void SAL_4G_EVS_Call_Close(uint32 dsp_end);
+void SAL_EVS_Set_Enc_Par(EVS_ENCODER_PARAMETER *EncPar);
+void SAL_EVS_Set_Dec_Par(EVS_DECODER_PARAMETER *DecPar, uint16 Nth_Frm);
+bool SAL_EVS_Get_Enc_SIDFirst_Status();
+void SAL_EVS_Set_Dec_SIDFirst_Status(bool sta, uint16 Nth_Frm);
+kal_uint16 SAL_EVS_Get_Dec_BFI(uint16 Nth_Frm);
+kal_uint16 SAL_EVS_Get_Dec_HBLen(uint16 Nth_Frm);
+kal_uint16 SAL_EVS_Get_Enc_BFI();
+kal_uint16 SAL_EVS_Get_Enc_HBLen();
+bool SAL_EVS_IsDTXOn();
+kal_uint16 SAL_EVS_Get_PCMBW();
+kal_uint16 SAL_EVS_Get_Enc_MaxRate();
+kal_uint16 SAL_EVS_Get_Enc_CA_Enable();
+kal_uint16 SAL_EVS_Get_Enc_CA_RF_FEC_Indicator();
+kal_uint16 SAL_EVS_Get_Enc_CA_RF_FEC_Offset();
+kal_uint16 SAL_EVS_Get_Dec_CA_FrmMode(uint16 Nth_Frm);
+kal_uint16 SAL_EVS_Get_Codec_Mode(kal_uint16 type);
+void SAL_Sph_KeyTone_DL_On(kal_uint16 Freq1, kal_uint16 Freq_2, kal_uint16 DLGain);
+void SAL_Sph_KeyTone_DL_Off();
+void SAL_Sph_KeyTone_UL_On(kal_uint16 Freq1, kal_uint16 Freq_2, kal_uint16 ULGain);
+void SAL_Sph_KeyTone_UL_Off();
+void SAL_ENH_ExtEchoRef_Switch(bool on);
+void SAL_ENH_ExtEchoRef_DelayConfig(kal_uint16 Id, kal_uint16 RefDelay, kal_uint16 ULDelay);
+void SAL_Set_LinkStatus(kal_uint16 LinkMode, bool on);
+
+void SAL_4G_Call_Handover(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+void SAL_4G_EVS_Call_Handover(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+
+void SAL_Set_DevInfo(Sal_DevInfo_Int_t IntDevInfo, Sal_DevInfo_Ext_t ExtDevInfo);
+void SAL_Set_SmartPA_Config(Sal_SmartPA_Config_t SmartPACfg);
+void SAL_Standby_Call_Open(uint32 enc_mod, uint32 dec_mod, uint32 dtx, uint32 delR, uint32 delW, uint32 delM, Sal_SRst_Type_t type);
+void SAL_Standby_Call_Close(uint32 dsp_end);
+void SAL_SetCallCloseWithFSM();
+bool SAL_IsCallCloseDone();
+
+void SAL_AAMPlus_Switch(bool on);
+Sal_AAMPlus_State_t SAL_AAMPlus_Get_Enc_State();
+kal_uint16 SAL_AAMPlus_Get_Period();
+
+void SAL_ENH_OccupyParMem();
+void SAL_ENH_ReleaseParMem();
+bool SAL_ENH_IsParMemAvailable();
+void SAL_Set_AWBPlusFlag(bool on);
+
+void SAL_RampDown_SetInit(Sal_Ramp_Point_t ctrl);
+void SAL_RampUp_SetInit(Sal_Ramp_Point_t ctrl);
+bool SAL_RampDown_IsDone(Sal_Ramp_Point_t ctrl);
+bool SAL_RampUp_IsDone(Sal_Ramp_Point_t ctrl);
+void SAL_Ramp_SetFinal(Sal_Ramp_Point_t ctrl);
+Sal_Ramp_State_t SAL_Ramp_GetState(Sal_Ramp_Point_t ctrl);
+void SAL_Ramp_SetMute(Sal_Ramp_Point_t ctrl);
+void SAL_Ramp_SetUnMute(Sal_Ramp_Point_t ctrl);
+void SAL_Set_MOSTestMode(bool update, kal_uint16 MOSTestMode);
+void SAL_Set_Repeat_Flag(kal_uint16 flag);
+kal_uint16 SAL_Get_Repeat_Flag();
+void SAL_ExtAUIF_SetMemAddr(Sal_ExtAUIF_Mem_Type_t MemType, kal_uint32 StarAddr, kal_uint32 Len);
+void SAL_Set_OpenDsp(bool on);
+void SAL_Get_Delay(Sal_Delay_Type_t type, kal_uint16 offset_ul, kal_uint16 offset_dl, kal_uint16 *DelR, kal_uint16 *DelW, kal_uint16 *DelM);
+void SAL_Get_AAM_Offset(Sal_Delay_Type_t type, kal_uint16 offset_ul, kal_uint16 period_ul, kal_uint16 offset_dl, kal_uint16 period_dl, kal_uint16 *offset_AAM);
+void SAL_Get_AAM_Margin(Sal_Delay_Type_t type, kal_uint16 offset_ul, kal_uint16 period_ul, kal_uint16 offset_dl, kal_uint16 period_dl, kal_uint16 *margin_AAM_ul, kal_uint16 *margin_AAM_dl);
+void SAL_AAM_SetPar(Sal_Delay_Type_t type, kal_uint16 margin_ul_cur, kal_uint16 period_ul, kal_uint16 margin_dl_cur, kal_uint16 period_dl);
+bool SAL_AAM_CheckReset();
+
+kal_uint16 SAL_Get_DuDuPtnFlag();
+
+void SAL_4G_Set_RxType(uint32 rx_type, uint32 Nth_Frm);
+uint16 SAL_4G_GetRXValue(uint16 type, uint16 Nth_Frm);
+volatile uint16* SAL_4G_GetRXAddr(uint16 type, uint16 Nth_Frm);
+void SAL_4G_SetDLHBValid(bool bValid, uint16 Nth_Frm);
+kal_uint16 SAL_4G_GetTSSwitch();
+void SAL_4G_SetTSScale(int16 Scale, int16 MaxScale, uint16 Nth_Frm);
+kal_uint16 SAL_Get_RingBuf_RemainLen();
+kal_uint16 SAL_Get_RingBuf_TotalLen();
+kal_uint16 SAL_Get_DL_CodecMode();
+
+void SAL_Mixer2_SetInit();
+bool SAL_Mixer2_IsRunning();
+bool SAL_Mixer2_IsIdle();
+void SAL_Mixer2_SetFinal();
+void SAL_Mixer2_Config(uint32 ulgain, uint32 dlgain, uint32 ulmix, uint32 dlmix);
+volatile uint16* SAL_Mixer2_GetBuf_DL();
+uint32 SAL_Mixer2_GetDataLen_DL();
+volatile uint16* SAL_Mixer2_GetBuf_UL();
+uint32 SAL_Mixer2_GetDataLen_UL();
+
+kal_uint16 SAL_Get_VCPMode();
+void SAL_LBK_PCM_D2U(bool on);
+
+kal_uint16 SAL_Get_DMFSource();
+kal_uint16 SAL_Get_DMFRate();
+void SAL_Get_DMF_SPH_UL_Info(Sal_DMF_SPH_UL_Info_t *DMF_SPH_UL_Info);
+void SAL_Get_DMF_SPH_DL_Info(Sal_DMF_SPH_DL_Info_t *DMF_SPH_DL_Info);
+void SAL_Get_DMF_ENH_UL_Info(Sal_DMF_ENH_UL_Info_t *DMF_ENH_UL_Info);
+kal_int16 SAL_Get_DMFPwr_UL();
+kal_int16 SAL_Get_DMFPwr_DL();
+void SAL_Set_SRstType(Sal_SRst_Type_t type);
+
+void SAL_Mixer3_SetInit();
+bool SAL_Mixer3_IsRunning();
+bool SAL_Mixer3_IsIdle();
+void SAL_Mixer3_SetFinal();
+void SAL_Mixer3_Config(uint16 gain, uint16 mix);
+volatile uint16* SAL_Mixer3_GetBuf();
+void SAL_Mixer3_SetDataLen(uint16 len);
+void SAL_Set_PSRANType(uint16 type);
+
+kal_uint16 SAL_VM_Get_TS_Info(Sal_VM_TS_Info_t TS_Info_Type);
+kal_uint16 SAL_VM_Get_CodBand();
+void SAL_SVC_Set_JBMVersion(uint8 version);
+
+void SAL_DTMF_Removal_Ctrl(Sal_DTMF_Removal_Point_t ctrl, bool on);
+void SAL_UltraSound_Removal_Switch(bool on);
+
+kal_uint16 SAL_Get_Codec_Mode(kal_uint16 type);
+#endif