?? am_hw_primitive_builder.h
字號(hào):
AM_HW_FM_CLOCK, // 32 0x20 AM_HW_FM_WRITE_EN, // 33 0x21 AM_HW_HOOKSWITCH, // 34 0x22 AM_HW_DIG_AUD_IN, // 35 0x23 AM_HW_DIG_AUD_IN_ST_DAC, // 36 0x24 AM_HW_DF_RESET, // 37 0x25 AM_HW_BCLK1, // 38 0x26 AM_HW_BCLK0, // 39 0x27 AM_HW_CLK_IN_SEL, // 40 0x28 AM_HW_PGA_OUTL_EN, // 41 0x29 AM_HW_ST_DAC_CLK_IN_SEL, // 42 0x2A AM_HW_A2_CONFIG, // 43 0x2B AM_HW_AUDIO_LOW_PWR, // 44 0x2C AM_HW_AUDIO_STBY, // 45 0x2D AM_HW_CODEC_BYPASS_EN, // 46 0x2E AM_HW_SW_BPLUS_EN, // 47 0x2F AM_HW_SMART_AUDIO_DAI_EN, // 48 0x30 AM_HW_CODEC_SSI_TS, // 49 0x31 AM_HW_STEREO_DAC_SMB_SEL, // 50 0x32 AM_HW_FM_ACC_MUTE_EN, // 51 0x33 AM_HW_AUD_OUT_D2AIN_EN, // 52 0x34 AM_HW_AUD_OUT_RXPGA_EN, // 53 0x35 AM_HW_MIC_BIAS2_MASK // 54 0x36};enum { AM_HW_TRANSITION_NONE, // HW is already defaulted. AM_HW_TRANSITION_HIFI_TO_LOFI, // Disable hi-fi HW settings. AM_HW_TRANSITION_LOFI_TO_HIFI, // Disable lo-fi HW settings. AM_HW_TRANSITION_TO_OFF, // Default all HW settings. AM_HW_TRANSITION_TO_ON, // Set up a new audio event. AM_HW_TRANSITION_LOFI_TO_DAI // Make sure the DSP is handled gently.};/************** FUNCTION PROTOTYPES *******************************************//************** MACROS ********************************************************//************** CLASS DEFINITIONS *********************************************/class AM_HW_Primitive_Builder{public: // class constructor AM_HW_Primitive_Builder(AM_AUDIO_INFO* hw_info_ptr#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) ) , AM_APP_VA_VR_SERVER* va_vr_ptr#endif ); // class destructor, do nothing, but prevents allocation of __Ptbl in // every file that includes this .H file. ~AM_HW_Primitive_Builder(void){}; static void reset(TD_AUD_TONE_REQ_TONE_TYPE_T tone, AM_AUDIO_PATH_TYPE tone_path, UINT8 dsp_seq); static void power_down(void); static void execute(AM_AUDIO_INFO *info_ptr); static void undo_audio_path( AM_AUDIO_INFO *info_ptr, UINT8 undo_type );#if (MAKE_NEPTUNE_CHIPSET == TRUE)/* moved from private because of compilation error */ static void ctg_stop_tone (TD_AUD_TONE_REQ_TONE_TYPE_T current_tone, UINT8 dsp_seq); static void build_va_beep(void);#endif static UINT8 *build_tone_old(TD_AUD_TONE_REQ_TONE_TYPE_T tone, UINT8 dsp_seq, BOOL mdi_send); static UINT8 *build_tone(TD_AUD_TONE_REQ_TONE_TYPE_T tone, UINT8 dsp_seq, BOOL mdi_send); static void ctg_start_tone (TD_AUD_TONE_UNION_T tone, INT16 ctg_gain, UINT8 dsp_seq, BOOL monophonic, UINT8 tone_insertion_method);#if (MAKE_FTR_VA == TRUE) // Used in VA static void condition_audscm_complete(void);#endif#if (MAKE_FTR_VR == TRUE) // Used in VR static TD_VR_MODEL_ID condition_audscm_train_complete(void *msg); static void condition_audscm_capture_complete(void *msg); static void condition_audscm_recognize_complete(void *msg);#endif //Used for stop all tones static void stop_playing_current_tone(TD_AUD_TONE_REQ_TONE_TYPE_T tone, UINT16 mask); // temp, may not be a good idea static UINT8 am_hw_tdma_analog; // temporay storage of tone table conversion buffer static AM_HW_SOUND_DATA sound_data; // rerun indicator static TD_AUD_TONE_REQ_TONE_TYPE_T tone_to_build; // enable/disable PCAP audio block low power mode static void activate_power( BOOL power, UINT8 am_hw_codec_mode ); // Puts the DSP into DSP low power mode. static void put_dsp_in_low_power_mode( void );#if (MAKE_TTY == TRUE) // tty enable disable function static void am_send_tty_enable_disable(void);#endif static void aud_hPortWrite( HAPI_SIGNAL_T aud_hapi_signal, HAPI_DATA_T write_data, UINT8 am_logging_id ); static void am_log_hapi_cap_update_reg( HAPI_CAP_REG register_selection, HAPI_CAP_MSG register_value, HAPI_CAP_MSG register_mask ); static void aud_keypress_timer_expiry(void); static void am_turn_vibrator_on(TD_AUD_TONE_UNION_T tone, TD_AUD_TONE_REQ_TONE_TYPE_T vibrate_type, UINT8 dsp_seq); static void stop_vibrator(void);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 *) {} static void start_vibrator(TD_AUD_TONE_UNION_T vib_select, UINT8 cycles, UINT8 dsp_seq); static AM_HW_TONE_CATEGORY determine_tone (TD_AUD_TONE_REQ_TONE_TYPE_T tone_type, UINT8 dsp_seq);#if (MAKE_NEPTUNE_CHIPSET == FALSE) static void ctg_stop_tone (TD_AUD_TONE_REQ_TONE_TYPE_T current_tone, UINT8 dsp_seq);#endif static void set_ctg_gain (INT16 ctg_gain, BOOL monophonic, BOOL uplink); static void update_tone_control(UINT8 tone_insertion_method);#if (MAKE_FTR_VR == TRUE) // Used in VR static void build_acsc_sdvr_recog_cmd(void *va_vr_data, AM_AUDIO_MODE_MASK mode); static void build_acsc_sdvr_capture_cmd(void *va_vr_data); static void build_acsc_sdvr_train_cmd(void *va_vr_data, AM_AUDIO_MODE_MASK mode); static void build_acsc_sdvr_delete_cmd(void *va_vr_data); static void build_acsc_play_voice_tag_cmd(void *va_vr_data); static void build_acsc_sdvr_retrieve_cmd(void *va_vr_data); static void build_acsc_vr_stop_cmd(void); static void build_acsc_sdvr_enable_cmd(); static void build_acsc_sdvr_disable_cmd();#endif#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) ) // Used in any type of VA or VR static void build_reformat_flash_cmd(void); static AM_VA_VR_COMMAND_TYPE update_va_vr_command(AM_VA_VR_COMMAND_TYPE va_vr_command, void *va_vr_data, AM_AUDIO_MODE_MASK mode);#endif#if (MAKE_FTR_VA == TRUE) // Used in VA static void build_va_fast_forward_cmd(void *va_vr_data); static void build_va_start_record_cmd(void *va_vr_data); static void build_va_get_time_cmd( void ); static void build_va_erase_cmd(void *va_vr_data); static void build_va_play_voice_note_cmd(void *va_vr_data); static void build_va_stop_cmd(void);#if (MAKE_NEPTUNE_CHIPSET == FALSE) static void build_va_beep(void);#endif static void set_va_active(BOOL);#endif static void send_matrix(AM_AUDIO_INFO *info_ptr, AM_AUDIO_INFO *current_hardware_info_ptr); static void am_enable_AUL ( AM_AUDIO_INFO * info_ptr, UINT8 transition_type ); static void am_disable_AUL ( AM_AUDIO_INFO * info_ptr, UINT8 transition_type ); static void am_enable_PCAP ( AM_AUDIO_INFO * info_ptr ); static void am_disable_PCAP( AM_AUDIO_INFO * info_ptr ); static void am_disable_matrix( AM_AUDIO_INFO * info_ptr );/************** GLOBAL VARIABLES **********************************************/ // variable to hold the info about last audio event static AM_AUDIO_INFO* am_hw_current_info_ptr; // the string primitive of commands sent to the DSP static AM_HW_String_Primitive am_hw_string_primitive; // the string primitive of data sent to the DSP static AM_HW_String_Primitive am_data_string_primitive;#if ( (MAKE_FTR_VR == TRUE) || (MAKE_FTR_VA == TRUE) ) // pointer to change VA/VR server information static AM_APP_VA_VR_SERVER* primitive_va_vr_server;#endif // buffer to hold commands sent to the DSP static UINT8 am_hw_str_buffer_cmd[MCU_DSP_AUDIO_COMMAND_WORD_SIZE * sizeof(UINT16)];#if (MAKE_FTR_VR == TRUE) // variable to hold the current model id info. static TD_VR_MODEL_ID current_model_id; // variable to hold the current group id info. static TD_VR_GROUP_TYPE current_group_id;#endif // variable to hold the info about n-best if it currently is being run. static BOOL repeat_indication; // model id array of recognized voicetags. static UINT16 last_recog[]; // variable to hold the info about the current voice note id. static UINT8 current_voice_note_id; // Remembers the current number of frequency sets sent to DSP static UINT8 current_set_length; // Remembers the current position at the sound def data, if more than one send to DSP is necessary static UINT8* intermediate_ptr; static TD_AUD_TONE_REQ_TONE_TYPE_T previous_tone; static UINT8 current_pcap_clock_rate; // store the capture repetition for the completion handlingpublic:#if (MAKE_FTR_VR == TRUE) static TD_VR_CAPTURE_REP_TYPE repetition;#endif};#endif /* end of - prevent inadvertently including a header file twice */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -