comparison gsm-fw/L1/audio_include/l1audio_defty.h @ 519:57ad8f4d5cb5

L1: audio and tm header files imported from Leonardo semi-src
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Thu, 10 Jul 2014 15:02:48 +0000
parents
children d638de8cc6b8
comparison
equal deleted inserted replaced
518:ffbb71ee664c 519:57ad8f4d5cb5
1 /************* Revision Controle System Header *************
2 * GSM Layer 1 software
3 * L1AUDIO_DEFTY.H
4 *
5 * Filename l1audio_defty.h
6 * Copyright 2003 (C) Texas Instruments
7 *
8 ************* Revision Controle System Header *************/
9
10 #if (AUDIO_TASK == 1)
11
12 #if (KEYBEEP)
13 /***************************************************************************************/
14 /* Keybeep l1a_l1s_com structure... */
15 /***************************************************************************************/
16 typedef struct
17 {
18 BOOL start;
19 BOOL stop;
20 }
21 T_KEYBEEP_COMMAND;
22
23 typedef struct
24 {
25 T_KEYBEEP_COMMAND command;
26 }
27 T_KEYBEEP_TASK;
28 #endif
29
30 #if (TONE)
31 /***************************************************************************************/
32 /* Tone l1a_l1s_com structure... */
33 /***************************************************************************************/
34 typedef struct
35 {
36 BOOL start;
37 BOOL stop;
38 }
39 T_TONE_COMMAND;
40
41 typedef struct
42 {
43 T_TONE_COMMAND command;
44 }
45 T_TONE_TASK;
46 #endif
47
48 #if (MELODY_E1)
49 /***************************************************************************************/
50 /* Melody l1a_l1s_com structure... */
51 /***************************************************************************************/
52 typedef struct
53 {
54 BOOL start;
55 BOOL stop;
56 }
57 T_MELODY_COMMAND;
58
59 typedef struct
60 {
61 UWORD8 session_id;
62 UWORD8 error_id;
63 UWORD16 buffer_size;
64 UWORD16 *ptr_buf;
65 BOOL loopback;
66 UWORD16 oscillator_used_bitmap;
67 UWORD16 oscillator_melody_bitmap;
68 UWORD8 melody_to_oscillator[SC_NUMBER_OSCILLATOR];
69 }
70 T_MELODY_PARAM;
71
72 typedef struct
73 {
74 T_MELODY_COMMAND command;
75 T_MELODY_PARAM parameters;
76 }
77 T_MELODY_TASK;
78
79 /***************************************************************************************/
80 /* Melody l1s structure... */
81 /***************************************************************************************/
82
83 typedef struct
84 {
85 UWORD8 error_id;
86 UWORD16 buffer_size;
87 UWORD16 *ptr_buf;
88 UWORD16 melody_header;
89 API *(oscillator[SC_NUMBER_OSCILLATOR]);
90 UWORD16 counter;
91 UWORD16 oscillator_used_in_desc;
92 UWORD16 oscillator_started;
93 }
94 T_L1S_MELODY_TASK;
95 #endif
96
97 #if (VOICE_MEMO)
98 /***************************************************************************************/
99 /* Voice memo l1a_l1s_com structure... */
100 /***************************************************************************************/
101
102 typedef struct
103 {
104 BOOL start;
105 BOOL stop;
106 }
107 T_VM_PLAY_COMMAND;
108
109 typedef struct
110 {
111 UWORD8 session_id;
112 }
113 T_VM_PLAY_PARAM;
114
115 typedef struct
116 {
117 T_VM_PLAY_COMMAND command;
118 T_VM_PLAY_PARAM parameters;
119 }
120 T_VM_PLAY_TASK;
121
122 typedef struct
123 {
124 BOOL start;
125 BOOL stop;
126 }
127 T_VM_RECORD_COMMAND;
128
129 typedef struct
130 {
131 UWORD8 session_id;
132 UWORD32 maximum_size;
133 BOOL dtx;
134 }
135 T_VM_RECORD_PARAM;
136
137 typedef struct
138 {
139 BOOL start;
140 }
141 T_VM_RECORD_TONE_UL;
142
143 typedef struct
144 {
145 T_VM_RECORD_COMMAND command;
146 T_VM_RECORD_PARAM parameters;
147 T_VM_RECORD_TONE_UL tone_ul;
148 }
149 T_VM_RECORD_TASK;
150
151 typedef struct
152 {
153 T_VM_PLAY_TASK play;
154 T_VM_RECORD_TASK record;
155 }
156 T_VM_TASK;
157
158 /***************************************************************************************/
159 /* Voice memo l1s structure... */
160 /***************************************************************************************/
161
162 typedef struct
163 {
164 API *a_du_x;
165 UWORD8 error_id;
166 UWORD16 buffer_size;
167 UWORD16 *ptr_buf;
168 UWORD32 recorded_size;
169 }
170 T_L1S_VM_RECORD_TASK;
171
172 typedef struct
173 {
174 API *a_du_x;
175 UWORD8 error_id;
176 UWORD16 buffer_size;
177 UWORD16 *ptr_buf;
178 }
179 T_L1S_VM_PLAY_TASK;
180
181 typedef struct
182 {
183 T_L1S_VM_PLAY_TASK play;
184 T_L1S_VM_RECORD_TASK record;
185 }
186 T_L1S_VM_TASK;
187
188 #endif
189 #if (L1_VOICE_MEMO_AMR)
190 /***************************************************************************************/
191 /* Voice memo amr l1a_l1s_com structure... */
192 /***************************************************************************************/
193
194 typedef struct
195 {
196 BOOL start;
197 BOOL stop;
198 }
199 T_VM_AMR_PLAY_COMMAND;
200
201 typedef struct
202 {
203 UWORD8 session_id;
204 }
205 T_VM_AMR_PLAY_PARAM;
206
207 typedef struct
208 {
209 T_VM_AMR_PLAY_COMMAND command;
210 T_VM_AMR_PLAY_PARAM parameters;
211 }
212 T_VM_AMR_PLAY_TASK;
213
214 typedef struct
215 {
216 BOOL start;
217 BOOL stop;
218 }
219 T_VM_AMR_RECORD_COMMAND;
220
221 typedef struct
222 {
223 UWORD8 session_id;
224 UWORD32 maximum_size;
225 UWORD8 amr_vocoder;
226 BOOL dtx;
227 }
228 T_VM_AMR_RECORD_PARAM;
229
230 typedef struct
231 {
232 T_VM_AMR_RECORD_COMMAND command;
233 T_VM_AMR_RECORD_PARAM parameters;
234 }
235 T_VM_AMR_RECORD_TASK;
236
237 typedef struct
238 {
239 T_VM_AMR_PLAY_TASK play;
240 T_VM_AMR_RECORD_TASK record;
241 }
242 T_VM_AMR_TASK;
243
244 /***************************************************************************************/
245 /* Voice memo l1s structure... */
246 /***************************************************************************************/
247
248 typedef struct
249 {
250 API *a_du_x;
251 UWORD8 error_id;
252 UWORD16 buffer_size;
253 UWORD8 *ptr_buf;
254 UWORD32 recorded_size;
255 }
256 T_L1S_VM_AMR_RECORD_TASK;
257
258 typedef struct
259 {
260 API *a_du_x;
261 UWORD8 error_id;
262 UWORD16 buffer_size;
263 UWORD8 *ptr_buf;
264 UWORD8 previous_type;
265 UWORD8 transition_header;
266 }
267 T_L1S_VM_AMR_PLAY_TASK;
268
269 typedef struct
270 {
271 T_L1S_VM_AMR_PLAY_TASK play;
272 T_L1S_VM_AMR_RECORD_TASK record;
273 }
274 T_L1S_VM_AMR_TASK;
275
276 #endif // L1_VOICE_MEMO_AMR
277 #if (SPEECH_RECO)
278 /***************************************************************************************/
279 /* Speech recogniton l1a_l1s_com structure... */
280 /***************************************************************************************/
281
282 typedef struct
283 {
284 BOOL enroll_start;
285 BOOL enroll_stop;
286 BOOL update_start;
287 BOOL update_stop;
288 BOOL reco_start;
289 BOOL reco_stop;
290 BOOL processing_start;
291 BOOL processing_stop;
292 BOOL speech_start;
293 BOOL speech_stop;
294 }
295 T_SR_COMMAND;
296
297 typedef struct
298 {
299 UWORD8 database_id;
300 UWORD8 word_index;
301 API *model_address;
302 UWORD16 *model_temp_address;
303 BOOL speech;
304 UWORD16 *speech_address;
305 UWORD16 *start_address;
306 UWORD16 *stop_address;
307 BOOL CTO_algorithm;
308 UWORD8 index_counter;
309 UWORD8 vocabulary_size;
310 UWORD8 word_to_check;
311 UWORD16 best_word_index;
312 UWORD32 best_word_score;
313 UWORD16 second_best_word_index;
314 UWORD32 second_best_word_score;
315 UWORD16 third_best_word_index;
316 UWORD32 third_best_word_score;
317 UWORD16 fourth_best_word_index;
318 UWORD32 fourth_best_word_score;
319 UWORD16 d_sr_db_level;
320 UWORD16 d_sr_db_noise;
321 UWORD16 d_sr_model_size;
322 }
323 T_SR_PARAM;
324
325 typedef struct
326 {
327 T_SR_COMMAND command;
328 T_SR_PARAM parameters;
329 }
330 T_SR_TASK;
331
332 typedef struct
333 {
334 UWORD16 time_out;
335 UWORD8 error;
336 UWORD16 *speech_pointer;
337 UWORD16 *end_pointer;
338 API *a_du_x;
339 UWORD16 speech_old_status;
340 BOOL first_pass;
341 }
342 T_L1S_SR_TASK;
343
344 typedef struct
345 {
346 BOOL emergency_stop;
347 }
348 T_L1_SRBACK_COM;
349
350 #endif
351
352 #if (AEC)
353 typedef struct
354 {
355 UWORD16 aec_control;
356 #if (L1_NEW_AEC)
357 UWORD16 cont_filter;
358 UWORD16 granularity_att;
359 UWORD16 coef_smooth;
360 UWORD16 es_level_max;
361 UWORD16 fact_vad;
362 UWORD16 thrs_abs;
363 UWORD16 fact_asd_fil;
364 UWORD16 fact_asd_mut;
365 #endif
366 }
367 T_AEC_PARAM;
368
369 typedef struct
370 {
371 BOOL start;
372 }
373 T_AEC_COMMAND;
374
375 typedef struct
376 {
377 T_AEC_COMMAND command;
378 T_AEC_PARAM parameters;
379 }
380 T_AEC_TASK;
381
382 typedef struct
383 {
384 UWORD16 aec_control;
385 #if (L1_NEW_AEC)
386 BOOL aec_visibility;
387 UWORD16 cont_filter;
388 UWORD16 granularity_att;
389 UWORD16 coef_smooth;
390 UWORD16 es_level_max;
391 UWORD16 fact_vad;
392 UWORD16 thrs_abs;
393 UWORD16 fact_asd_fil;
394 UWORD16 fact_asd_mut;
395 WORD8 visibility_interval;
396 #endif
397 } T_L1S_AEC_TASK;
398 #endif
399
400 #if (FIR)
401 typedef struct
402 {
403 BOOL fir_loop;
404 UWORD8 update_fir;
405 UWORD16 *fir_ul_coefficient;
406 UWORD16 *fir_dl_coefficient;
407 }
408 T_FIR_PARAM;
409
410 typedef struct
411 {
412 BOOL start;
413 }
414 T_FIR_COMMAND;
415
416 typedef struct
417 {
418 T_FIR_COMMAND command;
419 T_FIR_PARAM parameters;
420 }
421 T_FIR_TASK;
422 #endif
423
424 #if (AUDIO_MODE)
425 typedef struct
426 {
427 UWORD16 audio_mode;
428 }
429 T_AUDIO_MODE_PARAM;
430
431 typedef struct
432 {
433 BOOL start;
434 }
435 T_AUDIO_MODE_COMMAND;
436
437 typedef struct
438 {
439 T_AUDIO_MODE_COMMAND command;
440 T_AUDIO_MODE_PARAM parameters;
441 }
442 T_AUDIO_MODE_TASK;
443 #endif
444 #if (MELODY_E2)
445 /***************************************************************************************/
446 /* Melody format E2 l1a_l1s_com structure... */
447 /***************************************************************************************/
448 typedef struct
449 {
450 BOOL start;
451 BOOL stop;
452 }
453 T_MELODY_E2_COMMAND;
454
455 typedef struct
456 {
457 UWORD8 session_id;
458 UWORD8 error_id;
459 UWORD16 buffer_size;
460 UWORD8 *ptr_buf;
461 BOOL loopback;
462 UWORD8 header_size;
463 BOOL emergency_stop;
464 UWORD8 number_of_instrument;
465 UWORD8 waves_table_id[SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT];
466 }
467 T_MELODY_E2_PARAM;
468
469 typedef struct
470 {
471 T_MELODY_E2_COMMAND command;
472 T_MELODY_E2_PARAM parameters;
473 }
474 T_MELODY_E2_TASK;
475
476 /***************************************************************************************/
477 /* Melody format E2 l1s structure... */
478 /***************************************************************************************/
479 typedef struct
480 {
481 UWORD8 error_id;
482 UWORD16 buffer_size;
483 UWORD8 *ptr_buf;
484 UWORD32 counter;
485 UWORD32 note_start_20ms;
486 UWORD16 oscillator_start;
487 UWORD16 oscillator_active;
488 UWORD16 delta_time;
489 BOOL extension_flag;
490 BOOL end_of_file;
491 }
492 T_L1S_MELODY_E2_TASK;
493
494 typedef struct
495 {
496 UWORD32 timebase;
497 UWORD16 global_osc_active;
498 UWORD16 global_osc_to_start;
499 UWORD8 timebase_mod_60ms;
500 BOOL dsp_task;
501 }
502 T_L1S_MELODY_E2_COMMON_VAR;
503
504 /***************************************************************************************/
505 /* Melody format E2 audio background structure... */
506 /***************************************************************************************/
507 typedef struct
508 {
509 API *API_address;
510 UWORD16 allowed_size;
511 UWORD8 number_of_user[SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT];
512 UWORD8 instrument_id[SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT];
513 UWORD16 instrument_size[SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT];
514 } T_AUDIO_BACK_MELODY_E2;
515 #endif // MELODY_E2
516 #if (L1_CPORT == 1)
517 /***************************************************************************************/
518 /* Cport l1a_l1s_com structure... */
519 /***************************************************************************************/
520 typedef struct
521 {
522 BOOL start;
523 }
524 T_CPORT_COMMAND;
525
526 typedef struct
527 {
528 UWORD16 configuration;
529 UWORD16 ctrl;
530 UWORD8 cpcfr1;
531 UWORD8 cpcfr2;
532 UWORD8 cpcfr3;
533 UWORD8 cpcfr4;
534 UWORD8 cptctl;
535 UWORD8 cpttaddr;
536 UWORD16 cptdat;
537 UWORD16 cptvs;
538 }
539 T_CPORT_PARAM;
540
541 typedef struct
542 {
543 T_CPORT_COMMAND command;
544 T_CPORT_PARAM parameters;
545 }
546 T_CPORT_TASK;
547 #endif
548 #endif // AUDIO_TASK