annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project : GSM-PS (6147)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul : AOC
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : This module defines the functions for the high level audio
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 driver interface.
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 +-----------------------------------------------------------------------------
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #ifndef HL_AUDIO_DRV_C
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #define HL_AUDIO_DRV_C
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #endif
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #include "aci_all.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "aci_cmh.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "aci.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 #include "psa.h"
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "hl_audio_drv.h"
597
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
32 #include "rv/rv_general.h"
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
33 #include "audio/audio_api.h"
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
34 #include "fc-target.cfg"
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 /* ===============GLOBAL VARIABLES====================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 LOCAL T_HL_VOCODER_STATE currVocoderState;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
600
8f50b202e81f board preprocessor conditionals: prep for more FC hw in the future
Mychaela Falconia <falcon@freecalypso.org>
parents: 599
diff changeset
41 #ifdef CONFIG_TARGET_FCMODEM
597
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
42 GLOBAL UBYTE aci_digital_voice_autoswitch;
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
43 #endif
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
44
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 /* =============FUNCTION DEFINITIONS FOR L1===========*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #ifdef VOCODER_FUNC_INTERFACE
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 void vocoder_mute_dl( BOOL mute );
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 void vocoder_mute_ul( BOOL mute );
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 void enable_tch_vocoder (BOOL vocoder_on);
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #endif /* VOCODER_FUNC_INTERFACE */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 /*================= FUNCTIONS ========================*/
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 | PROJECT : GSM-PS (6147) MODULE : HL_AUDIO_DRV |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 | ROUTINE : hl_audio_drv_init |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 PURPOSE : This function is called to initialise the variables in
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 the High Level Audio driver
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 GLOBAL void hl_audio_drv_init (void)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 TRACE_FUNCTION("hl_audio_drv_init()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 currVocoderState = HL_VOCODER_DISABLED;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
600
8f50b202e81f board preprocessor conditionals: prep for more FC hw in the future
Mychaela Falconia <falcon@freecalypso.org>
parents: 599
diff changeset
72 #ifdef CONFIG_TARGET_FCMODEM
599
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
73 static void audio_mode_callback(void *event_from_audio)
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
74 {
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
75 /* do nothing at this time */
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
76 }
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
77 #endif
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
78
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 | PROJECT : GSM-PS (6147) MODULE : PSA_CCF |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 | ROUTINE : hl_drv_set_vocoder_state|
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
85 PURPOSE : This function will enable or disable vocoder as needed,
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
86 and possibly also enable/disable the MCSI digital voice
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
87 path if running on a FreeCalypso modem in the digital
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
88 voice interface configuration.
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 GLOBAL void hl_drv_set_vocoder_state(BOOL user_attach)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 {
600
8f50b202e81f board preprocessor conditionals: prep for more FC hw in the future
Mychaela Falconia <falcon@freecalypso.org>
parents: 599
diff changeset
92 #ifdef CONFIG_TARGET_FCMODEM
597
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
93 T_AUDIO_VOICE_PATH_SETTING vpath;
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
94 T_AUDIO_FULL_ACCESS_WRITE audio_param;
599
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
95 T_RV_RETURN return_path;
597
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
96 #endif
f18b29e27be5 First attempt at MCSI voice path automatic switching
Mychaela Falconia <falcon@freecalypso.org>
parents: 162
diff changeset
97
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 TRACE_FUNCTION("hl_drv_set_vocoder_state");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 if ( (user_attach EQ TRUE AND currVocoderState EQ HL_VOCODER_ENABLED) OR
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 (user_attach EQ FALSE AND currVocoderState EQ HL_VOCODER_DISABLED) )
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
102 return; /* No state change requested */
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
104 if (user_attach)
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 {
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
106 enable_tch_vocoder(TRUE);
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
107 vocoder_mute_dl (FALSE); /* un-mute speaker */
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
108 vocoder_mute_ul (FALSE); /* un-mute microphone */
600
8f50b202e81f board preprocessor conditionals: prep for more FC hw in the future
Mychaela Falconia <falcon@freecalypso.org>
parents: 599
diff changeset
109 #ifdef CONFIG_TARGET_FCMODEM
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
110 if (aci_digital_voice_autoswitch)
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
111 {
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
112 vpath = AUDIO_BLUETOOTH_HEADSET;
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
113 audio_param.variable_indentifier = AUDIO_PATH_USED;
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
114 audio_param.data = &vpath;
599
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
115 return_path.addr_id = NULL;
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
116 return_path.callback_func = audio_mode_callback;
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
117 audio_full_access_write(&audio_param, return_path);
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
118 }
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
119 #endif
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
120 currVocoderState = HL_VOCODER_ENABLED;
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
121 }
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
122 else
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
123 {
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
124 vocoder_mute_dl (TRUE); /* mute speaker */
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
125 vocoder_mute_ul (TRUE); /* mute microphone */
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
126 enable_tch_vocoder (FALSE); /* disable vocoder */
600
8f50b202e81f board preprocessor conditionals: prep for more FC hw in the future
Mychaela Falconia <falcon@freecalypso.org>
parents: 599
diff changeset
127 #ifdef CONFIG_TARGET_FCMODEM
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
128 if (aci_digital_voice_autoswitch)
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
129 {
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
130 vpath = AUDIO_GSM_VOICE_PATH;
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
131 audio_param.variable_indentifier = AUDIO_PATH_USED;
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
132 audio_param.data = &vpath;
599
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
133 return_path.addr_id = NULL;
4626d7a955de aci3 MCSI autoswitch: RV return path fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 598
diff changeset
134 return_path.callback_func = audio_mode_callback;
598
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
135 audio_full_access_write(&audio_param, return_path);
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
136 }
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
137 #endif
717ed17d82c6 aci3 vocoder control revamped, AT@VSEL now works as it should
Mychaela Falconia <falcon@freecalypso.org>
parents: 597
diff changeset
138 currVocoderState = HL_VOCODER_DISABLED;
162
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 return;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 | PROJECT : GSM-PS (6147) MODULE : HL_AUDIO_DRV |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 | ROUTINE : hl_drv_get_vocoder_state |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 PURPOSE : This function returns the state of the vocoder
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 GLOBAL T_HL_VOCODER_STATE hl_drv_get_vocoder_state (void)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 return currVocoderState;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 #ifndef VOCODER_FUNC_INTERFACE
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 /*
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 | PROJECT : GSM-PS (6147) MODULE : HL_AUDIO_DRV |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 | ROUTINE : hl_drv_vocoder_enabled |
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 +-------------------------------------------------------------------+
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 PURPOSE : Currently this function does nothing
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 */
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 GLOBAL void hl_drv_vocoder_state_set (void)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 TRACE_FUNCTION("hl_drv_vocoder_enabled()");
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 switch(currVocoderState)
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 {
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 case HL_VOCODER_ENABLE_INITIATED:
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 currVocoderState = HL_VOCODER_ENABLED;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 break;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 case HL_VOCODER_DISABLE_INITIATED:
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 currVocoderState = HL_VOCODER_DISABLED;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 break;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 default:
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 break;
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 }
53929b40109c src/g23m-aci: initial import from TCS3.2/LoCosto
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 #endif