comparison L1/audio_include/l1audio_signa.h @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children 420ac6391166
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /************* Revision Controle System Header *************
2 * GSM Layer 1 software
3 * L1AUDIO_SIGNA.H
4 *
5 * Filename l1audio_signa.h
6 * Copyright 2003 (C) Texas Instruments
7 *
8 ************* Revision Controle System Header *************/
9
10 #include "../../include/config.h"
11 #include "../include/l1_confg.h"
12
13 #if (AUDIO_TASK == 1)
14 #define P_AUDIO ( 0x18 )
15
16 // Messages MMI <-> L1A
17 #if (KEYBEEP)
18 #define MMI_KEYBEEP_START_REQ ( ( P_AUDIO << 8 ) | 0 ) // build: T_MMI_KEYBEEP_REQ
19 #define MMI_KEYBEEP_STOP_REQ ( ( P_AUDIO << 8 ) | 1 ) // build: trigger
20 #define MMI_KEYBEEP_START_CON ( ( P_AUDIO << 8 ) | 2 )
21 #define MMI_KEYBEEP_STOP_CON ( ( P_AUDIO << 8 ) | 3 )
22 #endif
23 #if (TONE)
24 #define MMI_TONE_START_REQ ( ( P_AUDIO << 8 ) | 4 ) // build: T_MMI_TONE_REQ
25 #define MMI_TONE_STOP_REQ ( ( P_AUDIO << 8 ) | 5 ) // build: trigger
26 #define MMI_TONE_START_CON ( ( P_AUDIO << 8 ) | 6 )
27 #define MMI_TONE_STOP_CON ( ( P_AUDIO << 8 ) | 7 )
28 #endif
29 #if (MELODY_E1)
30 #define MMI_MELODY0_START_REQ ( ( P_AUDIO << 8 ) | 8 ) // build: T_MMI_MELODY_REQ
31 #define MMI_MELODY0_STOP_REQ ( ( P_AUDIO << 8 ) | 9 ) // build: trigger
32 #define MMI_MELODY0_START_CON ( ( P_AUDIO << 8 ) | 10 )
33 #define MMI_MELODY0_STOP_CON ( ( P_AUDIO << 8 ) | 11 )
34
35 #define MMI_MELODY1_START_REQ ( ( P_AUDIO << 8 ) | 12 ) // build: T_MMI_MELODY_REQ
36 #define MMI_MELODY1_STOP_REQ ( ( P_AUDIO << 8 ) | 13 ) // build: trigger
37 #define MMI_MELODY1_START_CON ( ( P_AUDIO << 8 ) | 14 )
38 #define MMI_MELODY1_STOP_CON ( ( P_AUDIO << 8 ) | 15 )
39 #endif
40 #if (VOICE_MEMO)
41 #define MMI_VM_PLAY_START_REQ ( ( P_AUDIO << 8 ) | 16 ) // build: T_MMI_VM_PLAY_REQ
42 #define MMI_VM_PLAY_STOP_REQ ( ( P_AUDIO << 8 ) | 17 ) // build: trigger
43 #define MMI_VM_PLAY_START_CON ( ( P_AUDIO << 8 ) | 18 )
44 #define MMI_VM_PLAY_STOP_CON ( ( P_AUDIO << 8 ) | 19 )
45
46 #define MMI_VM_RECORD_START_REQ ( ( P_AUDIO << 8 ) | 20 ) // build: T_MMI_VM_RECORD_REQ
47 #define MMI_VM_RECORD_STOP_REQ ( ( P_AUDIO << 8 ) | 21 ) // build: trigger
48 #define MMI_VM_RECORD_START_CON ( ( P_AUDIO << 8 ) | 22 )
49 #define MMI_VM_RECORD_STOP_CON ( ( P_AUDIO << 8 ) | 23 )
50 #endif
51 #if (L1_PCM_EXTRACTION)
52 #define MMI_PCM_DOWNLOAD_START_REQ ( ( P_AUDIO << 8 ) | 24 )
53 #define MMI_PCM_DOWNLOAD_STOP_REQ ( ( P_AUDIO << 8 ) | 25 )
54 #define MMI_PCM_DOWNLOAD_START_CON ( ( P_AUDIO << 8 ) | 26 )
55 #define MMI_PCM_DOWNLOAD_STOP_CON ( ( P_AUDIO << 8 ) | 27 )
56
57 #define MMI_PCM_UPLOAD_START_REQ ( ( P_AUDIO << 8 ) | 28 )
58 #define MMI_PCM_UPLOAD_STOP_REQ ( ( P_AUDIO << 8 ) | 29 )
59 #define MMI_PCM_UPLOAD_START_CON ( ( P_AUDIO << 8 ) | 30 )
60 #define MMI_PCM_UPLOAD_STOP_CON ( ( P_AUDIO << 8 ) | 31 )
61 #endif
62 #if (SPEECH_RECO)
63 #define MMI_SR_ENROLL_START_REQ ( ( P_AUDIO << 8 ) | 24 ) // build: T_MMI_SR_ENROLL_REQ
64 #define MMI_SR_ENROLL_STOP_REQ ( ( P_AUDIO << 8 ) | 25 ) // build: trigger
65 #define MMI_SR_ENROLL_START_CON ( ( P_AUDIO << 8 ) | 26 )
66 #define MMI_SR_ENROLL_STOP_CON ( ( P_AUDIO << 8 ) | 27 )
67
68 #define MMI_SR_UPDATE_START_REQ ( ( P_AUDIO << 8 ) | 28 ) // build: T_MMI_SR_UPDATE_REQ
69 #define MMI_SR_UPDATE_STOP_REQ ( ( P_AUDIO << 8 ) | 29 ) // build: trigger
70 #define MMI_SR_UPDATE_START_CON ( ( P_AUDIO << 8 ) | 30 )
71 #define MMI_SR_UPDATE_STOP_CON ( ( P_AUDIO << 8 ) | 31 )
72
73 #define MMI_SR_RECO_START_REQ ( ( P_AUDIO << 8 ) | 32 ) // build: T_MMI_SR_RECO_REQ
74 #define MMI_SR_RECO_STOP_REQ ( ( P_AUDIO << 8 ) | 33 ) // build: trigger
75 #define MMI_SR_RECO_START_CON ( ( P_AUDIO << 8 ) | 34 )
76 #define MMI_SR_RECO_STOP_CON ( ( P_AUDIO << 8 ) | 35 )
77
78 #define MMI_SR_UPDATE_CHECK_START_REQ ( ( P_AUDIO << 8 ) | 36 ) // build: T_MMI_SR_UPDATE_CHECK_REQ
79 #define MMI_SR_UPDATE_CHECK_STOP_REQ ( ( P_AUDIO << 8 ) | 37 ) // build: trigger
80 #define MMI_SR_UPDATE_CHECK_START_CON ( ( P_AUDIO << 8 ) | 38 )
81 #define MMI_SR_UPDATE_CHECK_STOP_CON ( ( P_AUDIO << 8 ) | 39 )
82 #endif
83 #if (L1_AEC == 1)
84 #define MMI_AEC_REQ ( ( P_AUDIO << 8 ) | 40 ) // build: T_MMI_AEC_REQ
85 #define MMI_AEC_CON ( ( P_AUDIO << 8 ) | 41 )
86 #endif
87 #if (L1_AEC == 2)
88 #define MMI_AQI_AEC_REQ ( ( P_AUDIO << 8 ) | 143 ) // build: T_MMI_AQI_AEC_REQ
89 #define MMI_AQI_AEC_CON ( ( P_AUDIO << 8 ) | 144 )
90 #endif
91 #if (FIR)
92 #define MMI_AUDIO_FIR_REQ ( ( P_AUDIO << 8 ) | 42 ) // build: T_MMI_AUDIO_FIR_REQ
93 #define MMI_AUDIO_FIR_CON ( ( P_AUDIO << 8 ) | 43 )
94 #endif
95 #if (AUDIO_MODE)
96 #define MMI_AUDIO_MODE_REQ ( ( P_AUDIO << 8 ) | 44 ) // build: T_MMI_AUDIO_MODE
97 #define MMI_AUDIO_MODE_CON ( ( P_AUDIO << 8 ) | 45 )
98 #endif
99 #if (MELODY_E2)
100 #define MMI_MELODY0_E2_START_REQ ( ( P_AUDIO << 8 ) | 46 ) // build: T_MMI_MELODY_E2_REQ
101 #define MMI_MELODY0_E2_STOP_REQ ( ( P_AUDIO << 8 ) | 47 ) // build: trigger
102 #define MMI_MELODY0_E2_START_CON ( ( P_AUDIO << 8 ) | 48 )
103 #define MMI_MELODY0_E2_STOP_CON ( ( P_AUDIO << 8 ) | 49 )
104
105 #define MMI_MELODY1_E2_START_REQ ( ( P_AUDIO << 8 ) | 50 ) // build: T_MMI_MELODY_E2_REQ
106 #define MMI_MELODY1_E2_STOP_REQ ( ( P_AUDIO << 8 ) | 51 ) // build: trigger
107 #define MMI_MELODY1_E2_START_CON ( ( P_AUDIO << 8 ) | 52 )
108 #define MMI_MELODY1_E2_STOP_CON ( ( P_AUDIO << 8 ) | 53 )
109 #endif
110 #if (L1_VOICE_MEMO_AMR)
111 #define MMI_VM_AMR_PLAY_START_REQ ( ( P_AUDIO << 8 ) | 54 ) // build: T_MMI_VM_AMR_PLAY_REQ
112 #define MMI_VM_AMR_PLAY_STOP_REQ ( ( P_AUDIO << 8 ) | 55 ) // build: trigger
113 #define MMI_VM_AMR_PLAY_START_CON ( ( P_AUDIO << 8 ) | 56 )
114 #define MMI_VM_AMR_PLAY_STOP_CON ( ( P_AUDIO << 8 ) | 57 )
115 #define MMI_VM_AMR_PAUSE_REQ ( ( P_AUDIO << 8 ) | 158 )
116 #define MMI_VM_AMR_RESUME_REQ ( ( P_AUDIO << 8 ) | 159 )
117 #define MMI_VM_AMR_PAUSE_CON ( ( P_AUDIO << 8 ) | 160 )
118 #define MMI_VM_AMR_RESUME_CON ( ( P_AUDIO << 8 ) | 161 )
119
120
121 #define MMI_VM_AMR_RECORD_START_REQ ( ( P_AUDIO << 8 ) | 58 ) // build: T_MMI_VM_AMR_RECORD_REQ
122 #define MMI_VM_AMR_RECORD_STOP_REQ ( ( P_AUDIO << 8 ) | 59 ) // build: trigger
123 #define MMI_VM_AMR_RECORD_START_CON ( ( P_AUDIO << 8 ) | 60 )
124 #define MMI_VM_AMR_RECORD_STOP_CON ( ( P_AUDIO << 8 ) | 61 )
125 #endif
126 #if (L1_CPORT == 1)
127 #define MMI_CPORT_CONFIGURE_REQ ( ( P_AUDIO << 8 ) | 62 )
128 #define MMI_CPORT_CONFIGURE_CON ( ( P_AUDIO << 8 ) | 63 )
129 #endif
130 #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1 || L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
131 #define MMI_AUDIO_ONOFF_REQ ( ( P_AUDIO << 8 ) | 64 )
132 #define MMI_AUDIO_ONOFF_CON ( ( P_AUDIO << 8 ) | 65 )
133 #endif
134 #if (L1_EXT_AUDIO_MGT == 1)
135 #define MMI_EXT_AUDIO_MGT_START_REQ ( ( P_AUDIO << 8 ) | 66 )
136 #define MMI_EXT_AUDIO_MGT_STOP_REQ ( ( P_AUDIO << 8 ) | 67 )
137 #define MMI_EXT_AUDIO_MGT_START_CON ( ( P_AUDIO << 8 ) | 68 )
138 #define MMI_EXT_AUDIO_MGT_STOP_CON ( ( P_AUDIO << 8 ) | 69 )
139 #endif
140 #if (L1_ANR == 1)
141 #define MMI_ANR_REQ ( ( P_AUDIO << 8 ) | 70 )
142 #define MMI_ANR_CON ( ( P_AUDIO << 8 ) | 71 )
143 #endif
144 #if (L1_IIR == 1)
145 #define MMI_IIR_REQ ( ( P_AUDIO << 8 ) | 72 )
146 #define MMI_IIR_CON ( ( P_AUDIO << 8 ) | 73 )
147 #endif
148 #if (L1_LIMITER == 1)
149 #define MMI_LIMITER_REQ ( ( P_AUDIO << 8 ) | 74 )
150 #define MMI_LIMITER_CON ( ( P_AUDIO << 8 ) | 75 )
151 #endif
152 #if (L1_ES == 1)
153 #define MMI_ES_REQ ( ( P_AUDIO << 8 ) | 76 )
154 #define MMI_ES_CON ( ( P_AUDIO << 8 ) | 77 )
155 #endif
156 #if (L1_DRC == 1)
157 #define MMI_AQI_DRC_REQ ( ( P_AUDIO << 8 ) | 146 )
158 #define MMI_AQI_DRC_CON ( ( P_AUDIO << 8 ) | 147 )
159 #endif
160 #if (L1_VOCODER_IF_CHANGE == 1)
161 #define MMI_TCH_VOCODER_CFG_REQ 0x0E0C
162 #define MMI_TCH_VOCODER_CFG_CON 0x4E08
163 #endif
164 #if (L1_WCM == 1)
165 #define MMI_AQI_WCM_REQ ( ( P_AUDIO << 8 ) | 149 )
166 #define MMI_AQI_WCM_CON ( ( P_AUDIO << 8 ) | 150 )
167 #endif
168
169 #if (L1_AGC_UL == 1)
170 #define MMI_AQI_AGC_UL_REQ ( ( P_AUDIO << 8 ) | 137)
171 #define MMI_AQI_AGC_UL_CON ( ( P_AUDIO << 8 ) | 138)
172 #endif
173
174 #if (L1_AGC_DL == 1)
175 #define MMI_AQI_AGC_DL_REQ ( ( P_AUDIO << 8 ) | 139)
176 #define MMI_AQI_AGC_DL_CON ( ( P_AUDIO << 8 ) | 140)
177 #endif
178
179
180 #if (L1_ANR == 2)
181 #define MMI_AQI_ANR_REQ ( ( P_AUDIO << 8 ) | 131)
182 #define MMI_AQI_ANR_CON ( ( P_AUDIO << 8 ) | 132)
183 #endif
184
185 #if (L1_IIR == 2)
186 #define MMI_AQI_IIR_DL_REQ ( ( P_AUDIO << 8 ) | 134)
187 #define MMI_AQI_IIR_DL_CON ( ( P_AUDIO << 8 ) | 135)
188 #endif
189
190 #define MMI_OUTEN_CFG_REQ ( ( P_AUDIO << 8) | 152)
191 #define MMI_OUTEN_CFG_CON ( ( P_AUDIO << 8) | 153)
192 #define MMI_OUTEN_CFG_READ_REQ ( ( P_AUDIO << 8) | 154)
193 #define MMI_OUTEN_CFG_READ_CON ( ( P_AUDIO << 8) | 155)
194
195 #if(L1_BT_AUDIO==1)
196 #define MMI_BT_ENABLE_REQ ((P_AUDIO<<8)|167)
197 #define MMI_BT_DISABLE_REQ ((P_AUDIO<<8)|169)
198 #endif
199
200 // Messages L1S -> L1A
201 #if (KEYBEEP)
202 #define L1_KEYBEEP_START_CON ( ( P_AUDIO << 8 ) | 78 )
203 #define L1_KEYBEEP_STOP_CON ( ( P_AUDIO << 8 ) | 79 )
204 #endif
205 #if (TONE)
206 #define L1_TONE_START_CON ( ( P_AUDIO << 8 ) | 80 )
207 #define L1_TONE_STOP_CON ( ( P_AUDIO << 8 ) | 81 )
208 #endif
209 #if (MELODY_E1)
210 #define L1_MELODY0_START_CON ( ( P_AUDIO << 8 ) | 82 )
211 #define L1_MELODY0_STOP_CON ( ( P_AUDIO << 8 ) | 83 )
212
213 #define L1_MELODY1_START_CON ( ( P_AUDIO << 8 ) | 84 )
214 #define L1_MELODY1_STOP_CON ( ( P_AUDIO << 8 ) | 85 )
215 #endif
216 #if (VOICE_MEMO)
217 #define L1_VM_PLAY_START_CON ( ( P_AUDIO << 8 ) | 86 )
218 #define L1_VM_PLAY_STOP_CON ( ( P_AUDIO << 8 ) | 87 )
219
220 #define L1_VM_RECORD_START_CON ( ( P_AUDIO << 8 ) | 88 )
221 #define L1_VM_RECORD_STOP_CON ( ( P_AUDIO << 8 ) | 89 )
222 #endif
223 #if (L1_PCM_EXTRACTION)
224 #define L1_PCM_DOWNLOAD_START_CON ( ( P_AUDIO << 8 ) | 90 )
225 #define L1_PCM_DOWNLOAD_STOP_CON ( ( P_AUDIO << 8 ) | 91 )
226
227 #define L1_PCM_UPLOAD_START_CON ( ( P_AUDIO << 8 ) | 92 )
228 #define L1_PCM_UPLOAD_STOP_CON ( ( P_AUDIO << 8 ) | 93 )
229
230 #endif
231 #if (SPEECH_RECO)
232 #define L1_SR_ENROLL_START_CON ( ( P_AUDIO << 8 ) | 90 )
233 #define L1_SR_ENROLL_STOP_CON ( ( P_AUDIO << 8 ) | 91 )
234
235 #define L1_SR_UPDATE_START_CON ( ( P_AUDIO << 8 ) | 92 )
236 #define L1_SR_UPDATE_STOP_CON ( ( P_AUDIO << 8 ) | 93 )
237
238 #define L1_SR_RECO_START_CON ( ( P_AUDIO << 8 ) | 94 )
239 #define L1_SR_RECO_STOP_CON ( ( P_AUDIO << 8 ) | 95 )
240 #define L1_SR_RECO_STOP_IND ( ( P_AUDIO << 8 ) | 96 )
241 #define L1_SR_PROCESSING_STOP_CON ( ( P_AUDIO << 8 ) | 97 )
242 #endif
243 #if (L1_AEC == 1)
244 #define L1_AEC_CON ( ( P_AUDIO << 8 ) | 98 )
245 #define L1_AEC_IND ( ( P_AUDIO << 8 ) | 99 )
246 #endif
247 #if (L1_AEC == 2)
248 #define L1_AQI_AEC_CON ( ( P_AUDIO << 8 ) | 145 )
249 #endif
250 #if (FIR)
251 #define L1_AUDIO_FIR_CON ( ( P_AUDIO << 8 ) | 100 )
252 #endif
253 #if (AUDIO_MODE)
254 #define L1_AUDIO_MODE_CON ( ( P_AUDIO << 8 ) | 101 )
255 #endif
256 #if (L1_VOICE_MEMO_AMR)
257 #define L1_VM_AMR_PLAY_START_CON ( ( P_AUDIO << 8 ) | 102 )
258 #define L1_VM_AMR_PLAY_STOP_CON ( ( P_AUDIO << 8 ) | 103 )
259 #define L1_VM_AMR_PAUSE_CON ( ( P_AUDIO << 8 ) | 156 )
260 #define L1_VM_AMR_RESUME_CON ( ( P_AUDIO << 8 ) | 157 )
261
262
263 #define L1_VM_AMR_RECORD_START_CON ( ( P_AUDIO << 8 ) | 104 )
264 #define L1_VM_AMR_RECORD_STOP_CON ( ( P_AUDIO << 8 ) | 105 )
265 #endif
266 #if (L1_CPORT == 1)
267 #define L1_CPORT_CONFIGURE_CON ( ( P_AUDIO << 8 ) | 106 )
268 #endif
269 #if (L1_STEREOPATH == 1)
270 #define L1_STEREOPATH_DRV_START_CON ( ( P_AUDIO << 8 ) | 107 )
271 #define L1_STEREOPATH_DRV_STOP_CON ( ( P_AUDIO << 8 ) | 108 )
272 #endif
273 #if (L1_ANR == 1)
274 #define L1_ANR_CON ( ( P_AUDIO << 8 ) | 109 )
275 #endif
276 #if (L1_IIR == 1)
277 #define L1_IIR_CON ( ( P_AUDIO << 8 ) | 110 )
278 #endif
279 #if (L1_DRC == 1)
280 #define L1_AQI_DRC_CON ( ( P_AUDIO << 8 ) | 148 )
281 #endif
282 #if (L1_LIMITER == 1)
283 #define L1_LIMITER_CON ( ( P_AUDIO << 8 ) | 111 )
284 #endif
285 #if (L1_ES == 1)
286 #define L1_ES_CON ( ( P_AUDIO << 8 ) | 112 )
287 #endif
288
289 #if (L1_VOCODER_IF_CHANGE == 1)
290 #define L1_VOCODER_CFG_ENABLE_CON ( ( P_AUDIO << 8 ) | 129 )
291 #define L1_VOCODER_CFG_DISABLE_CON ( ( P_AUDIO << 8 ) | 130 )
292 #endif
293
294 #if (L1_AGC_UL == 1)
295 #define L1_AQI_AGC_UL_CON ( ( P_AUDIO << 8 ) | 141)
296 #endif
297
298 #if (L1_AGC_DL == 1)
299 #define L1_AQI_AGC_DL_CON ( ( P_AUDIO << 8 ) | 142)
300 #endif
301
302 #if (L1_ANR == 2)
303 #define L1_AQI_ANR_CON ( ( P_AUDIO << 8 ) | 133 )
304 #endif
305
306 #if (L1_IIR == 2)
307 #define L1_AQI_IIR_DL_CON ( ( P_AUDIO << 8 ) | 136)
308 #endif
309
310 #if (L1_WCM == 1)
311 #define L1_AQI_WCM_CON ( ( P_AUDIO << 8 ) | 151 )
312 #endif
313
314 // Messages L1A <-> Audio background
315 #if (SPEECH_RECO)
316 #define L1_SRBACK_SAVE_DATA_REQ ( ( P_AUDIO << 8 ) | 113 )
317 #define L1_SRBACK_SAVE_DATA_CON ( ( P_AUDIO << 8 ) | 114 )
318 #define L1_SRBACK_LOAD_MODEL_REQ ( ( P_AUDIO << 8 ) | 115 )
319 #define L1_SRBACK_LOAD_MODEL_CON ( ( P_AUDIO << 8 ) | 116 )
320 #define L1_SRBACK_TEMP_SAVE_DATA_REQ ( ( P_AUDIO << 8 ) | 117 )
321 #define L1_SRBACK_TEMP_SAVE_DATA_CON ( ( P_AUDIO << 8 ) | 118 )
322 #endif
323 #if (MELODY_E2)
324 #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_REQ ( ( P_AUDIO << 8 ) | 119 )
325 #define L1_BACK_MELODY_E2_LOAD_INSTRUMENT_CON ( ( P_AUDIO << 8 ) | 120 )
326 #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_REQ ( ( P_AUDIO << 8 ) | 121 )
327 #define L1_BACK_MELODY_E2_UNLOAD_INSTRUMENT_CON ( ( P_AUDIO << 8 ) | 122 )
328
329 #define L1_MELODY0_E2_STOP_CON ( ( P_AUDIO << 8 ) | 123 )
330 #define L1_MELODY1_E2_STOP_CON ( ( P_AUDIO << 8 ) | 124 )
331 #endif
332
333 #if (OP_RIV_AUDIO == 1)
334 #if (L1_AUDIO_DRIVER == 1)
335 #define L1_AUDIO_DRIVER_IND ( ( P_AUDIO << 8 ) | 125 )
336 #endif
337 #endif
338
339 #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1 || L1_EXT_MCU_AUDIO_VOICE_ONOFF == 1)
340 #define L1_AUDIO_ONOFF_CON ( ( P_AUDIO << 8 ) | 126 )
341 #endif
342
343 #endif // AUDIO_TASK == 1