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

📄 am_event_handler.h

📁 Motorola synergy audio component
💻 H
字号:
#ifndef AM_EVENT_HANDLER_CLASS /* To prevent inadvertently including a header twice */#define AM_EVENT_HANDLER_CLASS/* (c) Copyright Motorola 1995-2005, 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:        Event Handler Class definition  ************** REVISION HISTORY **********************************************   Date       Author      Reference Number   ========   ========    ================   2006-01-30 a19950      LIBhh82547              port LIBhh18354 to P044   2005-07-05 rkamath1    LIBgg65242              Feature 16017 - added handle_aud_setting_change_ind   2004-11-05 w17860      LIBff24932              P4.4 Feature # 12583 Memory Reduction               - Remove Voice Dial and Voice Tag   04-11-23   aja099      CR - LIBff38547              VST VR Porting   03-06-13   aaa063      CR - LIBdd01040              - Implementation of VST VR functionality   03/05/01   w50175      CR - LIBdd01040              Modify Audio Manager to accept VST VR port from CDMA T730   03-07-08   abp095      CR - LIBbb17285              Compilation fails for Telematics   03-05-13   a18985      CR - LIBbb90227              MME Enhancements for OKI              Support for Mymix Edit on E380   03-04-17   e11237      CR - 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              03-03-17   w17860      CR - LIBbb87685              MRS 8245: Haptics support for E390   03-03-16   a18984      CR - LIBbb76996                 Support for MFT on E380   03-02-18   a3177c      CR - LIBbb77026              OKI Support.              Support for MIDI playback.   02-11-14   brb032      CR - LIBbb56504              Audio Media support.   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-07-01   rsubram     CSGce95427              TELEMATICS: Need noise suppression and echo control to be dynamic.              - Added function to handle echo mode in Event Handler class    00-12-21   mtaraba     CSGce82934              main_comp_hardware.h within engine_audio vob should be removed   00-11-17   cfarrel     CR - CSGce71778               MDI Audio error message handling   00-11-09   qcf001      CR - CSGce79507   00-09-11   mtaraba     CR - CSGce68318              Add audio manager support for customer audio loopback test   00-09-01   blamers     CR - CSGce61298              Complete functionality for VA FF/Rew              - Remove unused event handlers.              - Added VA fast forward, rewind, pause, and resume functionality   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-07-13   Dale Noble  CR - CSGce65023              Moved content of am_event_handler_driver.h to this file.   00-05-26   shagino     CR - CSGce59603              Re-Merge in changes that were removed   00-05-03   mkloza      PR - CSGce54341              MATRIX command implementation              - removed references to AM_App_Peripheral_Server   00-05-05   shagino     CR - CSGce56425              Implement handsfree_status funtion              - Changed DL_AUDIO_TONE_TYPE to DL_AUDIO_TONE_TYPE_T.   00-03-14   shagino     CR - CSGce51678              - Added prototype for Power Up/Down functions.   00-03-14   mkloza      PR - CSGce51641              BT modifications for P2K              - added function to handle accessories change   00-03-28   shagino     CR - CSGce53043   00-03-30   shagino     CR - CSGce53305   00-01-5    wchoi       CR - CSGce39558   99-12-13   ktang       CR - CSGce42434   99-10-25   ktang       PR - CSGce40785   99-10-18   ktang       PR - CSGce39518   99-01-07   mkloza      PR - CSGce21917   98-09-08   blamers     CR - CSGce17243   98-02-15   gswanson    PR - CSGce12607   98-01-22   slam        PR - CSGce16188   97-12-12   slam        PR - CSGce15147   97-12-10   dbognich    PR - CSGce15249   97-11-03   gdrumma     PR - CSGce13990   97-12-05   mgilot      PR - CSGce15146   97-10-15   dbognich    PR - CSGce09621   97-09-08   slam        PR - CSGce12890   97-08-28   slam        PR - CSGce11610   97-08-27   slam        PR - CSGce11610   97-08-25   slam        PR - CSGce11610   97-08-05   slam        PR - CSGce11610   97-07-16   slam        PR - CSGce10240   97-07-07   gswanson    PR - CSGce06712   97-06-13   mgilot      PR - CSGce09641   97-03-17   gswanson    aud2_gms_CSGce09090*//************** HEADER FILE INCLUDES ******************************************/#include <SUAPI/suapi.h>#include <stddef.h>#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <ENGINE_AUDIO/td_dspr_prim_stat.h>#include "AM_App_Configuration_Server.H"#include "AM_App_Feature_Server.H"#include "AM_App_Logic_Processor.H"#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )#include "AM_App_VA_VR_Server.H"#endif#include "am_app_event_queue.h"#include "am_app_configuration_server.h"#include "am_app_event_queue.h"#include "am_app_va_vr_server.h"#include "am_va_info.h"/************** CONSTANTS *****************************************************/// EXEC_OVERHEAD = MEMORY_OVERHEAD + MSG_OVERHEAD, required when register a // heap memory block as exec memory block.#define EXEC_OVERHEAD 6/************** STRUCTURES, ENUMS, AND TYPEDEFS *******************************/// forward definitionclass AM_Event_Handler;  // Audio Event Handler function pointer typetypedef void (AM_Event_Handler::*AM_EVENT_FUNCTION_PTR) (void *);// structure to map a incoming primitive to its handler function.typedef struct{    UINT32                primitive_id;    AM_EVENT_FUNCTION_PTR function_ptr;} AM_EVENT_PRIM_TO_FUNC;/* Memory block allocated at power up, which holds all vital variables used in audio manager and    serves as their working space. it's regested as exec memory block at power up, so we could   send it to logger directly.   exec_overhead is required if we register it as a exec memory. header is required, because we need   to prim_id and length in it before sending the memory block to logger. event is the prim id audio   manager received. configuration block is the space used by configuration server in application   layer. it stores configuration mask. feature block is the space used by feature server in the app.   layer. it stores the state of "mute feature". device block is the space used by peripheral server   in the app. layer. both queue overhead and queue_event_pool are used by am_event_queue to store   all queue related information. hw_audio stores the information that hardware layer just played.*/    typedef struct {    UINT8                     exec_overhead[EXEC_OVERHEAD];    UINT16                    event_id;    AM_APP_CONFIGURATION_MASK configuration_block;#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )    AM_APP_VA_VR_SERVER       va_vr_block;#endif    AM_AUDIO_INFO             hw_audio;} AM_EH_AUDIO_MEM_BLOCK;/************** CONSTANTS *****************************************************/ /************** STRUCTURES, ENUMS, AND TYPEDEFS *******************************/ /************** FUNCTION PROTOTYPES *******************************************/ /************** MACROS ********************************************************/ /************** CLASS DEFINITIONS *********************************************/class AM_Event_Handler{public:    // class constructor    AM_Event_Handler(void);    // class destructor, do nothing, but prevents allocation of __Ptbl in     // every file that includes this .H file.    ~AM_Event_Handler(void){};    // function to dispatch an incoming event to its handler function.    TD_DSPR_PRIM_STAT handle_primitive(void *msg);#if (MAKE_HDW_OKI == TRUE)    /* functions for sound generator message handlers */    void handle_aud_soundlib_tone_req(void *msg);    void handle_aud_soundlib_timer(void *msg);    void handle_aud_soundlib_midi_data_ind(void *msg);    void handle_aud_soundlib_mymix_grid_value(void *msg);    void handle_aud_soundlib_mymix_prefill_ctrl(void *msg);#if (MAKE_HDW_MFT == TRUE)     void handle_aud_soundlib_vibrate_req(void *msg);#endif    void handle_aud_soundlib_midi_msg(void *msg);#endif    /***** functions in the audio sub-module ********/    void handle_aud_voice_req(void *msg);    void handle_aud_vt_voice_req(void *msg);    void handle_aud_tone_req(void *msg);    void handle_audscm_tone_cmplt1(void *msg);    void handle_aud_media_open_success(void *msg);    void handle_aud_media_open_failure(void *msg);    void handle_aud_media_complete(void *msg);    void handle_aud_media_state_change(void *msg);    void handle_aud_media_started(void *msg);    void handle_audscm_error_reply(void *msg);    void handle_aud_command_req(void *msg);    void handle_aud_cmd_mute_req(BOOL mute);    void handle_audio_deactivate_req(void *msg);    void handle_audio_suspend_req(void *msg);    void handle_audio_unsuspend_req(void *msg);    void handle_audio_accessories_change_ind(void *msg);    void handle_aud_stop_all_tones_req(void *msg);    void handle_aud_mute_req(void *msg);    void handle_aud_ctia_mode_req(void *msg);    void handle_aud_rat_change_ind(void *msg);    void handle_aud_setting_change_ind(void *msg);    void handle_aud_haptics_setting_change_ind(void *msg);    void handle_aud_dynamic_echo_noise_on_req(void *msg);     void handle_aud_dynamic_echo_noise_off_req(void *msg);    /**** AMR NS disable/enable function ******/    void handle_aud_amr_allow_ns_req(void *msg);    /***** stub command confirm function ******/    void handle_aud_hw_stub_command_cnf(void *msg);    /***** function in bic sub module ******/    void handle_bic_assign_timeslot_cnf(void *msg);    void handle_bic_dsc_status_change_ind(void *msg);    /***** functions in hsc sub_module *****/    void handle_hscaud_hookswitch_ind(void *msg);    void handle_hscaud_dtmf_fbk_mute_ind_event (void *msg);    /***** functions in mmi sub module *****/    void handle_aud_hookswitch_ind(void *msg);    void handle_mmiips_update_ips_ind(void *msg);    /***** functions in peripherals sub module *****/    void handle_rat_cradle_detect(void *msg);    void handle_peripheral_change_ind(void *msg);    //    void handle_aud_dai_select_req(void *msg);    /***** functions in mtest sub module *****/    void handle_aud_manual_test_req(void *msg);    /***** other functions *****/    static void init_mem_space(void);    void handle_am_mdi_q_command(void *msg);    void handle_am_mdi_q_external_reply(void *msg);    /****************** VA/VR functions ************/#if (MAKE_FTR_VR == TRUE)    /***** functions in the vr sub-module *****/    void handle_aud_play_voice_tag_req(void *msg);    void handle_aud_sdvr_capture_req(void *msg);    void handle_aud_sdvr_delete_req(void *msg);    void handle_aud_sdvr_model_id_req(void *msg);    void handle_aud_sdvr_start_req(void *msg);    void handle_aud_sdvr_train_req(void *msg);    void handle_aud_vr_stop_req(void *msg);    void handle_aud_vr_stop_nomsg(void);    void handle_aud_abort_all_vr(void *msg);    void handle_aud_sdvr_check_avail(void *msg);    void handle_aud_vr_enable_req(void *msg);    void handle_aud_vr_disable_req(void *msg);    void handle_aud_vr_disable_req_noresp(void);    void handle_audscm_sdsr_enable_complete(void *msg);    void handle_audscm_sdsr_disable_complete(void *msg);    void handle_audscm_sdsr_disable_complete_noresp(void *msg);    void handle_audscm_sdsr_capture_complete(void *msg);    void handle_audscm_sdsr_complete(void *msg);    void handle_audscm_sdsr_delete_complete(void *msg);    void handle_audscm_sdsr_model_id(void *msg);    void handle_audscm_sdsr_train_complete(void *msg);    void handle_audscm_voice_tag_complete(void *msg);#endif#if (MAKE_FTR_VA == TRUE)    void handle_aud_va_command_req(void *msg);    void handle_va_start_record_req(void *msg);    void handle_va_start_play_req(void *msg, AM_VA_OFFSET va_offset);    void handle_va_erase_req(void *msg);    void handle_va_stop_req(void *msg, AM_VA_OFFSET va_offset);    void handle_audscm_va_record_complete(void *msg);    void handle_audscm_va_playback_complete(void *msg);    void handle_audscm_va_time_remaining(void *msg);    void handle_audscm_va_erase_complete(void *msg);#endif#if ((MAKE_FTR_VA == TRUE) ||\     (MAKE_FTR_VR == TRUE))    void handle_aud_reformat_flash_req(void *msg);    void handle_audscm_reformat_flash_complete(void *msg);    void handle_seem_data_stream_stop(void *msg);#endif/***** VST VR Handlers **********************************/    void handle_aud_vst_vr_recorded_data_ready_req  (void *msg);/***************************** PRIVATE *************************/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) {}public:    void send_to_logger(UINT16 id);    /* application layer databases used by event logic layer */    AM_App_Configuration_Server am_event_configuration_server;    AM_App_Logic_Processor am_event_logic_processor;#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) )    AM_App_VA_VR_Server am_event_va_vr_server;#endif    /* a block of memory which contains data will send to logger port. */    static AM_EH_AUDIO_MEM_BLOCK am_event_memory;    /* map an incoming primitive to a function */    static const AM_EVENT_PRIM_TO_FUNC am_event_handler_mapping_tbl[];    /* map a DSP reply message to a function */    static const AM_EVENT_PRIM_TO_FUNC am_event_handler_dsp_reply_mapping_tbl[];};#endif

⌨️ 快捷键说明

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