⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 am_app_logic_processor.h

📁 Motorola synergy audio component
💻 H
字号:
#ifndef AM_APP_LOGIC_PROCESSOR_CLASS /* To prevent inadvertently including a header twice */#define AM_APP_LOGIC_PROCESSOR_CLASS/* (c) Copyright Motorola 1996 - 2001, 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:        This file defines the AM_App_Logic_Processor class. ************** REVISION HISTORY **********************************************   Date       Author      Reference   ========   ========    ================   05-03-22   w18944      CR - LIBff75646              Support for 8KHz AAC   2004-11-05 w17860      LIBff24932              P4.4 Feature # 12583 Memory Reduction               - Remove Voice Dial and Voice Tag   04-02-23   w18944      CR - LIBdd72701              WAV UI sounds   04-02-11   w17860      LIBdd75133              Phone looses audio when we do VA recording and close flip immediately.   04-01-29   w18944      CR - LIBdd69286              Alert ramp up   03-08-13   e11237      CR - LIBdd30018              clean up alert routing   03-03-25   e11237      CR - LIBbb77547              support video telephony   02-11-12   w18944      CR - LIBbb65674              MIDI alerts don't play if get incoming call during VA   02-08-04   w18944      CR - LIBbb33892              Send mode select msg before VR   02-06-18   w18944      CR - LIBbb38688              Route multimedia audio to alert speaker   01-10-05   w17860      CR - LIBbb07519              Replace MAKE_EXT_SMART_AUDIO comp flag with MAKE_MP3 &              MAKE_TELEMATICS   01-12-20   ktang       CR - LIBbb13753              Audio Media Request Redirection   01-04-03   ktang       CR - CSGce93816              AM needs to wait for tone cmp for AVC UL DTMF before disconnecting it              - Added data ul_dtmf_lock and inline function unlock_ul_dtmf   01-04-02   mtaraba     CSGce93745              Reduce complexity of set_hardware_mask()   01-05-14   llee        CSGce94136              Add prototype for map_audio_device_ids()              Added new class members:              old_path_type              old_mic_routing              old_spkr_routing                 00-11-20   mtaraba     CSGce69100              Add support for DAI mode for GSM   01-01-29   mtaraba     CSGce79517              Fix VA record in a call   00-12-21   mtaraba     CSGce82934              main_comp_hardware.h within engine_audio vob should be removed   00-08-14   ktang       CR - CSGce68045              Analog Network DTMF fixes              - Added parameter to functions get_tone_insertion_method and                generate_tone for passing uplink info   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              - Changed generate_tone and get_tone_insertion_method prototypes   00-06-12   shagino     CR - CSGce61089              Update Mute Changes              - Renamed mute functions to be more specific   00-05-26   shagino     CR - CSGce59603              Re-Merge in changes that were removed   00-05-01   shagino     CR - CSGce56425              Implement handsfree_status funtion              - Add handsfree_status prototype.   00-04-27   mkloza      PR - CSGce54341              MATRIX command implementation              - added device_array[]   00-03-08   cfarrel     Common MDI Echo Control and Noise Suppression              - Change comment related to legacy echo suppression and                 cancellation, they have been replaced with echo control   00-03-28   shagino     CR - CSGce53043              Stop all tones              - Added prototype for function stop_tones()   00-04-06   shagino     CR - CSGce53305              Audio Mute Request              - Added four inline functions              - Added two private variables   99-11-19   ktang       CR - CSGce39546              Phase III Long & Short DTMF for GRiEF Audio              - Removed the changes made with PR CSGce39421   99-11-19   ktang       PR - CSGce40494              GRiEF AM Music Ringer              - Took away the member functions relevant to music, convert_music,                music_sequencer_current_note, music_sequencer_next_note, and                 music_sequencer_on.   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*//************** HEADER FILE INCLUDES ******************************************/#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/td_aud_tone_req_type.h>#include "AM_Relay_Layer.H"#include "am_app_logic_processor_main.h"#include "AM_HW_Primitive_Builder.H"#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )#include "AM_App_VA_VR_Server.H"#endif#include <MME/mm_auf_common_defs.h>#ifndef DL_AUDIO_AUF_INCLUDE#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#endif#include <SYNERGY_DEVICE_LAYER/dl_acc_auf.h>#ifndef DL_DB_FEATURE_IDS_INCLUDE#include <SYNERGY_DEVICE_LAYER/dl_db_feature_ids.h>#endif#if ( MAKE_TELEMATICS == TRUE )    #include <ENGINE_AUDIO/aud_audio_start_stop.h>#endif/************** CONSTANTS *****************************************************//************** STRUCTURES, ENUMS, AND TYPEDEFS *******************************//************** FUNCTION PROTOTYPES *******************************************//************** MACROS ********************************************************//************** CLASS DEFINITIONS *********************************************/class AM_App_Logic_Processor{public:    /*      *class constructor      */    AM_App_Logic_Processor    (     /* used in hw layer to store latest audio info structure. */     AM_AUDIO_INFO* hw_info_ptr#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )     ,     /* used to store vr info structure. */     AM_APP_VA_VR_SERVER* va_vr_info_ptr#endif     );        /*      * class destructor, do nothing, but prevents allocation of __Ptbl in      * everyfile that includes this .H file.     */    ~AM_App_Logic_Processor (void) {};        /*      *queue or remove a voice event      */    void    generate_voice    (     /* indicate whether turn on or off voice path. on = 1 */     TD_AUD_TONE_REQ_TYPE request     );        /*      *queue or remove a VT voice event      */    void    generate_vt_voice    (     /* indicate whether turn on or off voice path. on = 1 */     TD_AUD_TONE_REQ_TYPE request     );    /*      * queue or remove a data event.     */    void    generate_data    (     /* if request is true will start data, otherwise, stop data */     TD_AUD_TONE_REQ_TYPE request     );        /*     * queue or remove a tone event.     */    void    generate_tone    (     TD_AUD_TONE_UNION_T tone,     TD_AUD_TONE_REQ_TYPE request,     TD_AUD_TONE_SEQUENCE_NUMBER_T sequenceID,      TD_AUD_VOLUME_SETTING_T volstep,     TD_AUD_TONE_REQ_TONE_TYPE_T vib_type,     TD_AUD_TONE_UPLINK_T uplink,     TD_AUD_MEDIA_INFO_T media_info,     TD_AM_SAMPLING_RATE_T sampling_rate     );    void    stop_tones(AM_AUDIO_KEEP_TONE_TYPE keep_tone_type);#if (MAKE_FTR_VR == TRUE || \     MAKE_FTR_VA == TRUE )    /*     * queue a specified VA/VR event.     */    void    generate_va_vr_command ( DL_AUDIO_TONE_TYPE_T event );    /*     * remove a specified VA/VR event.     */    void    disable_va_vr_command ( DL_AUDIO_TONE_TYPE_T event );    /*     * remove all VA/VR related events and send stop to DSP by calling update_audio()     */    void    disable_all_VA_VR ( void );    /*     * remove all VA/VR related events from the audio queue     */    void    remove_all_VA_VR ( void );    /*     * sound a beep for VA in call     */    void    generate_va_beep( void );    #endif    /*     * function to do DAI     */    void     generate_dai_command (TD_AUD_TONE_REQ_TONE_TYPE_T mode, TD_AUD_VOLUME_SETTING_T vol_step);    /*      * update audio, send out audio event that has the highest priority.     */    void    update_audio (void);    /*     * overloaded the above function, taking an argument which allows     * passing rerun tone info without having to use the queue     */    void    update_audio (UINT8 rerun);        /*     * function to reset hardware layer.     */    inline void     power_down (void) {AM_HW_Primitive_Builder :: power_down ();}    BOOL device_array[ DL_ACC_NUM_DEVICES ];    void alert_ramp_up_timer_expire(void);    /*     * function to return tx_mute     */    inline BOOL    tx_mute_status(void) { return tx_mute; }    /*     * function to return rx_mute     */    inline BOOL    rx_mute_status(void) { return rx_mute; }    /*     * function to set tx_mute     */        inline void    set_tx_mute ( BOOL tx_mute_state ){ tx_mute = tx_mute_state; }    /*     * function to set rx_mute     */        inline void    set_rx_mute ( BOOL rx_mute_state ){ rx_mute = rx_mute_state; }    /*     * function to set codec clock rate     */        inline void    set_clock_rate ( UINT8 current_clock_rate ){clock_rate = current_clock_rate; }        /*     * function to unlock ul_dtmf_lock     */        inline void    unlock_ul_dtmf (void){ ul_dtmf_lock = FALSE; }private:    /*     * Overload the new and delete operators to prevent calls to the system's     * new and delete functions.     */     inline void * operator new(size_t) { return(NULL); }    inline void operator delete(void *, size_t) {}    void    set_hardware_mask(AM_AUDIO_INFO *info_ptr);    void    set_tone_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_voice_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_vr_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )    void    set_va_play_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_va_rec_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_va_in_call_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_non_va_vr_path( AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);#endif    void     set_multimedia_path(AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void     set_multimedia_capture_path(AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    void    set_alert_path(AM_AUDIO_INFO *info_ptr, UINT8 volume, UINT8 device);    UINT8    initialize_path( AM_AUDIO_INFO *info_ptr, UINT8 device);    void    set_audio_path( AM_AUDIO_INFO *info_ptr, UINT8 device);    UINT8    choose_device(DL_DB_FEATURE_SETTING_T feature_state, AM_AUDIO_INFO *info_ptr );    BOOL    determine_incall_gain_table( UINT8 tone_id, BOOL in_call );    void    set_mode_select( AM_AUDIO_INFO *info_ptr, UINT8 device);    void    set_headset_alert_path(AM_AUDIO_INFO *info_ptr, UINT8 device, BOOL midi);#if ( MAKE_TELEMATICS == TRUE )    void    map_audio_device_ids( AM_AUDIO_INFO *info_ptr,                          AM_AUDIO_ROUTING_TYPE *mic,                          AM_AUDIO_ROUTING_TYPE *spkr );        AM_AUDIO_PATH_TYPE  old_path_type;    AM_AUDIO_ROUTING_TYPE old_mic_routing;    AM_AUDIO_ROUTING_TYPE old_spkr_routing;#endif    void    set_matrix( AM_AUDIO_INFO *info_ptr, UINT8 source, UINT8 destination, INT16 gain );        BOOL    is_device_headset(UINT8 device);    BOOL    use_stereo_dac(AM_AUDIO_INFO *info_ptr);    /*      * return the tone insertion method for a particular tone type.     */     UINT8    get_tone_insertion_method    (     TD_AUD_TONE_UNION_T tone,     TD_AUD_TONE_UPLINK_T uplink     );    /* a utility function used by get_mask to determine if a feature is flexed in */    BOOL    is_flexed_in    (     /* feature id */     DL_DB_FEATURE_ID_T feature_id     );    /* hardware layer */    AM_HW_Primitive_Builder primitive_builder;   #if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )    /* VR Server */    AM_App_VA_VR_Server va_vr_server;#endif    /* relay layer */    static AM_Relay_Layer relay_layer;    BOOL tx_mute;    BOOL rx_mute;    UINT8 clock_rate;    BOOL ul_dtmf_lock;    SU_LOWPWR_HANDLE  AudioLowPowerHandle;    DL_DB_FEATURE_SETTING_T earphone_ringer_option_state;};/************** GLOBAL VARIABLES **********************************************/#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -