FreeCalypso > hg > fc-magnetite
comparison src/g23m-aci/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 | 4626d7a955de |
children | 92dbfa906f66 |
comparison
equal
deleted
inserted
replaced
599:4626d7a955de | 600:8f50b202e81f |
---|---|
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_FCDEV3B | 41 #ifdef CONFIG_TARGET_FCMODEM |
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_FCDEV3B | 72 #ifdef CONFIG_TARGET_FCMODEM |
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_FCDEV3B | 92 #ifdef CONFIG_TARGET_FCMODEM |
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_FCDEV3B | 109 #ifdef CONFIG_TARGET_FCMODEM |
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_FCDEV3B | 127 #ifdef CONFIG_TARGET_FCMODEM |
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; |