📄 am_app_logic_processor_main.cc
字号:
01-10-04 w17860 CR - LIBbb04105 When we are in a TTY call, all the in-call tones should be muted 01-10-02 arc095 CR - LIBbb06412 Need notification when switch from vib to ring in vib/ring alert mode 01-12-20 ktang CR - LIBbb13753 Audio Media Request Redirection 01-07-10 qcf001 CR - LIBaa08520 Entertainment Mute for dumb telematics accessory 01-06-20 qcf001 CR - LIBaa06511 Remove check for alerts in-call, allow them for calling app. 01-04-10 qcf001 CR - CSGce93250 FM Power Savings via SW B+ 01-04-03 ktang CR - CSGce93816 AM needs to wait for tone cmp for AVC UL DTMF before disconnecting it - turns on ul_dtmf_lock in get_tone_insertion_method when DTMF UL TX 01-05-14 llee CR - CSGce94136 Send audio start/stop indicator to DL for ent. mute 01-03-18 rsubram CR - CSGce91729 Audio Manager does not seem to unmute FM radio after VN recording or playback - set the variable is fm_muted to TRUE when we muted the FM radio when there was a stop tone for it. 01-03-15 mtaraba CSGce90543 AM is sending CTG_ON command unnecessarily resulting in VR hangup 01-03-08 mtaraba CSGce91273 Fix is_va_active() to report correctly 01-03-26 mloutris CSGce87756 MP3 Lite: Audio Manager needs to support the MP3 clip-on accessory. 01-02-26 mtaraba CSGce89691 Add DAI support out of a call 01-01-11 shagino CR - CSGce84258 Ring is not working - Changed function call to determine incall status to audio is_incall function. - Changed alert to proper SMS alert. 00-10-10 lorih CR - CSGce74373 Need to reverse setting up audio from ending audio. 00-10-09 rsubram CR - CSGce75368 Unmuting the audio paths for the dumb accessories when connected - Added conditions to find out whether FM radio is on the queue or not. - Added the hapi command to mute FM when there is a stop tone. 00-09-21 ktang CSGcs73690 Fix to remove correct sample alert from tone table in DL - Changed the calls to function aud_tone_cnf upon DL's request 00-09-27 rsubram CR - CSGce74495 Volume up/down keys are not getting muted when FM radio is playing - Added the tone type for Volume key in IsAnykey function 00-08-31 cfarrel CR - CSGce71001 Protect against being sent a tone stop when no previous start was sent 00-08-23 mtaraba CR - CSGce65193 Move AM_AUDIO_PATH_TYPE enumeration to a global header file - include audio_path_types.h 00-08-09 mtaraba CR - CSGce55882 Eliminate file gsm.h from audio manager 00-08-18 ktang CR - CSGce51877 Update Audio Manager to ITL Sound StyleGuide - Added local function get_path() 00-08-17 rsubram CR - CSGce70270 Porting FM radio changes to ATSO -Updated tone to path type for FM radio in generate_tone() -Added a call to get the radio mask in update_audio() -Added an additional condition in generate_tone() to mute FM radio when a call comes in. 00-08-08 ktang CR - CSGce66238 Add Ringer/Vibrate functionality 00-08-09 ktang CR - CSGce68222 Adding the one-shot tone bit mask recognition in AM - Masked out bit 11 of tone_type in function generate_tone, when path_type is being determined. 00-08-14 ktang CR - CSGce68045 Analog Network DTMF fixes - Added analog DTMF support in functions generate_tone and get_tone_insertion_mode; and - Romoved previous analog DTMF calls in functions generate_tone and update_audio. 00-05-26 shagino CR - CSGce59603 Re-Merge in changes that were removed 00-05-05 shagino CR - CSGce56425 Implement handsfree_status funtion - Add handsfree_status function. - Updated DL types to match new naming convention. 00-04-19 mkloza PR - CSGce54341 MATRIX Command implementation - modified update_audio() 00-04-06 shagino CR - CSGce53305 Audio Mute Request - Added variables to be initialized in AM_App_Logic_Processor_main constructor 00-03-28 shagino CR - CSGce53043 Stop all tones - Implemented the function stop_tones() 00-03-02 ktang CR - CSGce50329 Sierra Audio Manager CTG fix - Add the differentiation between handling AUD_TONE COMPLETE and AUD_TONE_STOP (the former does not casue to issue tone stop request to DSP) 99-11-17 shagino PR - CSGce39546 Phase III Long & Short DTMF for GRiEF Audio - Took away the timers and DTMF queue since they will be now be implemented by the DSP. - Added calls to feature database. 99-10-25 ktang PR - CSGce40494 GRiEF AM Music Ringer - Took away the music sequencer call from function generate_tone 99-10-01 mkloza CR - CSGce39421 GRiEF - Analog DTMF Tones - added timers to maitain minimum DTMF tone duration and interval between DTMF tones. 99-10-11 ktang PR - CSGce39518 GRiEF Phase II Audio - Volume/DTMF/MIC/SPKR Gain Feature DB works - Update function get_tone*//************** INCLUDES ******************************************************/#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/audio_path_types.h>#include <ENGINE_AUDIO/td_ckm_phone_adaptor_type.h>#include <audio/AM_App_Logic_Processor.H>#include <audio/am_app_configuration_server.h>#include <audio/AM_App_Configuration_Server.H>#include <audio/am_hw_primitive_builder_main.h>#include <ENGINE_AUDIO/aud_prim_ids.h>#include <audio/AM_SendMessage.h>#include <audio/am_app_logic_processor_mask.h>#include <audio/AM_Device_Layer_Interface.H>#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#include <SYNERGY_DEVICE_LAYER/dl_acc_msg.h>#include <SYNERGY_DEVICE_LAYER/dl_ports.h>#include <audio/AM_Tone_Sequence_Handler.H>#include <audio/AM_Timer_Vibrate.H>#include <audio/AM_Timer_Container.H>#include <ENGINE_HAPI/hapi_portlist.h>#include <ENGINE_HAPI/hapi.h>#include <ENGINE_AUDIO/aud_sdvr_capture_req.h>#include <ENGINE_AUDIO/aud_sdvr_delete_voice_tag_req.h> #include <ENGINE_AUDIO/aud_sdvr_model_id_req.h>#include <ENGINE_AUDIO/aud_sdvr_start_req.h>#include <ENGINE_AUDIO/aud_sdvr_train_req.h>#include <audio/am_va_vr_command_types.h>#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )#include <audio/AM_App_VA_VR_Server.H>#endif#include <audio/AM_Event_Handler.H>#include <ENGINE_AUDIO/aud_interface.h>#include <audio/am_globals.h>#include <audio/AM_FM_Power_Timer.H>#include <audio/am_app_logic_processor_main.h>#include <audio/am_utils.h>#include <ENGINE_AUDIO/aud_alert_info.h>#include <MME/mm_auf_avp.h>#include <SYNERGY_DEVICE_LAYER/dl_db_feature_ids.h>#include <ENGINE_AUDIO/am_c_utilities.h>#include <rtime_maint/rtime_maint_poll_headset.h>#include <SYNERGY_DEVICE_LAYER/dl_db_flexing_auf.h>#if (AUDIO_RAINBOW == FALSE)#include <MME/mme_mof_isr.h>#endif#if (MAKE_TELEMATICS == TRUE) #include <ENGINE_AUDIO/aud_audio_start_stop.h>#endif#include <BUILD/hardware.h>#include "AM_Timer_Non_SC.cc"#include <audio/am_server_task.h>#include <MME/mme_resm_main.h>#include <SYNERGY_DEVICE_LAYER/dl_rsrc_mgr_auf.h>/************** LOCAL CONSTANTS ***********************************************/static const AM_APP_TONE_TO_PATH tone_to_path_table [] = { { DL_AUDIO_TONE_TYPE_UI_LITE_ID_LIMIT, AM_AUDIO_PATH_ID_UI_LITE }, { DL_AUDIO_TONE_TYPE_KEY_LITE_ID_LIMIT, AM_AUDIO_PATH_ID_KEY_LITE }, { DL_AUDIO_TONE_TYPE_NETWORK_LITE_ID_LIMIT, AM_AUDIO_PATH_ID_NETWORK_LITE }, { DL_AUDIO_TONE_TYPE_ALERT_CTG_END, AM_AUDIO_PATH_ID_ALERT_LITE }, /*tones in this space are played by the MME*/ { DL_AUDIO_TONE_TYPE_PHONE_TONE_ID_LIMIT, AM_AUDIO_PATH_ID_PHANTOM_TONE }, { DL_AUDIO_TONE_TYPE_MP3_PLAYER+1, AM_AUDIO_PATH_ID_EXT_GEN_AUDIO}, { DL_AUDIO_TONE_TYPE_RADIO+1, AM_AUDIO_PATH_ID_RADIO_TONE }, { DL_AUDIO_TONE_TYPE_MULTIMEDIA_CAPTURE+1, AM_AUDIO_PATH_ID_MULTIMEDIA_CAPTURE}, { DL_AUDIO_TONE_TYPE_NORMAL_MULTIMEDIA_LIMIT, AM_AUDIO_PATH_ID_MULTIMEDIA_PLAY}, { DL_AUDIO_TONE_TYPE_MULTIMEDIA_ALERT_LIMIT, AM_AUDIO_PATH_ID_MULTIMEDIA_ALERT}, { DL_AUDIO_TONE_TYPE_MULTIMEDIA_UI_LIMIT, AM_AUDIO_PATH_ID_MULTIMEDIA_UI}, { DL_AUDIO_TONE_TYPE_MULTIMEDIA_MFT_VIB_LIMIT, AM_AUDIO_PATH_ID_MULTIMEDIA_MFT_VIB}, { DL_AUDIO_TONE_TYPE_MULTIMEDIA_VIDEO+1, AM_AUDIO_PATH_ID_MULTIMEDIA_VIDEO}, { DL_AUDIO_TONE_TYPE_FUNLIGHT+1, AM_AUDIO_PATH_ID_FUNLIGHTS }, { DL_AUDIO_TONE_TYPE_VOICE_LIMIT, AM_AUDIO_PATH_ID_VOICE }};/************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************/AM_AUDIO_PATH_TYPE get_path (TD_AUD_TONE_UNION_T tone);/************** LOCAL MACROS **************************************************//* Change Alert Ramp up Start to 3 per request from HB for C650*/#define ALERT_RAMP_UP_START_VOLUME 3/************** LOCAL VARIABLES ***********************************************/AM_Relay_Layer AM_App_Logic_Processor :: relay_layer;extern AM_Event_Handler * am_event_handler;extern MMSS_MEDIA_HANDLE_T mp3_ringer_media_handle_glb;/* Notification to DL of when we start a call (for VR disabling */UINT8 vr_unavailable = FALSE;BOOL fm_muted = FALSE; BOOL is_ext_generated_audio_on_queue = FALSE; /************** FUNCTION DEFINITIONS ******************************************//* DESCRIPTION: A local function to get the audio path, given tone id. INPUTS: Tone id OUTPUTS: Audio path type IMPORTANT NOTES: None.*/ AM_AUDIO_PATH_TYPE get_path (TD_AUD_TONE_UNION_T tone){ AM_AUDIO_PATH_TYPE path = AM_AUDIO_PATH_ID_INVALID_TONE; // the pwrup bit dictate this tone to be power up tone // and if the tone type in power up/down is media get the regular path. if ( (tone.fields.pwrup == 1) && (tone.type != DL_AUDIO_TONE_TYPE_INVALID_TONE) && (tone.fields.media != 1) ) { path = AM_AUDIO_PATH_ID_UI_LITE; } else { // preset tones for (UINT8 i = 0; i < sizeof (tone_to_path_table) / sizeof (AM_APP_TONE_TO_PATH); i++) { if ( tone.fields.id < tone_to_path_table[i].tone_id_limit ) { path = tone_to_path_table[i].path_type; break; } } } return (path);}/* DESCRIPTION: Constructor for AM_App_Logic_Processor class Initialize event queue and primitive_builder. INPUTS: hw layer pointers and event queue pointers to indicate what memory to use OUTPUTS: None IMPORTANT NOTES: Both event_queue and hardware layer use the memory block allocated in event logic layer as their working space.*/ #if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )AM_App_Logic_Processor :: AM_App_Logic_Processor ( AM_AUDIO_INFO* hw_info_ptr, AM_APP_VA_VR_SERVER* va_vr_info_ptr ) : primitive_builder (hw_info_ptr, va_vr_info_ptr), va_vr_server( va_vr_info_ptr ),#elseAM_App_Logic_Processor :: AM_App_Logic_Processor ( AM_AUDIO_INFO* hw_info_ptr): primitive_builder (hw_info_ptr),#endif tx_mute (FALSE), rx_mute (FALSE), ul_dtmf_lock (FALSE)#if (AUDIO_RAINBOW == TRUE) , clock_rate (HAPI_CODEC_CLK_13M)#endif{ SU_RET_STATUS err; AudioLowPowerHandle = suAllocLowPowerFlag(SU_LOWPWR_ENABLE, &err); earphone_ringer_option_state = DL_DB_FEATURE_STATE_ERO_SPEAKER_ONLY;#if (MAKE_TELEMATICS == TRUE) old_path_type = AM_AUDIO_PATH_ID_INVALID_TONE; old_mic_routing = AM_AUDIO_ROUTING_TYPE_NONE; old_spkr_routing = AM_AUDIO_ROUTING_TYPE_NONE;#endif}/* DESCRIPTION: Processes a voice event. Pushes AUD_TONE_VOICE on queue when started and pops AUD_TONE_VOICE from queue when stopped. INPUTS: action to perform OUTPUTS: None IMPORTANT NOTES: None */voidAM_App_Logic_Processor :: generate_voice (TD_AUD_TONE_REQ_TYPE request)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -