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

📄 am_event_handler_peripheral.cc

📁 Motorola synergy audio component
💻 CC
字号:
/*(c) Copyright Motorola 1996, 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 primitives regarding accessories******************************* REVISION HISTORY ****************************** Date        Author      Reference Number========    ========    ================2005-06-13 w17860      CR - LIBff63840              Apple 3990042: Sometimes after sync, phone only plays out right headphone2004-04-08  w16355      CR - LIBdd93682            RTime never told to stop stereo headset polling.            - Remove old globals for stereo headset detection since we are               now using a special volume level.03-10-15   mloutris    CR - LIBdd43633           E398: New stereo headset detection AM sw to support new HW.           - Added a call to store the state of detecting a headset             (assumed to be stereo), and waiting for the accessory             insertion tone to verify whether the headset is stereo or mono.           - Removed CDMA conditionally compiled code because CDMA now uses             the Qualcomm audio interface, and this code is unused.  03-04-17   e11237      CR - LIBbb87186              bluetooth HFP on triplets02-04-04   w17860      CR - LIBbb24254           Entertainment mute is not working properly02-03-17   brb032      LIBbb23280 - LCA catchup 01-04-20   w17860      CR - LIBbb05515           Audio support for the TTY accessory in digital call mode.00-12-07   mloutris    CR - CSGce75636           Inhibit sleep mode when a bluetooth device is attached for frame sync.           - Added code to set a global to capture the attached status of bluetooth.02-01-17    bal023      LIBbb16809            LCA support for TTY - catchup from CR LIBbb0551501-04-20   w17860      CR - LIBbb05515           Audio support for the TTY accessory in digital call mode.	      00-12-07   mloutris    CR - CSGce75636              Inhibit sleep mode when a bluetooth device is attached for frame sync.              - Added code to set a global to capture the attached status of bluetooth.00-08-09   mtaraba      CR - CSGce55882           Eliminate file gsm.h from audio manager00-04-19    mkloza      PR - CSGce54341            MATRIX Command implementation            - updated handle_audio_accessories_change_ind()*/#include <SUAPI/suapi.h>#include <stddef.h>#include <audio/AM_Relay_Layer.H>#include <audio/AM_Event_Handler.H>#include <audio/am_app_configuration_server.h>#include <audio/AM_App_Configuration_Server.H>#include <ENGINE_HAPI/hapi_portlist.h>#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#include <audio/am_hw_primitive_builder_main.h>#ifndef DL_AUDIO_AUF_INCLUDE#include <SYNERGY_DEVICE_LAYER/dl_audio_auf.h>#include <SYNERGY_DEVICE_LAYER/dl_acc_auf.h>#endif/************** GLOBAL VARIABLES *********************************************/#if (MAKE_TTY == TRUE)UINT16 am_event_tty_mode = AM_HW_TTY_MODE_DISABLED;extern BOOL am_is_tty_enabled;extern UINT16  am_hw_last_tty_mode;const static UINT16 am_hw_tty_mode_mapping_table [] = {    AM_HW_TTY_MODE_DISABLED ,    AM_HW_TTY_MODE_FULL ,    AM_HW_TTY_MODE_VCO ,    AM_HW_TTY_MODE_HCO     };#endif/************** LOCAL VARIABLES **********************************************/BOOL is_there_accessory_change= FALSE;/* DESCRIPTION   Function to handle a change in accessories   or a change in the TTY mode.   INPUTS   AUD_Peripheral_Change_Ind_RX primitive. Unused at the moment      OUTPUTS   None.      IMPORTANT NOTES   None.*/voidAM_Event_Handler :: handle_audio_accessories_change_ind ( void *msg ){   /* Populate the device array */   for ( UINT8 device = DL_ACC_START_DUMB_DEVICES; device < DL_ACC_NUM_DEVICES; device++ )   {      am_event_logic_processor.device_array[ device ] = DL_AccGetConnectionStatus( device );   }   is_there_accessory_change= TRUE;#if (MAKE_TTY == TRUE)   /*  Get the TTY mode from the device layer. */   am_event_tty_mode = AM_App_Feature_Server :: read_state( DL_DB_FEATURE_ID_CURRENT_TTY );   /*  Map the DL enum value into the value the DSP is expecting. */   if ( ( am_event_tty_mode >= 0 )   &&   ( am_event_tty_mode <= 3 ) )   {       am_event_tty_mode = am_hw_tty_mode_mapping_table [ am_event_tty_mode ] ;   }      if (am_event_tty_mode != am_hw_last_tty_mode)   {       am_is_tty_enabled = FALSE;   }#endif   am_event_logic_processor.update_audio();#if (AUDIO_GSM == TRUE)   if (DL_AccGetConnectionStatus(DL_ACC_DM_USB_CARKIT))   {       /* Reset entertainment mute line thru DL */       DL_AudMuteEntertainment(DL_AUDIO_ENTERTAINMENT_UPDATE_MUTE);   }#endif}

⌨️ 快捷键说明

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