| #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 |