📄 am_app_logic_processor_main.h
字号:
#ifndef AM_APP_LOGIC_PROCESSOR_MAIN_INCLUDE#define AM_APP_LOGIC_PROCESSOR_MAIN_INCLUDE#ifdef __cplusplus /* Allow #include in a C++ file. */extern "C" {#endif/* (c) Copyright Motorola 1996 - 2004, All rights reserved. Motorola Confidential Proprietary Contains confidential proprietary information of Motorola, Inc. Reverse engineering is prohibited. The copyright notice does not imply publication. DESCRIPTION: List of all audio path type used in audio manager. Note: audio path also served as priority used in our priority queue. So, this list defined key tone has the highest priority, staus tone follows and so on. Warning: assign AM_AUDIO_PATH_ID_KEY_TONE to only key tones (i.e. dtmf keys and functions keys), because key tones has two special features: dtmf mute and key tone mute associated with it. NOTE: AM_AUDIO_PATH_ID_VA_VR_IO is both input and output since a tone generation may take place before va/vr input starts. ************** REVISION HISTORY ********************************************** Date Author Reference ======== ======== ========================== 04-11-23 aja099 libff38547 (moved to aud_tone_type.h) VST VR Port 03-05-13 Chiarulli LIBdd01040 Modify Audio Manager to accept VST VR port from CDMA T730 2004-09-10 w16355 CR - LIBff14638 Audio Manager support for full duplex AMR voice. - Moved the tone types in this file to aud_tone_type.h 2004-11-05 w17860 LIBff24932 P4.4 Feature # 12583 Memory Reduction - Remove Voice Dial and Voice Tag 04-02-23 w18944 CR - LIBdd72710 WAV UI sounds 03-09-30 w17860 CR - LIBdd44195 MP3 Powerdwn Sound not finishing before power off 04-17-03 e11237 LIBbb87186 bluetooth HFP on triplets 03-03-25 e11237 CR - LIBbb77547 support video telephony 03-04-28 w17860 CR - LIBdd02287 Turn off Noise Suppression when Network requests it for AMR 11-12-02 e11237 LIBbb67005 fix enum mismatch with DL_AUDIO_TONE_TYPE_T 02-08-20 w18944 CR-LIBbb38487 Only turn on codec clk for bluetooth 01-12-24 byr003 LIBbb15362 - LCA catchup for R1.2.1 01-10-05 w17860 CR - LIBbb07519 Replace MAKE_EXT_SMART_AUDIO comp flag with MAKE_MP3 & MAKE_TELEMATICS 01-07-01 rsubram CSGce95427 TELEMATICS: Need noise suppression and echo control to be dynamic. - Added ent_mute, echo_control and noise_sup 01-06-11 rsubram CR - CSGce87756 Audio Manager needs to support the MP3 clip-on accessory. - Changed the tone ID for voice to MP3 tone+1 01-04-30 brd007 CR - LIBbb09128 put neptune changes in #if (NEPTUNE == TRUE) 01-04-30 baf044 CR - CSGce94381 catchup for LCA (p2k baseline: PHX4US-G_P_3000.0E.07_IG7.11) 01-04-03 ktang CR - CSGce93816 AM needs to wait for tone cmp for AVC UL DTMF before disconnecting it - Removed Uplink field from struct AM_AUDIO_INFO 01-02-26 mtaraba CSGce89691 Add DAI support out of a call 00-12-18 mloutris CR - CSGce78231 GSM: Adapative Earpiece Volume Control - Added a global define to indicate that no AVC message needs to be sent to the DSP. - Added a global flag to indicate we should enable/disable AVC. 00-09-01 blamers CR - CSGce61298 Complete functionality for VA FF/Rew - Remove unused tone types. AM_AUDIO_TONE_TYPE_VA_FAST_FORWARD AM_AUDIO_TONE_TYPE_VA_GET_TIME 00-08-23 mtaraba CR - CSGce65193 Move AM_AUDIO_PATH_TYPE enumeration to a global header file - move AM_AUDIO_PATH_ID enum to audio_path_types.h - move AM_AUDIO_PATH_TYPE typedef to audio_path_types.h 00-08-14 ktang CR - CSGce68045 Analog Network DTMF fixes - Added uplink DTMF bit masks 00-08-09 mtaraba CR - CSGce55882 Eliminate file gsm.h from audio manager 00-08-04 ktang PR - CSGce67917 Update audio Manager to support Synergy Lite tone defs 00-06-14 mloutris CR - CSGce58879 Add new gain interface to support the test and audio tasks. - Removed mic_or_speaker field from info struct (see CSGce57501 below), since the new gain interface makes this field unnecessary. - Commented out unused copy of DL accessory enum since 'C' does not allow empty enums. - Removed redundant gain struct definitions. - Changed the hardware gains from 16 bit to 32 bit. 00-05-05 mloutris CR - CSGce57501 Move audio gain tables from ROM to EEPROM for FDI products. - Added new field to info struct to recognize mic vs. speaker tables. Mics gains did not use tables prior to p2k. 00-05-05 shagino CR - CSGce56425 Implement handsfree_status funtion - Changed DL_AUDIO_TONE_TYPE to DL_AUDIO_TONE_TYPE_T. - Renamed Audio paths to match DL names 99-10-25 ktang PR - CSGce40785 GRiEF Audio: DL Audio Tone Types and DL DB Feature IDs - Replaced old tone types to DL tone types 98-10-06 mkloza PR - CSGce22858 Music Ringer doesn't stop when OK key pressed - added defines for race condition prevention between music interval timer expiration and stop request 98-02-15 gswanson PR - CSGce12607 Add DAI support to AM - added space for passing DAI select information to the hardware - added space for passing peripherals' timeslot allocation types to the hardware 97-12-23 slam PR - CSGce15146 Integration of VA and VR - Move in tone insertion mask definitions from am_app_logic_processor_mask.h. 97-08-05 slam PR - CSGce11610 Voice Annotation development - Add tone_insertion_method. - Change vr command to va/vr command. - Change vr_data_ptr to va/vr object ptr. - Add AM_AUDIO_PATH_ID_VA_VR_NON_AUDIO. - Expand VR audio paths to be VA/VR audio paths. 97-07-07 gswanson PR - CSGce06712 Rae DHFA, ignore the cradle state when an external handset is connected - made the definition of the mode here instead of in the configuration server - made the mode a bit mask instead of just an enumeration of values - made the peripheral mask of type TD_AUD_HOOKSWITCH_PERIPH_MASK instead of a UINT8. 97-05-28 slam PR - CSGce10240 Speaker Dependent Voice Recognition - Get rid of the last comma from the enum. - Change type of tone_id_limit to TD_AUD_TONE_REQ_TONE_TYPE in AM_APP_TONE_TO_PATH structure. - Change AM_AUDIO_PATH_ID_VR_INPUT to be AM_AUDIO_PATH_ID_VR_IO since tone generation may take place before vr input request starts. - Add AM_AUDIO_PATH_ID_VR_INPUT and AM_AUDIO_PATH_ID_VR_OUTPUT in the enumeration of AM_AUDIO_PATH. - Add vr_command and vr_data_ptr in AM_AUDIO_INFO structure.*//************** HEADER FILE INCLUDES ******************************************/#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/audio_path_types.h>#include "am_va_vr_command_types.h"#include "am_hw_primitive_builder_main.h"#include <ENGINE_AUDIO/td_aud_tone_req_tone_type.h>#ifndef DL_AUDIO_AUF_INCLUDE#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#endif#ifndef AM_C_UTILITIES_H#include <ENGINE_AUDIO/am_c_utilities.h>#endif#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <ENGINE_AUDIO/aud_tone_type.h> /************** CONSTANTS *****************************************************/#define AM_ANALOG_DTMF_LONG ((UINT16) 0x20)#define AM_ANALOG_DTMF_TX_MASK ((UINT16) 0x10)/* * Tone insertion masks */#define AM_LOCAL_TONE_MASK ((UINT16) 0)/* downlink tone to replace the existing downlink signal */#define AM_DOWNLINK_TONE_REPLACE_MASK ((UINT16) 1)/* downlink tone to be added to the existing downlink signal */#define AM_DOWNLINK_TONE_ADD_MASK ((UINT16) 2)/* uplink tone to replace the existing uplink signal */#define AM_UPLINK_TONE_REPLACE_MASK ((UINT16) 4) /* uplink tone to be added to the existing uplink signal */#define AM_UPLINK_TONE_ADD_MASK ((UINT16) 8)/* analog dtmf tx enable bit */#define AM_ANALOG_DTMF_TX_MASK ((UINT16) 0x10)/* analog dtmf mode bit, long = 1; short = 0 */#define AM_ANALOG_DTMF_LONG ((UINT16) 0x20)/* analog dtmf timing disable bit */#define AM_ANALOG_DTMF_TIMING_DISABLE_MASK ((UINT16) 0x40)/* USED TO AVOID SENDING DSP MESSAGES FOR AVC UNLESS NECESSARY. */#if (AUDIO_GSM == TRUE) #define AM_APP_DSP_ADAPTIVE_VOLUME_UNCHANGED ((UINT16)(0))#endif/* TEMPORARY */#if (MAKE_NEPTUNE_CHIPSET == FALSE)typedef UINT8 DL_ACC_DM_DEVICE_TYPE_T;#endifextern BOOL DL_AccGetConnectionStatus( UINT8 );/************** STRUCTURES, ENUMS, AND TYPEDEFS *******************************/enum{ AM_ANALOG_AUDIO, /* if analog audio will be selected. NO analog audio=0, analog audio=1 */ AM_DIGITAL_AUDIO, /* if digital audio will be selected. NO digital audio=0, digital audio=1 */ AM_HANDSFREE_AUDIO, /* set if phone is in handsfree mode (and also when the boom hs is used) */ AM_TRANSDUCER_AUDIO /* set if phone is to use the transducer (the alert speaker)*/};typedef UINT8 AM_AUDIO_MODE_MASK_ID; /* Used to refer to one of the bits in the mask.*/typedef UINT8 AM_AUDIO_MODE_MASK; /* the mask containing all of the above bits */enum{ AM_AUDIO_PRIORITY_PUPD, AM_AUDIO_PRIORITY_ALERT, AM_AUDIO_PRIORITY_UI_IND, AM_AUDIO_PRIORITY_UI_KEY, AM_AUDIO_PRIORITY_KEY, AM_AUDIO_PRIORITY_NETWORK, AM_AUDIO_PRIORITY_MM_PLAY, AM_AUDIO_PRIORITY_MM_CAPTURE, AM_AUDIO_PRIORITY_VA_VR_NON_AUDIO, AM_AUDIO_PRIORITY_VA_VR_IO, AM_AUDIO_PRIORITY_VA_IO, AM_AUDIO_PRIORITY_VR_IO, AM_AUDIO_PRIORITY_FUNLIGHTS, AM_AUDIO_PRIORITY_VA_VR_OUTPUT, AM_AUDIO_PRIORITY_VCALL, AM_AUDIO_PRIORITY_DATA, AM_AUDIO_PRIORITY_EXT_GEN_AUDIO, AM_AUDIO_PRIORITY_MM_VIDEO, AM_AUDIO_PRIORITY_PHANTOM, /* Giving the video path lesser priority than FM radio * so that FM radio does not get muted when Camera * Viewfinder is started */ AM_AUDIO_PRIORITY_INVALID = 0xFF};typedef UINT8 AM_AUDIO_PRIORITY_T;/* map a tone_type to its path_type. */typedef struct{ UINT16 tone_id_limit; AM_AUDIO_PATH_TYPE path_type;} AM_APP_TONE_TO_PATH;typedef struct{ TD_AUD_TONE_UNION_T tone; UINT16 vib_type; AM_AUDIO_PATH_TYPE path_type; UINT8 dsp_seq; TD_AUD_VOLUME_SETTING_T vol_step; UINT32 instruction_mask; UINT8 tone_insertion_method;#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) ) AM_VA_VR_COMMAND_TYPE va_vr_command;#endif TD_AUD_TONE_REQ_TONE_TYPE_T dai_mode; UINT32 hardware_gain_mic; UINT32 hardware_gain_speaker; INT16 ctg_gain; UINT16 mic; UINT16 speaker; UINT16 echo_mode; UINT16 SAP_config; UINT8 phone_mode; UINT16 dai_type; BOOL monophonic; UINT8 clock_rate; UINT8 codec_type; INT16 matrix[MATRIX_SOURCE_MAX + 1][MATRIX_DESTINATION_MAX + 1]; TD_AM_SAMPLING_RATE_T sampling_rate;#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) ) void *va_vr_data_ptr;#endif} AM_AUDIO_INFO;enum{ NO_CODEC, PHONE_CODEC, STEREO_CODEC, PHONE_CODEC_CLK_ONLY};enum{ AM_AUDIO_KEEP_PDOWN_TONE, AM_AUDIO_KEEP_VOICE_TONE};typedef UINT8 AM_AUDIO_KEEP_TONE_TYPE; /************** FUNCTION PROTOTYPES *******************************************//************** MACROS ********************************************************//************** CLASS DEFINITIONS *********************************************//************** GLOBAL VARIABLES **********************************************/ extern BOOL echo_control; /* 0 - Don't do echo control, 1 - Do echo control */ extern BOOL noise_sup; /* 0 - Don't do Noise Suppression , 1 - Do it */extern BOOL am_allow_ns;extern BOOL am_deac_req_not_honored;#if (AUDIO_GSM == TRUE) extern UINT16 am_automatic_volume_control;#endif#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -