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