FreeCalypso > hg > fc-magnetite
comparison src/aci2/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 |
---|---|
37 | 37 |
38 /* ===============GLOBAL VARIABLES====================*/ | 38 /* ===============GLOBAL VARIABLES====================*/ |
39 | 39 |
40 LOCAL T_HL_VOCODER_STATE currVocoderState; | 40 LOCAL T_HL_VOCODER_STATE currVocoderState; |
41 | 41 |
42 #ifdef CONFIG_TARGET_FCMODEM | 42 #ifdef CONFIG_MCSI_MODEM |
43 GLOBAL UBYTE aci_digital_voice_autoswitch; | 43 GLOBAL UBYTE aci_digital_voice_autoswitch; |
44 #endif | 44 #endif |
45 | 45 |
46 /* This flag helps enable the vocoder interface testing for | 46 /* This flag helps enable the vocoder interface testing for |
47 specific tescases | 47 specific tescases |
93 PURPOSE : This function is called to initialise the variables in | 93 PURPOSE : This function is called to initialise the variables in |
94 the High Level Audio driver | 94 the High Level Audio driver |
95 */ | 95 */ |
96 GLOBAL T_HL_VOICE_DRV_RSLT hl_drv_enable_vocoder ( void ) | 96 GLOBAL T_HL_VOICE_DRV_RSLT hl_drv_enable_vocoder ( void ) |
97 { | 97 { |
98 #ifdef CONFIG_TARGET_FCMODEM | 98 #ifdef CONFIG_MCSI_MODEM |
99 T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_BLUETOOTH_HEADSET; | 99 T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_BLUETOOTH_HEADSET; |
100 T_AUDIO_FULL_ACCESS_WRITE audio_param; | 100 T_AUDIO_FULL_ACCESS_WRITE audio_param; |
101 T_RV_RETURN return_path = { NULL, 0 }; | 101 T_RV_RETURN return_path = { NULL, 0 }; |
102 #endif | 102 #endif |
103 | 103 |
132 #ifndef _SIMULATION_ | 132 #ifndef _SIMULATION_ |
133 TRACE_EVENT("Function interface for Vocoder"); | 133 TRACE_EVENT("Function interface for Vocoder"); |
134 enable_tch_vocoder(TRUE); | 134 enable_tch_vocoder(TRUE); |
135 vocoder_mute_dl (FALSE); /* un-mute speaker */ | 135 vocoder_mute_dl (FALSE); /* un-mute speaker */ |
136 vocoder_mute_ul (FALSE); /* un-mute microphone */ | 136 vocoder_mute_ul (FALSE); /* un-mute microphone */ |
137 #ifdef CONFIG_TARGET_FCMODEM | 137 #ifdef CONFIG_MCSI_MODEM |
138 if (aci_digital_voice_autoswitch) | 138 if (aci_digital_voice_autoswitch) |
139 { | 139 { |
140 audio_param.variable_indentifier = AUDIO_PATH_USED; | 140 audio_param.variable_indentifier = AUDIO_PATH_USED; |
141 audio_param.data = &vpath; | 141 audio_param.data = &vpath; |
142 audio_full_access_write(&audio_param, return_path); | 142 audio_full_access_write(&audio_param, return_path); |
158 PURPOSE : This function is called to initialise the variables in | 158 PURPOSE : This function is called to initialise the variables in |
159 the High Level Audio driver | 159 the High Level Audio driver |
160 */ | 160 */ |
161 GLOBAL void hl_drv_disable_vocoder ( void ) | 161 GLOBAL void hl_drv_disable_vocoder ( void ) |
162 { | 162 { |
163 #ifdef CONFIG_TARGET_FCMODEM | 163 #ifdef CONFIG_MCSI_MODEM |
164 T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_GSM_VOICE_PATH; | 164 T_AUDIO_VOICE_PATH_SETTING vpath = AUDIO_GSM_VOICE_PATH; |
165 T_AUDIO_FULL_ACCESS_WRITE audio_param; | 165 T_AUDIO_FULL_ACCESS_WRITE audio_param; |
166 T_RV_RETURN return_path = { NULL, 0 }; | 166 T_RV_RETURN return_path = { NULL, 0 }; |
167 #endif | 167 #endif |
168 | 168 |
175 #ifndef _SIMULATION_ | 175 #ifndef _SIMULATION_ |
176 TRACE_EVENT("Function interface for Vocoder"); | 176 TRACE_EVENT("Function interface for Vocoder"); |
177 vocoder_mute_dl (TRUE); /* mute speaker */ | 177 vocoder_mute_dl (TRUE); /* mute speaker */ |
178 vocoder_mute_ul (TRUE); /* mute microphone */ | 178 vocoder_mute_ul (TRUE); /* mute microphone */ |
179 enable_tch_vocoder (FALSE); /* disable vocoder */ | 179 enable_tch_vocoder (FALSE); /* disable vocoder */ |
180 #ifdef CONFIG_TARGET_FCMODEM | 180 #ifdef CONFIG_MCSI_MODEM |
181 if (aci_digital_voice_autoswitch) | 181 if (aci_digital_voice_autoswitch) |
182 { | 182 { |
183 audio_param.variable_indentifier = AUDIO_PATH_USED; | 183 audio_param.variable_indentifier = AUDIO_PATH_USED; |
184 audio_param.data = &vpath; | 184 audio_param.data = &vpath; |
185 audio_full_access_write(&audio_param, return_path); | 185 audio_full_access_write(&audio_param, return_path); |