📄 am_aud_tone_reply.c
字号:
/* (c) Copyright Motorola 1998-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: <file description> *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 2004-11-05 w17860 LIBff24932 P4.4 Feature # 12583 Memory Reduction - Remove Voice Dial and Voice Tag 03-08-26 a19436 CR - LIBdd33122 - Handling DECODE_FINISHED reply from the DSP 03-08-14 w13738 LIBdd27679 - MIDI Progress Bar doesn't work on Triplets 03-07-30 a18984 LIBdd21617 - Conversation is not possible while storing a user defined sound 03-03-19 w16865 LIBbb85956 - Add callback function for funlight 02-09-24 w18944 LIBbb50981 - TCMD use of audio mdi queues 02-04-12 emachado LIBbb15826- Added DSP_MCU_AUDIO_LOW_POWER and DSP_MCU_AUDIO_WAKE. The first message calls EXEC_CLKMGR_pcap_aux_clk_on and the second calls EXEC_CLKMGR_pcap_aux_clk_off. The messages that trigger these replys originate in exec_clkmgr.c Removed extra #include "hapi_mdi_message_ids.h" 02-05-01 bpg005 LIBbb28837 - During a call the voice isn't heard. Catchup from CRs: LIBbb25819 and LIBbb28225. 02-04-18 bal023 LIBbb28121 - fix LCA catchup 02-03-26 bmd031 Add LIBbb22902 to LCA catchup 02-03-17 bab047 LIBbb23280 - LCA catchup for PAN8-G_03.07.1AI 02-01-17 bal023 LIBbb16809 LCA support for TTY - catchup from CR LIBbb05515 01-04-20 w17860 CR - LIBbb05515 Audio support for the TTY accessory in digital call mode. 01-04-20 w17860 CR - LIBbb05515 Audio support for the TTY accessory in digital call mode. 02-02-17 LIBbb20411 LCA:Add support for MME 01-02-02 mtaraba CSGce85434 MCU: Change VA record processing during training to 1st utterance. 00-12-21 mtaraba CSGce82934 main_comp_hardware.h within engine_audio vob should be removed 00-11-21 cfarrel CR - CSGce71778 MDI Audio error message handling - handle DSP error reply as well as tone complete message 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 - Added function aud_am_reply 00-08-03 shagino CR - CSGce67731 Make Audio Manager Ansi-Compliant - Corrected call to AM_SendMessage - Included AM_SendMessage.h 00-05-15 cfarrel CR - CSGce58264 Update Audio Manager to use l1_modem_api queue functions for CDMA and HAPI_MDI_queue functions for other MAs. 00-04-06 hchuang CR - CSGce53807 Update Audio Manager to use HAPI MDI functions and header files - hapi_mdi_queue.h and hapi_mdi_queue_map.h are included in td_dsp_aud_reply_buff.h - replace l1_modem_api functions with hapi mdi functions 99-12-13 ktang CR -CSGce42434 Common Tone Generator MDI messages - Renamed function aud_tone_reply to be aud_dsp_reply, and rewrote it to contain variable types in td_dsp_aud_reply_buff.h and to read directly from MDI DSP_MCU_AUDIO_REPLY queue 99-12-01 mkloza CR -CSGce42434 Common Tone Generator MDI messages - updated aud_tone_reply() function to accept new parameter. 99-09-01 jvoss CR -CSGce34326 GRiEF: Phase I Audio Interface Implementation - Hacked in a function to act like the GSM exec function alloc() and allocate memory for the CXX_Priority_Xifo in a SUAPI compliant format. 99-08-25 jvoss CR - CSGce34326 GRiEF: Phase I Audio Interface Implementation - Added code to the function aud_tone_reply() to send a mimicked GSM DSP response to audio manager in a SUAPI compliant format. 99-08-24 ktang CR - CSGce34326 GRiEF: Phase I Audio Interface Implementation - A shell function, aud_tone_reply, is defined to provide CDMA Wedge the interface for the purpose of mimicking the GSM DSP message reply*//************** INCLUDES ******************************************************/#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <ENGINE_AUDIO/am_aud_tone_reply.h>#include <ENGINE_HAPI/hapi_mdi_message_ids.h>#if (AUDIO_CDMA == TRUE) #include "l1_modem_api_queue.h"#endif#include <ENGINE_AUDIO/audscm_sdsr_ind.h>#include <ENGINE_AUDIO/td_dsp_aud_reply_buff.h>#include <ENGINE_AUDIO/aud_prim_ids.h>#include <audio/AM_SendMessage.h>#include <ENGINE_RTIME_MAINT/rtime_maint_dm.h>#include <ENGINE_AUDIO/aud_alert_info.h>#if (AUDIO_RAINBOW == TRUE)#include "exec/exec_pcap_aux_clkmgr.h"#include <ENGINE_AUDIO/aud_interface.h>#include "UMTS_TCMD_UMTS_INTERFACE.h"#include "UMTS_TCMD_API_SW.h"#include <ENGINE_AUDIO/am_hw_string_primitive.h>#else#include <MME/mme_mof_isr.h>#endif/************** LOCAL CONSTANTS ***********************************************//************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************//************** LOCAL MACROS **************************************************//************** LOCAL VARIABLES ***********************************************/extern BOOL dsp_awake;/************** FUNCTION DEFINITIONS ******************************************//* DESCRIPTION: This function is provided for AM to build and send the tone complete messages back to itself. Currently the case only applies to when vibrate is complete. INPUTS: tone_type - the id of the tone that just finished dsp_seq - the AM queue generated sequence number of this tonepointer to the DSP section of dual port RAM that contains information for tone complete message OUTPUTS: None IMPORTANT NOTES: None */void aud_am_reply(TD_AUD_TONE_REQ_TONE_TYPE_T tone_type, UINT8 dsp_seq){ /* Create the reply message */ AUD_DSP_REPLY_PRIM *dsp_aud_prim = (AUD_DSP_REPLY_PRIM*)suCreateMessage( (UINT32)(sizeof(AUD_DSP_REPLY_PRIM)), (UINT32)AUDSCM_TONE_CMPLT1_IND_ID, SU_INVALID_HANDLE, NULL); dsp_aud_prim->reply_buff[0] = DSP_MCU_AUDIO_TONE_COMPLETE; dsp_aud_prim->reply_buff[1] = ((dsp_seq << 8) + 2); dsp_aud_prim->reply_buff[2] = tone_type; dsp_aud_prim->reply_buff[3] = 0; AM_SendMessage((char *) dsp_aud_prim);}/* DESCRIPTION: This function is provided for ISR to send the tone complete messages to AM. INPUTS: None OUTPUTS: None IMPORTANT NOTES: None*/void aud_dsp_reply(){#if (AUDIO_CDMA == TRUE) UINT32 reply_primitive_id = AUDSCM_TONE_CMPLT1_IND_ID; AUD_DSP_REPLY_PRIM *dsp_aud_prim; AUD_DSP_REPLY_PRIM temp_dsp_reply_prim; AUD_DSP_REPLY_PRIM *temp_dsp_aud_prim = &temp_dsp_reply_prim; UINT8 i; for (i = 0; i < DSP_MCU_AUDIO_REPLY_WORD_SIZE; i++) { temp_dsp_aud_prim->reply_buff[i] = TD_DSP_AUD_REPLY_BUFF_INVALID; } L1_MODEM_API_QUEUE_read (DSP_MCU_AUDIO_REPLY, temp_dsp_aud_prim->reply_buff); if ( temp_dsp_aud_prim->reply_buff[0] == DSP_MCU_AUDIO_ERROR_REPLY ) { reply_primitive_id = AUDSCM_DSP_AUDIO_ERROR_REPLY_ID; } /* Create the reply message */ dsp_aud_prim = (AUD_DSP_REPLY_PRIM*)suCreateMessage( (UINT32)(sizeof(AUD_DSP_REPLY_PRIM)), reply_primitive_id, SU_INVALID_HANDLE, NULL); *dsp_aud_prim = *temp_dsp_aud_prim; AM_SendMessage((char *) dsp_aud_prim); #else int i; AUD_DSP_REPLY_WORD reply_buff[DSP_MCU_AUDIO_REPLY_WORD_SIZE]; for (i = 0; i < DSP_MCU_AUDIO_REPLY_WORD_SIZE; i++) { reply_buff[i] = TD_DSP_AUD_REPLY_BUFF_INVALID;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -