comparison chipsetsw/services/Audio/audio_error_hdlr.c @ 0:509db1a7b7b8

initial import: leo2moko-r1
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 01 Jun 2015 03:24:05 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:509db1a7b7b8
1 /****************************************************************************/
2 /* */
3 /* File Name: audio_error_hdlr.c */
4 /* */
5 /* Purpose: This file contains routines used to report unrecoverable */
6 /* memory errors that might occur. */
7 /* */
8 /* Version 0.1 */
9 /* */
10 /* Date Modification */
11 /* ------------------------------------------------------------------------*/
12 /* 14 May 2001 Create */
13 /* */
14 /* Author Francois Mazard - Stephanie Gerthoux */
15 /* */
16 /* (C) Copyright 2001 by Texas Instruments Incorporated, All Rights Reserved*/
17 /****************************************************************************/
18
19 #include "rv/rv_defined_swe.h"
20 #ifdef RVM_AUDIO_MAIN_SWE
21 #ifndef _WINDOWS
22 #include "config/swconfig.cfg"
23 #include "config/sys.cfg"
24 #include "config/chipset.cfg"
25 #endif
26
27 #include "l1_confg.h"
28 #include "rv/rv_general.h"
29 #include "rvf/rvf_api.h"
30 #include "audio/audio_features_i.h"
31 #include "audio/audio_api.h"
32 #include "audio/audio_error_hdlr_i.h"
33 #include "audio/audio_macro_i.h"
34
35 /********************************************************************************/
36 /* */
37 /* Function Name: audio_error_trace */
38 /* */
39 /* Purpose: This function is used to report error occured during the */
40 /* audio entity execution */
41 /* */
42 /* Input Parameters: */
43 /* status - Contains the error code to be reported. */
44 /* */
45 /* Output Parameters: */
46 /* None. */
47 /* */
48 /* Global Parameters: */
49 /* None. */
50 /* */
51 /* Note: */
52 /* None. */
53 /* */
54 /* Revision History: */
55 /* 14 May 01 Create */
56 /* */
57 /********************************************************************************/
58 void audio_error_trace(UINT8 error_id)
59 {
60 switch(error_id)
61 {
62 case AUDIO_ENTITY_NOT_START:
63 {
64 AUDIO_SEND_TRACE("AUDIO entity not started.",RV_TRACE_LEVEL_ERROR);
65 break;
66 }
67
68 case AUDIO_ENTITY_NO_MEMORY:
69 {
70 AUDIO_SEND_TRACE("AUDIO entity has not enough memory",RV_TRACE_LEVEL_ERROR);
71 break;
72 }
73
74 case AUDIO_ENTITY_BAD_PARAMETER:
75 {
76 AUDIO_SEND_TRACE("AUDIO entity has bad parameters",RV_TRACE_LEVEL_ERROR);
77 break;
78 }
79
80 case AUDIO_ERROR_STOP_EVENT:
81 {
82 AUDIO_SEND_TRACE("AUDIO entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
83 break;
84 }
85
86 case AUDIO_ERROR_START_EVENT:
87 {
88 AUDIO_SEND_TRACE("AUDIO entity has received a start error event",RV_TRACE_LEVEL_ERROR);
89 break;
90 }
91
92 case AUDIO_ENTITY_BAD_MESSAGE:
93 {
94 AUDIO_SEND_TRACE("AUDIO entity has received a bad message",RV_TRACE_LEVEL_ERROR);
95 break;
96 }
97 }
98 }
99 /*********************** End of audio_error_trace function **********************/
100
101 #if (KEYBEEP)
102 /********************************************************************************/
103 /* */
104 /* Function Name: audio_keybeep_error_trace */
105 /* */
106 /* Purpose: This function is used to report error occured during the */
107 /* audio entity execution */
108 /* */
109 /* Input Parameters: */
110 /* status - Contains the error code to be reported. */
111 /* */
112 /* Output Parameters: */
113 /* None. */
114 /* */
115 /* Global Parameters: */
116 /* None. */
117 /* */
118 /* Note: */
119 /* None. */
120 /* */
121 /* Revision History: */
122 /* 14 May 01 Create */
123 /* */
124 /********************************************************************************/
125 void audio_keybeep_error_trace(UINT8 error_id)
126 {
127 switch(error_id)
128 {
129 case AUDIO_ENTITY_NOT_START:
130 {
131 AUDIO_SEND_TRACE("AUDIO Keybeep entity not started.",RV_TRACE_LEVEL_ERROR);
132 break;
133 }
134
135 case AUDIO_ENTITY_NO_MEMORY:
136 {
137 AUDIO_SEND_TRACE("AUDIO Keybeep entity has not enough memory",RV_TRACE_LEVEL_ERROR);
138 break;
139 }
140
141 case AUDIO_ENTITY_BAD_PARAMETER:
142 {
143 AUDIO_SEND_TRACE("AUDIO Keybeep entity has bad parameters",RV_TRACE_LEVEL_ERROR);
144 break;
145 }
146
147 case AUDIO_ERROR_STOP_EVENT:
148 {
149 AUDIO_SEND_TRACE("AUDIO Keybeep entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
150 break;
151 }
152
153 case AUDIO_ERROR_START_EVENT:
154 {
155 AUDIO_SEND_TRACE("AUDIO Keybeep entity has received a start error event",RV_TRACE_LEVEL_ERROR);
156 break;
157 }
158 }
159 }
160 #endif /* #if (KEYBEEP) */
161 /*********************** End of audio_keybeep_error_trace function **********************/
162
163 #if (TONE)
164 /********************************************************************************/
165 /* */
166 /* Function Name: audio_tones_error_trace */
167 /* */
168 /* Purpose: This function is used to report error occured during the */
169 /* audio entity execution */
170 /* */
171 /* Input Parameters: */
172 /* status - Contains the error code to be reported. */
173 /* */
174 /* Output Parameters: */
175 /* None. */
176 /* */
177 /* Global Parameters: */
178 /* None. */
179 /* */
180 /* Note: */
181 /* None. */
182 /* */
183 /* Revision History: */
184 /* 14 May 01 Create */
185 /* */
186 /********************************************************************************/
187 void audio_tones_error_trace(UINT8 error_id)
188 {
189 switch(error_id)
190 {
191 case AUDIO_ENTITY_NOT_START:
192 {
193 AUDIO_SEND_TRACE("AUDIO Tones entity not started.",RV_TRACE_LEVEL_ERROR);
194 break;
195 }
196
197 case AUDIO_ENTITY_NO_MEMORY:
198 {
199 AUDIO_SEND_TRACE("AUDIO Tones entity has not enough memory",RV_TRACE_LEVEL_ERROR);
200 break;
201 }
202
203 case AUDIO_ENTITY_BAD_PARAMETER:
204 {
205 AUDIO_SEND_TRACE("AUDIO Tones entity has bad parameters",RV_TRACE_LEVEL_ERROR);
206 break;
207 }
208
209 case AUDIO_ERROR_STOP_EVENT:
210 {
211 AUDIO_SEND_TRACE("AUDIO Tones entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
212 break;
213 }
214
215 case AUDIO_ERROR_START_EVENT:
216 {
217 AUDIO_SEND_TRACE("AUDIO Tones entity has received a start error event",RV_TRACE_LEVEL_ERROR);
218 break;
219 }
220 }
221 }
222 #endif /* tone */
223 /*********************** End of audio_tones_error_trace function **********************/
224
225 #if (MELODY_E1)
226 /********************************************************************************/
227 /* */
228 /* Function Name: audio_melody_E1_error_trace */
229 /* */
230 /* Purpose: This function is used to report error occured during the */
231 /* audio entity execution */
232 /* */
233 /* Input Parameters: */
234 /* status - Contains the error code to be reported. */
235 /* */
236 /* Output Parameters: */
237 /* None. */
238 /* */
239 /* Global Parameters: */
240 /* None. */
241 /* */
242 /* Note: */
243 /* None. */
244 /* */
245 /* Revision History: */
246 /* 14 May 01 Create */
247 /* */
248 /********************************************************************************/
249 void audio_melody_E1_error_trace(UINT8 error_id)
250 {
251 switch(error_id)
252 {
253 case AUDIO_ENTITY_NOT_START:
254 {
255 AUDIO_SEND_TRACE("AUDIO Melody E1 entity not started.",RV_TRACE_LEVEL_ERROR);
256 break;
257 }
258
259 case AUDIO_ENTITY_NO_MEMORY:
260 {
261 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has not enough memory",RV_TRACE_LEVEL_ERROR);
262 break;
263 }
264
265 case AUDIO_ENTITY_BAD_PARAMETER:
266 {
267 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has bad parameters",RV_TRACE_LEVEL_ERROR);
268 break;
269 }
270
271 case AUDIO_ERROR_STOP_EVENT:
272 {
273 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
274 break;
275 }
276
277 case AUDIO_ERROR_START_EVENT:
278 {
279 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has received a start error event",RV_TRACE_LEVEL_ERROR);
280 break;
281 }
282
283 case AUDIO_ERROR_MODE:
284 {
285 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has received a start with a wrong mode",RV_TRACE_LEVEL_ERROR);
286 break;
287 }
288
289 case AUDIO_ENTITY_FILE_ERROR:
290 {
291 AUDIO_SEND_TRACE("AUDIO Melody E1 entity has received wrong file name",RV_TRACE_LEVEL_ERROR);
292 break;
293 }
294
295 case AUDIO_ENTITY_FILE_NO_CLOSE:
296 {
297 AUDIO_SEND_TRACE("AUDIO Melody E1 entity can't close a FFS file ",RV_TRACE_LEVEL_ERROR);
298 break;
299 }
300 }
301 }
302 #endif /* #if (Melody E1) */
303
304 #if (MELODY_E2)
305 /********************************************************************************/
306 /* */
307 /* Function Name: audio_melody_E2_error_trace */
308 /* */
309 /* Purpose: This function is used to report error occured during the */
310 /* audio entity execution */
311 /* */
312 /* Input Parameters: */
313 /* status - Contains the error code to be reported. */
314 /* */
315 /* Output Parameters: */
316 /* None. */
317 /* */
318 /* Global Parameters: */
319 /* None. */
320 /* */
321 /* Note: */
322 /* None. */
323 /* */
324 /* Revision History: */
325 /* 7 December 01 Create */
326 /* */
327 /********************************************************************************/
328 void audio_melody_E2_error_trace(UINT8 error_id)
329 {
330 switch(error_id)
331 {
332 case AUDIO_ENTITY_NOT_START:
333 {
334 AUDIO_SEND_TRACE("AUDIO Melody E2 entity not started.",RV_TRACE_LEVEL_ERROR);
335 break;
336 }
337
338 case AUDIO_ENTITY_NO_MEMORY:
339 {
340 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has not enough memory",RV_TRACE_LEVEL_ERROR);
341 break;
342 }
343
344 case AUDIO_ENTITY_BAD_PARAMETER:
345 {
346 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has bad parameters",RV_TRACE_LEVEL_ERROR);
347 break;
348 }
349
350 case AUDIO_ERROR_STOP_EVENT:
351 {
352 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
353 break;
354 }
355
356 case AUDIO_ERROR_START_EVENT:
357 {
358 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received a start error event",RV_TRACE_LEVEL_ERROR);
359 break;
360 }
361
362 case AUDIO_ERROR_MODE:
363 {
364 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received a start with a wrong mode",RV_TRACE_LEVEL_ERROR);
365 break;
366 }
367
368 case AUDIO_ERROR_DOWNLOAD:
369 {
370 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received a download error event",RV_TRACE_LEVEL_ERROR);
371 break;
372 }
373
374 case AUDIO_ERROR_NOT_DOWNLOAD:
375 {
376 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has not download the instrument file",RV_TRACE_LEVEL_ERROR);
377 break;
378 }
379
380 case AUDIO_ENTITY_FILE_ERROR:
381 {
382 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received wrong file name",RV_TRACE_LEVEL_ERROR);
383 break;
384 }
385
386 case AUDIO_ENTITY_FILE_NO_CLOSE:
387 {
388 AUDIO_SEND_TRACE("AUDIO Melody E2 entity can't close a FFS file ",RV_TRACE_LEVEL_ERROR);
389 break;
390 }
391
392 case AUDIO_ENTITY_LOAD_FILE_INSTR_ERROR:
393 {
394 AUDIO_SEND_TRACE("AUDIO Melody E2 entity has received wrong file name to load instruments",RV_TRACE_LEVEL_ERROR);
395 break;
396 }
397 case AUDIO_ERROR_INSTRUMENT_SIZE:
398 {
399 AUDIO_SEND_TRACE("AUDIO Melody E2 not enough memory for the instrument of this melody",RV_TRACE_LEVEL_ERROR);
400 break;
401 }
402 }
403 }
404 #endif /* #if (Melody E2) */
405
406 #if (VOICE_MEMO)
407 /********************************************************************************/
408 /* */
409 /* Function Name: audio_voice_memo_error_trace */
410 /* */
411 /* Purpose: This function is used to report error occured during the */
412 /* audio entity execution */
413 /* */
414 /* Input Parameters: */
415 /* status - Contains the error code to be reported. */
416 /* */
417 /* Output Parameters: */
418 /* None. */
419 /* */
420 /* Global Parameters: */
421 /* None. */
422 /* */
423 /* Note: */
424 /* None. */
425 /* */
426 /* Revision History: */
427 /* 14 May 01 Create */
428 /* */
429 /********************************************************************************/
430 void audio_voice_memo_error_trace(UINT8 error_id)
431 {
432 switch(error_id)
433 {
434 case AUDIO_ENTITY_NOT_START:
435 {
436 AUDIO_SEND_TRACE("AUDIO Voice Memo entity not started.",RV_TRACE_LEVEL_ERROR);
437 break;
438 }
439
440 case AUDIO_ENTITY_NO_MEMORY:
441 {
442 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has not enough memory",RV_TRACE_LEVEL_ERROR);
443 break;
444 }
445
446 case AUDIO_ENTITY_BAD_PARAMETER:
447 {
448 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has bad parameters",RV_TRACE_LEVEL_ERROR);
449 break;
450 }
451
452 case AUDIO_ERROR_STOP_EVENT:
453 {
454 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
455 break;
456 }
457
458 case AUDIO_ERROR_START_EVENT:
459 {
460 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has received a start error event",RV_TRACE_LEVEL_ERROR);
461 break;
462 }
463
464 case AUDIO_ERROR_MODE:
465 {
466 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has received a start with a wrong mode",RV_TRACE_LEVEL_ERROR);
467 break;
468 }
469
470 case AUDIO_ENTITY_FILE_ERROR:
471 {
472 AUDIO_SEND_TRACE("AUDIO Voice Memo entity has received wrong file name",RV_TRACE_LEVEL_ERROR);
473 break;
474 }
475
476 case AUDIO_ENTITY_FILE_NO_CLOSE:
477 {
478 AUDIO_SEND_TRACE("AUDIO Voice Memo entity can't close a FFS file",RV_TRACE_LEVEL_ERROR);
479 break;
480 }
481 }
482 }
483 #endif /* #if (Voice Memo) */
484
485 #if (L1_VOICE_MEMO_AMR)
486 /********************************************************************************/
487 /* */
488 /* Function Name: audio_voice_memo_amr_error_trace */
489 /* */
490 /* Purpose: This function is used to report error occured during the */
491 /* audio entity execution */
492 /* */
493 /* Input Parameters: */
494 /* status - Contains the error code to be reported. */
495 /* */
496 /* Output Parameters: */
497 /* None. */
498 /* */
499 /* Global Parameters: */
500 /* None. */
501 /* */
502 /* Note: */
503 /* None. */
504 /* */
505 /* Revision History: */
506 /* 14 May 01 Create */
507 /* */
508 /********************************************************************************/
509 void audio_voice_memo_amr_error_trace(UINT8 error_id)
510 {
511 switch(error_id)
512 {
513 case AUDIO_ENTITY_NOT_START:
514 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR not started.",RV_TRACE_LEVEL_ERROR);
515 break;
516 case AUDIO_ENTITY_NO_MEMORY:
517 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has not enough memory",RV_TRACE_LEVEL_ERROR);
518 break;
519 case AUDIO_ENTITY_BAD_PARAMETER:
520 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has bad parameters",RV_TRACE_LEVEL_ERROR);
521 break;
522 case AUDIO_ERROR_STOP_EVENT:
523 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
524 break;
525 case AUDIO_ERROR_START_EVENT:
526 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has received a start error event",RV_TRACE_LEVEL_ERROR);
527 break;
528 case AUDIO_ERROR_MODE:
529 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has received a start with a wrong mode",RV_TRACE_LEVEL_ERROR);
530 break;
531 case AUDIO_ENTITY_FILE_ERROR:
532 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity has received wrong file name",RV_TRACE_LEVEL_ERROR);
533 break;
534 case AUDIO_ENTITY_FILE_NO_CLOSE:
535 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity can't close a FFS file",RV_TRACE_LEVEL_ERROR);
536 break;
537 case AUDIO_FEATURE_NOT_COMPILED:
538 AUDIO_SEND_TRACE("AUDIO Voice Memo AMR entity: feature not compiled",RV_TRACE_LEVEL_ERROR);
539 break;
540 default:
541 AUDIO_SEND_TRACE_PARAM("AUDIO Voice Memo AMR entity: unknown error", error_id, RV_TRACE_LEVEL_ERROR);
542 break;
543 }
544 }
545 #endif /* #if (Voice Memo AMR) */
546
547 #if (MELODY_E1) || (VOICE_MEMO) || (SPEECH_RECO)
548 /********************************************************************************/
549 /* */
550 /* Function Name: audio_ffs_error_trace */
551 /* */
552 /* Purpose: This function is used to report error occured during the */
553 /* audio entity execution */
554 /* */
555 /* Input Parameters: */
556 /* status - Contains the error code to be reported. */
557 /* */
558 /* Output Parameters: */
559 /* None. */
560 /* */
561 /* Global Parameters: */
562 /* None. */
563 /* */
564 /* Note: */
565 /* None. */
566 /* */
567 /* Revision History: */
568 /* 25 May 01 Create */
569 /* */
570 /********************************************************************************/
571 void audio_ffs_error_trace(UINT8 error_id)
572 {
573 switch(error_id)
574 {
575 case AUDIO_ENTITY_NO_MEMORY:
576 AUDIO_SEND_TRACE("AUDIO FFS entity has not enough memory",RV_TRACE_LEVEL_ERROR);
577 break;
578 case AUDIO_ENTITY_FILE_NO_SAVED:
579 AUDIO_SEND_TRACE("AUDIO FFS entity can't saved the file in flash",RV_TRACE_LEVEL_ERROR);
580 break;
581 case AUDIO_ENTITY_FILE_NO_CLOSE:
582 AUDIO_SEND_TRACE("AUDIO FFS entity can't close the file",RV_TRACE_LEVEL_ERROR);
583 break;
584 }
585 }
586 #endif /* #if (MELODY_E1) || (VOICE_MEMO) */
587
588 #if (AUDIO_NEW_FFS_MANAGER)
589 void audio_new_ffs_error_trace(UINT8 error_id)
590 {
591 switch(error_id)
592 {
593 case AUDIO_ENTITY_NO_MEMORY:
594 AUDIO_SEND_TRACE("AUDIO FFS entity has not enough memory",RV_TRACE_LEVEL_ERROR);
595 break;
596 case AUDIO_ENTITY_FILE_NO_SAVED:
597 AUDIO_SEND_TRACE("AUDIO FFS entity can't save the file in flash",RV_TRACE_LEVEL_ERROR);
598 break;
599 case AUDIO_ENTITY_FILE_NO_CLOSE:
600 AUDIO_SEND_TRACE("AUDIO FFS entity can't close the file",RV_TRACE_LEVEL_ERROR);
601 break;
602 }
603 }
604 #endif
605
606 #if (AUDIO_RAM_MANAGER)
607 void audio_ram_error_trace(UINT8 error_id)
608 {
609 switch(error_id)
610 {
611 case AUDIO_ENTITY_NO_MEMORY:
612 AUDIO_SEND_TRACE("AUDIO RAM entity has not enough memory",RV_TRACE_LEVEL_ERROR);
613 break;
614 case AUDIO_ENTITY_FILE_NO_SAVED:
615 AUDIO_SEND_TRACE("AUDIO RAM entity can't save the file in flash",RV_TRACE_LEVEL_ERROR);
616 break;
617 case AUDIO_ENTITY_FILE_NO_CLOSE:
618 AUDIO_SEND_TRACE("AUDIO RAM entity can't close the file",RV_TRACE_LEVEL_ERROR);
619 break;
620 }
621 }
622 #endif
623
624 #if (AUDIO_MEM_MANAGER)
625 void audio_mem_error_trace(UINT8 error_id)
626 {
627 switch(error_id)
628 {
629 case AUDIO_ENTITY_NO_MEMORY:
630 AUDIO_SEND_TRACE("AUDIO MEM entity has not enough memory",RV_TRACE_LEVEL_ERROR);
631 break;
632 case AUDIO_ENTITY_FILE_NO_SAVED:
633 AUDIO_SEND_TRACE("AUDIO MEM entity can't save the file in flash",RV_TRACE_LEVEL_ERROR);
634 break;
635 case AUDIO_ENTITY_FILE_NO_CLOSE:
636 AUDIO_SEND_TRACE("AUDIO MEM entity can't close the file",RV_TRACE_LEVEL_ERROR);
637 break;
638 }
639 }
640 #endif
641
642 #if (SPEECH_RECO)
643 /********************************************************************************/
644 /* */
645 /* Function Name: audio_sr_error_trace */
646 /* */
647 /* Purpose: This function is used to report error occured during the */
648 /* audio entity execution */
649 /* */
650 /* Input Parameters: */
651 /* status - Contains the error code to be reported. */
652 /* */
653 /* Output Parameters: */
654 /* None. */
655 /* */
656 /* Global Parameters: */
657 /* None. */
658 /* */
659 /* Note: */
660 /* None. */
661 /* */
662 /* Revision History: */
663 /* 25 May 01 Create */
664 /* */
665 /********************************************************************************/
666 void audio_sr_error_trace(UINT8 error_id)
667 {
668 switch(error_id)
669 {
670 case AUDIO_ENTITY_NOT_START:
671 {
672 AUDIO_SEND_TRACE("AUDIO Speech reco entity not started.",RV_TRACE_LEVEL_ERROR);
673 break;
674 }
675
676 case AUDIO_ENTITY_FILE_ALREADY_EXIST:
677 {
678 AUDIO_SEND_TRACE("AUDIO Speech reco file already exists.",RV_TRACE_LEVEL_ERROR);
679 break;
680 }
681
682 case AUDIO_ENTITY_NO_MEMORY:
683 {
684 AUDIO_SEND_TRACE("AUDIO Speech reco entity has not enough memory",RV_TRACE_LEVEL_ERROR);
685 break;
686 }
687
688 case AUDIO_ERROR_STOP_EVENT:
689 {
690 AUDIO_SEND_TRACE("AUDIO Speech reco entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
691 break;
692 }
693
694 case AUDIO_ERROR_START_EVENT:
695 {
696 AUDIO_SEND_TRACE("AUDIO Speech reco entity has received a start error event",RV_TRACE_LEVEL_ERROR);
697 break;
698 }
699
700 case AUDIO_ENTITY_SPEECH_NO_SAVED:
701 {
702 AUDIO_SEND_TRACE("AUDIO Speech reco entity can't save the speech sample",RV_TRACE_LEVEL_ERROR);
703 break;
704 }
705
706 case AUDIO_ENTITY_MODEL_NO_SAVED:
707 {
708 AUDIO_SEND_TRACE("AUDIO Speech reco entity can't save the model sample",RV_TRACE_LEVEL_ERROR);
709 break;
710 }
711
712 case AUDIO_ENTITY_BAD_PARAMETER:
713 {
714 AUDIO_SEND_TRACE("AUDIO Speech reco entity has bad parameters",RV_TRACE_LEVEL_ERROR);
715 break;
716 }
717
718 case AUDIO_ENTITY_BAD_DATABASE:
719 {
720 AUDIO_SEND_TRACE("AUDIO Speech reco entity has bad database",RV_TRACE_LEVEL_ERROR);
721 break;
722 }
723
724 case AUDIO_ENTITY_MODEL_NO_LOAD:
725 {
726 AUDIO_SEND_TRACE("AUDIO Speech reco entity model isn't loaded",RV_TRACE_LEVEL_ERROR);
727 break;
728 }
729
730 }
731 }
732 #endif /* #if (SPEECH_RECO) */
733
734 /********************************************************************************/
735 /* */
736 /* Function Name: audio_mode_error_trace */
737 /* */
738 /* Purpose: This function is used to report error occured during the */
739 /* audio entity execution */
740 /* */
741 /* Input Parameters: */
742 /* status - Contains the error code to be reported. */
743 /* */
744 /* Output Parameters: */
745 /* None. */
746 /* */
747 /* Global Parameters: */
748 /* None. */
749 /* */
750 /* Note: */
751 /* None. */
752 /* */
753 /* Revision History: */
754 /* 25 May 01 Create */
755 /* */
756 /********************************************************************************/
757 void audio_mode_error_trace(UINT8 error_id)
758 {
759 switch(error_id)
760 {
761 case AUDIO_ENTITY_NOT_START:
762 {
763 AUDIO_SEND_TRACE("AUDIO Mode entity not started.",RV_TRACE_LEVEL_ERROR);
764 break;
765 }
766
767 case AUDIO_ENTITY_NO_MEMORY:
768 {
769 AUDIO_SEND_TRACE("AUDIO Mode entity has not enough memory",RV_TRACE_LEVEL_ERROR);
770 break;
771 }
772
773 case AUDIO_ENTITY_BAD_PARAMETER:
774 {
775 AUDIO_SEND_TRACE("AUDIO Mode entity has bad parameters",RV_TRACE_LEVEL_ERROR);
776 break;
777 }
778
779 case AUDIO_ENTITY_AUDIO_MODE_NO_LOADED:
780 {
781 AUDIO_SEND_TRACE("AUDIO Mode entity: no audio mode was loaded",RV_TRACE_LEVEL_ERROR);
782 break;
783 }
784
785 }
786 }
787
788 #if (L1_AUDIO_DRIVER)
789 void audio_driver_error_trace(UINT8 error_id)
790 {
791 switch(error_id)
792 {
793 case AUDIO_ENTITY_NOT_START:
794 AUDIO_SEND_TRACE("AUDIO DRIVER entity not started.",RV_TRACE_LEVEL_ERROR);
795 break;
796 case AUDIO_ENTITY_NO_MEMORY:
797 AUDIO_SEND_TRACE("AUDIO DRIVER entity: not enough memory",RV_TRACE_LEVEL_ERROR);
798 break;
799 case AUDIO_ENTITY_BAD_PARAMETER:
800 AUDIO_SEND_TRACE("AUDIO DRIVER entity: bad parameters",RV_TRACE_LEVEL_ERROR);
801 break;
802 case AUDIO_ERROR_STOP_EVENT:
803 AUDIO_SEND_TRACE("AUDIO DRIVER entity: stop error event",RV_TRACE_LEVEL_ERROR);
804 break;
805 case AUDIO_ERROR_L1_STOP_EVENT:
806 AUDIO_SEND_TRACE("AUDIO DRIVER entity: stop error event in Layer1",RV_TRACE_LEVEL_ERROR);
807 break;
808 case AUDIO_ERROR_START_EVENT:
809 AUDIO_SEND_TRACE("AUDIO DRIVER entity: start error event",RV_TRACE_LEVEL_ERROR);
810 break;
811 case AUDIO_ERROR_L1_START_EVENT:
812 AUDIO_SEND_TRACE("AUDIO DRIVER entity: start error event in Layer1",RV_TRACE_LEVEL_ERROR);
813 break;
814 case AUDIO_ERROR_MODE:
815 AUDIO_SEND_TRACE("AUDIO DRIVER entity: start with a wrong mode",RV_TRACE_LEVEL_ERROR);
816 break;
817 case AUDIO_FEATURE_NOT_COMPILED:
818 AUDIO_SEND_TRACE("AUDIO DRIVER entity has not been compiled",RV_TRACE_LEVEL_ERROR);
819 break;
820 default:
821 AUDIO_SEND_TRACE_PARAM("AUDIO DRIVER entity: unknow error", error_id, RV_TRACE_LEVEL_ERROR);
822 break;
823 }
824 }
825 #endif
826
827 #if (L1_MIDI==1)
828 /********************************************************************************/
829 /* */
830 /* Function Name: audio_midi_error_trace */
831 /* */
832 /* Purpose: This function is used to report error occured during the */
833 /* audio entity execution */
834 /* */
835 /* Input Parameters: */
836 /* status - Contains the error code to be reported. */
837 /* */
838 /* Output Parameters: */
839 /* None. */
840 /* */
841 /* Global Parameters: */
842 /* None. */
843 /* */
844 /* Note: */
845 /* None. */
846 /* */
847 /* Revision History: */
848 /* 14 May 01 Create */
849 /* */
850 /********************************************************************************/
851 void audio_midi_error_trace(UINT8 error_id)
852 {
853 switch(error_id)
854 {
855 case AUDIO_ENTITY_NOT_START:
856 AUDIO_SEND_TRACE("AUDIO MIDI not started.",RV_TRACE_LEVEL_ERROR);
857 break;
858 case AUDIO_ENTITY_NO_MEMORY:
859 AUDIO_SEND_TRACE("AUDIO MIDI entity has not enough memory",RV_TRACE_LEVEL_ERROR);
860 break;
861 case AUDIO_ENTITY_BAD_PARAMETER:
862 AUDIO_SEND_TRACE("AUDIO MIDI entity has bad parameters",RV_TRACE_LEVEL_ERROR);
863 break;
864 case AUDIO_ERROR_STOP_EVENT:
865 AUDIO_SEND_TRACE("AUDIO MIDI entity has received a stop error event",RV_TRACE_LEVEL_ERROR);
866 break;
867 case AUDIO_ERROR_START_EVENT:
868 AUDIO_SEND_TRACE("AUDIO MIDI entity has received a start error event",RV_TRACE_LEVEL_ERROR);
869 break;
870 case AUDIO_ERROR_MODE:
871 AUDIO_SEND_TRACE("AUDIO MIDI entity has received a start with a wrong mode",RV_TRACE_LEVEL_ERROR);
872 break;
873 case AUDIO_ENTITY_FILE_ERROR:
874 AUDIO_SEND_TRACE("AUDIO MIDI entity has received wrong file name",RV_TRACE_LEVEL_ERROR);
875 break;
876 case AUDIO_ENTITY_FILE_NO_CLOSE:
877 AUDIO_SEND_TRACE("AUDIO MIDI entity can't close a FFS file",RV_TRACE_LEVEL_ERROR);
878 break;
879 case AUDIO_FEATURE_NOT_COMPILED:
880 AUDIO_SEND_TRACE("AUDIO MIDI entity: feature not compiled",RV_TRACE_LEVEL_ERROR);
881 break;
882 default:
883 AUDIO_SEND_TRACE_PARAM("AUDIO MIDI entity: unknown error", error_id, RV_TRACE_LEVEL_ERROR);
884 break;
885 }
886 }
887 #endif // #if (L1_MIDI==1)
888
889 #endif /* #ifdef RVM_AUDIO_SWE */