comparison src/g23m-aci/aci/hl_audio_drv.c @ 631:597869e59805

config: introduced new CONFIG_MCSI_MODEM preprocessor symbol All MCSI functionality was previously conditionalized on CONFIG_TARGET_FCMODEM (even earlier it was CONFIG_TARGET_FCDEV3B), but having a dedicated preprocessor symbol for this purpose (defined in targets/*.h as appropriate) makes it much easier to support different modem targets with MCSI enabled.
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 04 Jan 2020 19:07:02 +0000
parents 92dbfa906f66
children
comparison
equal deleted inserted replaced
630:b639f7ab0007 631:597869e59805
36 36
37 /* ===============GLOBAL VARIABLES====================*/ 37 /* ===============GLOBAL VARIABLES====================*/
38 38
39 LOCAL T_HL_VOCODER_STATE currVocoderState; 39 LOCAL T_HL_VOCODER_STATE currVocoderState;
40 40
41 #ifdef CONFIG_TARGET_FCMODEM 41 #ifdef CONFIG_MCSI_MODEM
42 GLOBAL UBYTE aci_digital_voice_autoswitch; 42 GLOBAL UBYTE aci_digital_voice_autoswitch;
43 #endif 43 #endif
44 44
45 45
46 /* =============FUNCTION DEFINITIONS FOR L1===========*/ 46 /* =============FUNCTION DEFINITIONS FOR L1===========*/
67 TRACE_FUNCTION("hl_audio_drv_init()"); 67 TRACE_FUNCTION("hl_audio_drv_init()");
68 68
69 currVocoderState = HL_VOCODER_DISABLED; 69 currVocoderState = HL_VOCODER_DISABLED;
70 } 70 }
71 71
72 #ifdef CONFIG_TARGET_FCMODEM 72 #ifdef CONFIG_MCSI_MODEM
73 static void audio_mode_callback(void *event_from_audio) 73 static void audio_mode_callback(void *event_from_audio)
74 { 74 {
75 /* do nothing at this time */ 75 /* do nothing at this time */
76 } 76 }
77 #endif 77 #endif
87 path if running on a FreeCalypso modem in the digital 87 path if running on a FreeCalypso modem in the digital
88 voice interface configuration. 88 voice interface configuration.
89 */ 89 */
90 GLOBAL void hl_drv_set_vocoder_state(BOOL user_attach) 90 GLOBAL void hl_drv_set_vocoder_state(BOOL user_attach)
91 { 91 {
92 #ifdef CONFIG_TARGET_FCMODEM 92 #ifdef CONFIG_MCSI_MODEM
93 T_AUDIO_VOICE_PATH_SETTING vpath; 93 T_AUDIO_VOICE_PATH_SETTING vpath;
94 T_AUDIO_FULL_ACCESS_WRITE audio_param; 94 T_AUDIO_FULL_ACCESS_WRITE audio_param;
95 T_RV_RETURN return_path; 95 T_RV_RETURN return_path;
96 #endif 96 #endif
97 97
104 if (user_attach) 104 if (user_attach)
105 { 105 {
106 enable_tch_vocoder(TRUE); 106 enable_tch_vocoder(TRUE);
107 vocoder_mute_dl (FALSE); /* un-mute speaker */ 107 vocoder_mute_dl (FALSE); /* un-mute speaker */
108 vocoder_mute_ul (FALSE); /* un-mute microphone */ 108 vocoder_mute_ul (FALSE); /* un-mute microphone */
109 #ifdef CONFIG_TARGET_FCMODEM 109 #ifdef CONFIG_MCSI_MODEM
110 if (aci_digital_voice_autoswitch) 110 if (aci_digital_voice_autoswitch)
111 { 111 {
112 vpath = AUDIO_BLUETOOTH_HEADSET; 112 vpath = AUDIO_BLUETOOTH_HEADSET;
113 audio_param.variable_indentifier = AUDIO_PATH_USED; 113 audio_param.variable_indentifier = AUDIO_PATH_USED;
114 audio_param.data = &vpath; 114 audio_param.data = &vpath;
122 else 122 else
123 { 123 {
124 vocoder_mute_dl (TRUE); /* mute speaker */ 124 vocoder_mute_dl (TRUE); /* mute speaker */
125 vocoder_mute_ul (TRUE); /* mute microphone */ 125 vocoder_mute_ul (TRUE); /* mute microphone */
126 enable_tch_vocoder (FALSE); /* disable vocoder */ 126 enable_tch_vocoder (FALSE); /* disable vocoder */
127 #ifdef CONFIG_TARGET_FCMODEM 127 #ifdef CONFIG_MCSI_MODEM
128 if (aci_digital_voice_autoswitch) 128 if (aci_digital_voice_autoswitch)
129 { 129 {
130 vpath = AUDIO_GSM_VOICE_PATH; 130 vpath = AUDIO_GSM_VOICE_PATH;
131 audio_param.variable_indentifier = AUDIO_PATH_USED; 131 audio_param.variable_indentifier = AUDIO_PATH_USED;
132 audio_param.data = &vpath; 132 audio_param.data = &vpath;