📄 am_app_logic_processor_mask.cc
字号:
Entertainment Mute for dumb telematics accessory 01-08-02 qcf001 CR - LIBbb01895 01-08-06 llee CR - LIBaa01234 Fixed MASS problem for open flip, and ring... 01-07-06 qcf001 CR - LIBaa07510 Need to play various tones at in-call volumes, as to not blast users ear - Various ringback and error tones were played at full volume, add to the list of in-call only tones. 01-04-19 mloutris CR - CSGce95406 AUDIO: GSM needs DSP msg to start companding during speakerphone mode. - Added code to set a bit to indicate when companding should be enabled or disabled in execute. 01-07-01 rsubram CSGce95427 TELEMATICS: Need noise suppression and echo control to be dynamic. 01-06-12 llee CR - LIBaa04168 Audio routing for Telematics dev. should be based on feature state setting 01-06-05 lorih CSGce94040 Sapphire chirp when closing flip to end a call. 01-05-14 llee CR - CSGce94136 Send audio start/stop indicator to DL for ent. mute 01-05-23 mloutris CR - LIBaa02320 Adding call for DSP audio shaping filter to reduce noise in Sapphire. 01-04-25 mtaraba CSGce90407 VA Playback during a call 01-04-23 mtaraba CSGce95210 CT:1456 Echo cancelation problem in a digital to analog hand off 01-04-18 mloutris CSGce95746 Audio: Some VA record paths are mapped incorrectly in R1.1. 01-04-03 ktang CR - CSGce93816 AM needs to wait for tone cmp for AVC UL DTMF before disconnecting it - in CDMA, leave matrix TONE_GEN to UL SPEACH 0xFFFF when ul_dtmf_lock on GSM / TDMA, leave TONE_GEN to UL SPEACH 0x800 when ul_dtmf_lock on 01-04-02 mtaraba CSGce93745 Reduce complexity of set_hardware_mask() 01-03-26 mloutris CSGce87756 MP3 Lite: Audio Manager needs to support the MP3 clip-on accessory. 01-03-22 mloutris CR - CSGce92582 TDMA analog uplink DTMF tones do not work over AVC. - Added a set matrix call for TONE_GEN to UPLINK_SPEECH. 01-03-15 mtaraba CSGce90543 AM is sending CTG_ON command unnecessarily resulting in VR hangup 01-02-09 lorih CSGce88102 Keypress treated as SEND/END with neckloop in call. -For headset, leave mic bias on in call. 01-02-09 mtaraba CSGce87899 Beep recorded with voice note 01-01-29 mtaraba CSGce79517 Fix VA record in a call 01-01-26 mtaraba CSGce85892 Voice Notes is not recording a Call 01-01-22 mtaraba CSGce82103 Audio not routed properly for Desktop Speakerphone 01-01-02 mloutris CR - CSGce78231 GSM: Adapative Earpiece Volume Control - Added a global volume var to compare changes in volume. - Added a global flag to indicate we should enable/disable AVC. 00-12-21 mtaraba CSGce82934 00-12-05 mloutris CR - CSGce80541 00-11-21 mloutris CR - CSGce81051 00-11-28 rsubram CR - CSGce81171 00-11-20 mtaraba CSGce69100 00-11-14 mloutris CR - CSGce80313 00-11-08 mtaraba CSGce77632 00-11-04 cfarrel CR - CSGce78479 00-11-03 mloutris CR - CSGce79140 00-10-30 rsubram CSGce78183 00-10-24 rsubram CSGce76521 00-10-09 rsubram CR - CSGce75368 00-09-27 mtaraba CSGce74448 00-09-27 rsubram CR - 73284 00-09-26 mloutris CR - CSGce74257 00-09-22 mtaraba CSGce73234 00-09-21 mtaraba CSGce73696 00-09-11 mtaraba CR - CSGce68318 00-09-11 Dale Noble CSGce72195 00-08-31 hchuang CSGce68045 ======== ======== ==========*//************** INCLUDES ******************************************************/#include <SUAPI/suapi.h>#include <string.h>#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <ENGINE_HAPI/hapi_ext.h>#include <audio/am_app_logic_processor_mask.h>#include <audio/AM_App_Logic_Processor.H>#include <audio/am_hw_primitive_builder_main.h>#include <SYNERGY_DEVICE_LAYER/dl_db_feature_ids.h>#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#include <SYNERGY_DEVICE_LAYER/dl_acc_auf.h>#include <SYNERGY_DEVICE_LAYER/dl_ports.h>#include <audio/am_app_configuration_server.h>#include <audio/AM_App_Configuration_Server.H>#include <audio/AM_HW_Primitive_Builder.H>#include <audio/AM_Event_Handler.H>#include <ENGINE_AUDIO/am_c_utilities.h>#include <audio/AM_Tone_Sequence_Handler.H>#include <audio/AM_App_Feature_Server.H>#include <ENGINE_AUDIO/aud_ctia_mode_req.h>#include <audio/audio_ctia.h>#include <audio/am_globals.h>#include <audio/am_utils.h>#include <ENGINE_AUDIO/aud_alert_info.h>#include <ENGINE_AUDIO/aud_prim_ids.h>#include <ENGINE_AUDIO/audio_path_types.h>#include <SYNERGY_DEVICE_LAYER/dl_db_flexing_auf.h>#include <MME/mme_resm_main.h>#include <audio/AM_SendMessage.h>#include <ENGINE_SEEM/seem_fdi_outside_seem_access.h>#if ( ( MAKE_PTT_CLIENT == MAKE_PTT_CLIENT_SONIM ) \ || ( MAKE_PTT_CLIENT == MAKE_PTT_CLIENT_WINPHORIA ) ) #include <SYNERGY_DEVICE_LAYER/dl_ptt_auf.h> #if ( MAKE_PTT_CLIENT == MAKE_PTT_CLIENT_WINPHORIA ) #include <dl_ptt_sp/mot_voc.h> #endif#endif#if (AUDIO_GSM == TRUE) #ifndef HAPI_MDI_MESSAGE_IDS_INCLUDE #include <audio/am_app_logic_processor_main.h> #include <ENGINE_HAPI/hapi_mdi_message_ids.h> #endif#endif#if (defined(MAKE_FTR_VST) && (MAKE_FTR_VST == TRUE))extern "C" { BOOL vst_tts_playback_check(void); void vst_tts_set_playback_flag(void); void vst_tts_clear_playback_flag(void);}#endif#if (MAKE_HDW_OKI == TRUE)#include "am_soundlib_utilities.h"#endif#if (MAKE_NEPTUNE_CHIPSET == TRUE)#include <BUILD/feature.h>#endif#include <BUILD/hardware.h>#if (MAKE_FTR_UMA == TRUE) #include <ENGINE_GSM_STACK/uac/uac_auf.h> // Added for Bluephone support#endif/************** GLOBAL VARIABLES **********************************************/UINT16 am_automatic_volume_control = AM_APP_DSP_ADAPTIVE_VOLUME_UNCHANGED;// am_bt_dual_routing is a semaphore used when only to make sure// that we don't turn off the SCO link for dual routed BT alerts // when we call get_gain() for the internal speakerphone.// Normally we turn off the SCO in get_gain() if the device is not// a Bluetooth device.BOOL am_bt_dual_routing = FALSE; /************** LOCAL CONSTANTS ***********************************************/ #if (AUDIO_GSM == TRUE)#define VA_BEEP_UPLINK_GAIN 0x0800/*Beep record gain not used*/ #define VA_BEEP_RECORD_GAIN 0xFFFF#else#define VA_BEEP_UPLINK_GAIN 0x0021#define VA_BEEP_RECORD_GAIN 0x0066#endif/************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************/#if (MAKE_RAINBOW_CHIPSET == FALSE)void determine_automatic_vol_control ( UINT8 & old_voice_volume_step, UINT8 new_voice_volume_step, UINT8 device, BOOL in_call);#endifvoid enable_disable_dsp_alg(void);BOOL is_device_headset(UINT8);BOOL is_mft_selected(UINT8);void carkit_companding( AM_AUDIO_INFO *info_ptr, UINT8 device );void carkit_hifi_companding( AM_AUDIO_INFO *info_ptr, UINT8 device );void am_anm_setup( AM_AUDIO_INFO *info_ptr, UINT8 device, UINT8 volume, UINT8 & old_voice_volume_step, BOOL in_call );#if ( MAKE_PTT == TRUE )DL_PTT_CALL_STATE_T am_is_ptt_call_active(void);#endif/************** LOCAL MACROS **************************************************//************** LOCAL VARIABLES ***********************************************/UINT8 is_audio_in_voice_call = FALSE;BOOL is_ce_bus_unmute = FALSE;#if (AUDIO_GSM == TRUE) static UINT8 old_voice_volume_step = 0;#endif/* Will be initialized in the function */BOOL am_en_ec, am_en_ns, am_en_avc, am_en_as, am_en_anm;BOOL am_set_tx_mute = FALSE;#if ( MAKE_PTT == TRUE )DL_PTT_CALL_STATE_T am_is_ptt_call;#endif/************** FUNCTION DEFINITIONS ******************************************//* DESCRIPTION: This Function sets all necessary info for hardware layer INPUTS: Pointer to structure containing all Audio info OUTPUTS: None IMPORTANT NOTES: None */voidAM_App_Logic_Processor :: set_hardware_mask ( AM_AUDIO_INFO *info_ptr ){ /**************************************************************************/ /* DETERMINE PHONE STATE */ /**************************************************************************/ BOOL in_call = relay_layer.is_incall(); GAIN_STRUCT* gain_table_ptr = 0; UINT8 volume = info_ptr->vol_step; UINT8 chosen_device; Tone_Item * front = eventqueuehandler.GetCurrent(); TD_AUD_TONE_UNION_T tone = front->ToneEvent; info_ptr->codec_type = PHONE_CODEC; info_ptr->echo_mode = ECHO_MODE_NONE;#if ( MAKE_TELEMATICS == TRUE) /* local variables for creating audio start/stop message for PSE ent. mute */ AM_AUDIO_ROUTING_TYPE mic_routing; AM_AUDIO_ROUTING_TYPE spkr_routing; AUD_AUDIO_START_STOP_IND_T * msgptr = NULL; SU_RET_STATUS err;#endif DL_DB_FEATURE_SETTING_T feature_state; DL_DbFeatureGetCurrentState (DL_DB_FEATURE_ID_PATH_TYPE, &feature_state); /***************************************************************************/ /* SET DEFAULT HARDWARE STATE */ /***************************************************************************/ set_matrix( info_ptr, ALL_SOURCES, ALL_DESTINATIONS, (INT16) DISCONNECT_DSP_AUDIO ); // SAP CONFIGURATION info_ptr->SAP_config = SAP_DEFAULT_CONFIG; info_ptr->dai_mode = DL_AUDIO_TONE_TYPE_DAI_NORMAL; info_ptr->dai_type = 0x0000; info_ptr->hardware_gain_mic = 0x00000000; info_ptr->hardware_gain_speaker = 0x00000000; info_ptr->ctg_gain = (UINT16) 0 ; /****************************************************************************/ /* LOOPBACK MODE */ /****************************************************************************/ if (audio_ctia_mode_enabled) { UINT8 ctia_headset_device = DL_ACC_DM_HEADSET; if (device_array[ DL_ACC_DM_EMU_HEADSET ]) { ctia_headset_device = DL_ACC_DM_EMU_HEADSET; } // PHONE MODE info_ptr->phone_mode = ~(1<<AM_HANDSFREE_AUDIO); // SPEAKER AND MIC SELECTION info_ptr->speaker = HAPI_AUD_OUT_SEL_HANDSET_SPEAKER; info_ptr->mic = HAPI_AUD_IN_SEL_HANDSET_MIC; // FILTERS CONTROL clear_bit( info_ptr->instruction_mask, AM_I_MASK_MIC_FILTER ); clear_bit( info_ptr->instruction_mask, AM_I_MASK_SPKR_FILTER ); // ECHO CONTROL clear_bit( info_ptr->instruction_mask, AM_I_MASK_NOISE_SUPPRESS ); clear_bit( info_ptr->instruction_mask, AM_I_MASK_ECHO_CONTROL ); // AUDIO DITHER CONTROL clear_bit( info_ptr->instruction_mask, AM_I_MASK_AUDIO_DITHER ); // Hardcode the volume level to 3!! volume = DL_AUDIO_VOLUME_SETTING_3; // DETERMINE THE AUDIO GAINS AND SET THE DSP MATRIX GAINS. switch ( info_ptr->path_type ) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -