📄 am_event_handler_mdi.cc
字号:
/* (c) Copyright Motorola 1995-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 module handles *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 2004-12-04 w16355 CR -LIBff37755 Fiji draws more than 5mA in standby mode. 08/14/03 w13738 LIBdd27679 - MIDI Progress Bar doesn't work on Triplets 09/12/01 L Haegele w18944 LIBbb03971 - Initial file creation 03-08-26 Sajeev a19436 LIBdd33122 - Handling DECODE_FINISHED reply from the DSP*//************** INCLUDES ******************************************************/#include <audio/AM_Event_Handler.H>#include <ENGINE_HAPI/hapi_mdi_queue.h>#include <ENGINE_AUDIO/am_mdi_queue_controller.h>#include <ENGINE_AUDIO/td_dsp_aud_reply_buff.h>#include <ENGINE_HAPI/hapi_mdi_message_ids.h>#include <MME/mme_avio_mdi.h>#include <audio/AM_HW_Primitive_Builder.H>#include <audio/AM_Tone_Sequence_Handler.H>#if (MAKE_NEPTUNE_CHIPSET == TRUE)#include <mme_fw/mme_fw_mdi.h>#endif/************** LOCAL CONSTANTS ***********************************************//************** LOCAL STRUCTURES, ENUMS, AND TYPEDEFS *************************//************** LOCAL FUNCTION PROTOTYPES *************************************//************** LOCAL MACROS **************************************************//************** LOCAL VARIABLES ***********************************************/extern BOOL dsp_awake;/************** FUNCTION DEFINITIONS ******************************************//* DESCRIPTION: Function handles a request for the mdi audio command queue. INPUTS: generic primitive OUTPUTS: None IMPORTANT NOTES: None*/void AM_Event_Handler::handle_am_mdi_q_command(void *msg){ AM_MDI_Q_MSG_T * am_mdi_q_msg = (AM_MDI_Q_MSG_T*) msg; HAPI_MDI_QUEUE_write(MCU_DSP_AUDIO_COMMAND, am_mdi_q_msg->data, (UINT16)am_mdi_q_msg->num_words, TRUE); if (!eventqueuehandler.Exists()) { // Put the DSP into low power mode. AM_HW_Primitive_Builder :: put_dsp_in_low_power_mode(); dsp_awake = FALSE; }}/* DESCRIPTION: Function handles a dsp reply external to the audio manager. INPUTS: generic primitive OUTPUTS: None IMPORTANT NOTES: None*/void AM_Event_Handler::handle_am_mdi_q_external_reply(void *msg){ UINT16 *mdi_msg = (UINT16*)msg; UINT8 len; len = (UINT8)(mdi_msg[1]&0xFF) + 2; /* get the length of the DSP reply in 16bit words, including the 2 (16bit) word header. */ /* call the appropriate callback function, depending on the DSP reply msg id */ switch (mdi_msg[0]) { case DSP_MCU_AUDIO_MM_SESSION_START: case DSP_MCU_AUDIO_MM_SESSION_END: case DSP_MCU_AUDIO_MM_TOKEN_INFO:#if (MAKE_NEPTUNE_CHIPSET && MAKE_HDW_BB_IC == MAKE_HDW_NEPTUNE_LTS) /* only for TRIPLETS */ case DSP_MCU_AUDIO_MM_DECODE_FINISHED:#endif#if (AUDIO_RAINBOW == TRUE) case DSP_MCU_AUDIO_MM_VIDEO_INFO: case DSP_MCU_AUDIO_MM_DECODE_FINISHED:#endif MME_FW_MDI_avio_callback(mdi_msg, len); break; case DSP_MCU_AUDIO_MIDI_EVENT:#if (AUDIO_RAINBOW == TRUE) case DSP_MCU_DEBUG_ERROR_REPLY: case DSP_MCU_AUDIO_MIDI_OFF:#endif MME_FW_MDI_mo_callback(mdi_msg, len); break;#if (AUDIO_RAINBOW == TRUE) case DSP_MCU_AUDIO_DMP_REQUEST: case DSP_MCU_AUDIO_DMP_INFO_REQUEST: case DSP_MCU_AUDIO_DMP_MRAM_REQUEST: MME_FW_MDI_dmmgr_callback(mdi_msg);#endif default: break; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -