FreeCalypso > hg > fc-selenite
comparison src/g23m-aci/aci/hl_audio_drv.c @ 163:a911ac771094
board preprocessor conditionals: prep for more FC hw in the future
Please see the corresponding change in fc-magnetite for the explanation.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 01 Apr 2019 01:20:03 +0000 |
parents | 8c5d012b9c4d |
children | 7409b22cac61 |
comparison
equal
deleted
inserted
replaced
162:8c5d012b9c4d | 163:a911ac771094 |
---|---|
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; |