?? am_fm_power_timer.cc
字號:
/* (c) Copyright Motorola 1999 - 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: This timer has two purposes: - Control FM Radio power - Control ZIHF Entertainment Mute *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 2005-06-23 w16355 CR - LIBgg36361 Need additional logging capabilities. 2004-09-21 w19069 CR - LIBff18839 Add accessory mute/unmute functionality for Atlas UL 2004-02-26 w17860 LIBdd64152 OT: Interrupted audio when call waiting advice is signalled - Added logging for HAPI signals 2003-12-10 w16355 CR - LIBdd58690 Panic while connected CarKit to C650 - Added calls to ensure we don't try to use pcap specific hapi signals when we have a seaweed part. 03-11-25 w17869 LIBdd58234 - Audio Manager changes for EMU BUS support for Razor 03-08-11 w18944 LIBdd27208 - Add entertainment mute for LTS 02-05-09 crairae1 LIBbb32543 - Entertainment mute not supported for LCA. 04/04/02 w17860 LIBbb24254 01-12-23 byr003 LIBbb15362 - LCA catchup for R1.2.1 10/11/01 bak044 LIBbb07207 07/10/01 qcf001 LIBaa08520 04/04/01 qcf001 CSGce93250******************************************************************************/#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <audio/AM_Timer_Container.H>#include <audio/AM_Event_Handler.H> #include <audio/AM_App_Logic_Processor.H>#include <audio/AM_FM_Power_Timer.H>#include <audio/AM_Tone_Sequence_Handler.H>#include <ENGINE_HAPI/hapi_portlist.h>#include <ENGINE_HAPI/hapi.h>#include <BUILD/hardware.h>#include <audio/AM_HW_Primitive_Builder.H>AM_FM_Power_Timer am_fm_power_timer;extern AM_Event_Handler * am_event_handler;#define FM_TURN_OFF_DELAY 3000#define ZIHF_ENT_MUTE_DELAY 5000void AM_FM_Power_Timer::RunSequence() { if(!eventqueuehandler.Exists()) { if(DL_AccGetConnectionStatus(DL_ACC_DM_FM_RADIO) == TRUE) {#if (MAKE_HDW_EMU_BUS == FALSE) /*Timer has expired. Check for FM being attached, kill power and set clock.*/ hPortConfigure(HAPI_SW_BPLUS_EN); AM_HW_Primitive_Builder::aud_hPortWrite( HAPI_SW_BPLUS_EN, HAPI_SIGNAL_DEASSERT, AM_HW_SW_BPLUS_EN ); /* Screen out phones not supporting HAPI CE bus accy signals. */#if ((MAKE_NEPTUNE_CHIPSET == TRUE && MAKE_HDW_BB_IC != MAKE_HDW_NEPTUNE_LT) \ || (MAKE_NEPTUNE_CHIPSET == FALSE)) /* HAPI_get_power_ic_type() is only defined for C650, an LTS product. */#if (MAKE_HDW_BB_IC == MAKE_HDW_NEPTUNE_LTS) /* The call below will find out if we have seaweed or pcap. */ if ( HAPI_get_power_ic_type() == HAPI_POWER_IC_TYPE_PCAP )#endif { hPortConfigure(HAPI_FM_CLOCK); AM_HW_Primitive_Builder::aud_hPortWrite( HAPI_FM_CLOCK, HAPI_SIGNAL_ASSERT, AM_HW_FM_CLOCK ); }#endif#endif }#if (MAKE_HDW_EMU_BUS == TRUE) else if((DL_AccGetConnectionStatus(DL_ACC_DM_MID_CHRGR_SIHF) == TRUE) || (DL_AccGetConnectionStatus(DL_ACC_DM_FAST_CHRGR_SIHF) == TRUE))#else else if(DL_AccGetConnectionStatus(DL_ACC_DM_CE_BUS_ZIHF) == TRUE)#endif { /* Screen out phones not supporting HAPI CE bus accy signals. */#if ((MAKE_NEPTUNE_CHIPSET == TRUE && MAKE_HDW_BB_IC != MAKE_HDW_NEPTUNE_LT) \ || (MAKE_NEPTUNE_CHIPSET == FALSE)) /* HAPI_get_power_ic_type() is only defined for C650, an LTS product. */#if (MAKE_HDW_BB_IC == MAKE_HDW_NEPTUNE_LTS) /* The call below will find out if we have seaweed, pcap or atlas ul. */ if (( HAPI_get_power_ic_type() == HAPI_POWER_IC_TYPE_PCAP ) || ( HAPI_get_power_ic_type() == HAPI_POWER_IC_TYPE_AUL ))#endif { /*Phone has been idle for some time, so unmute the Entertainment Mute.*/ hPortConfigure(HAPI_FM_ACC_MUTE_EN); /* Active low, so Enable = logic 0 */ AM_HW_Primitive_Builder::aud_hPortWrite( HAPI_FM_ACC_MUTE_EN, HAPI_SIGNAL_ENABLE, AM_HW_FM_ACC_MUTE_EN ); }#endif } #if (AUDIO_GSM != TRUE) else if(DL_AccGetConnectionStatus(DL_ACC_DM_USB_CARKIT) == TRUE) { DL_AudSetMuteAlertState(DL_AUDIO_ENTERTAINMENT_MUTE_TYPE, FALSE); } #endif }}AM_FM_Power_Timer::AM_FM_Power_Timer() : AM_Timer_Base(){ if(DL_AccGetConnectionStatus(DL_ACC_DM_FM_RADIO) == TRUE) { InitialDelay = FM_TURN_OFF_DELAY; } else { InitialDelay = ZIHF_ENT_MUTE_DELAY; }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -