comparison src/aci2/aci/hl_audio_drv.c @ 600:8f50b202e81f

board preprocessor conditionals: prep for more FC hw in the future This change eliminates the CONFIG_TARGET_FCDEV3B preprocessor symbol and all preprocessor conditionals throughout the code base that tested for it, replacing them with CONFIG_TARGET_FCFAM or CONFIG_TARGET_FCMODEM. These new symbols are specified as follows: CONFIG_TARGET_FCFAM is intended to cover all hardware designs created by Mother Mychaela under the FreeCalypso trademark. This family will include modem products (repackagings of the FCDEV3B, possibly with RFFE or even RF transceiver changes), and also my desired FreeCalypso handset product. CONFIG_TARGET_FCMODEM is intended to cover all FreeCalypso modem products (which will be firmware-compatible with the FCDEV3B if they use TI Rita transceiver, or will require a different fw build if we switch to one of Silabs Aero transceivers), but not the handset product. Right now this CONFIG_TARGET_FCMODEM preprocessor symbol is used to conditionalize everything dealing with MCSI. At the present moment the future of FC hardware evolution is still unknown: it is not known whether we will ever have any beyond-FCDEV3B hardware at all (contingent on uncertain funding), and if we do produce further FC hardware designs, it is not known whether they will retain the same FIC modem core (triband), if we are going to have a quadband design that still retains the classic Rita transceiver, or if we are going to switch to Silabs Aero II or some other transceiver. If we produce a quadband modem that still uses Rita, it will run exactly the same fw as the FCDEV3B thanks to the way we define TSPACT signals for the RF_FAM=12 && CONFIG_TARGET_FCFAM combination, and the current fcdev3b build target will be renamed to fcmodem. OTOH, if that putative quadband modem will be Aero-based, then it will require a different fw build target, the fcdev3b target will stay as it is, and the two targets will both define CONFIG_TARGET_FCFAM and CONFIG_TARGET_FCMODEM, but will have different RF_FAM numbers. But no matter which way we are going to evolve, it is not right to have conditionals on CONFIG_TARGET_FCDEV3B in places like ACI, and the present change clears the way for future evolution.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 01 Apr 2019 01:05:24 +0000
parents f18b29e27be5
children 92dbfa906f66
comparison
equal deleted inserted replaced
599:4626d7a955de 600:8f50b202e81f
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_FCDEV3B 42 #ifdef CONFIG_TARGET_FCMODEM
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_FCDEV3B 98 #ifdef CONFIG_TARGET_FCMODEM
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_FCDEV3B 137 #ifdef CONFIG_TARGET_FCMODEM
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_FCDEV3B 163 #ifdef CONFIG_TARGET_FCMODEM
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_FCDEV3B 180 #ifdef CONFIG_TARGET_FCMODEM
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);