FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/L1/audio_cfile/l1audio_func.c @ 1017:759b3cbf46aa
doc/TCH-special-feature: document written
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 21 Mar 2016 06:05:57 +0000 |
parents | 262fcce10859 |
children |
rev | line source |
---|---|
606
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /************* Revision Controle System Header ************* |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * GSM Layer 1 software |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * L1AUDIO_FUNC.C |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 * Filename l1audio_func.c |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 * Copyright 2003 (C) Texas Instruments |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 * |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 ************* Revision Controle System Header *************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 /* Include files... */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 /************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 #include "nucleus.h" //omaps00090550 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #include "l1_macro.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 #include "l1_macro.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #include "l1_confg.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 //#include "l1audio_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 #if (AUDIO_TASK == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 #include "l1_types.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 #include "sys_types.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #if (CODE_VERSION == SIMULATION) && (AUDIO_SIMULATION) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #include <stdlib.h> |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 #include <string.h> |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 #include "iq.h" // Debug / Init hardware ("eva3.lib") |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #include "l1_ver.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 #include "l1_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 #include "l1_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #if TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 #include "l1tm_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #include "l1audio_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 #include "l1audio_cust.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 #include "l1audio_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 #include "l1audio_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 #include "l1audio_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #include "l1audio_abb.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 #include "l1audio_btapi.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 #if (L1_GTT == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #include "l1gtt_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 #include "l1gtt_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 //added here from e-sample for AAC |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #if (L1_DYN_DSP_DWNLD == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 #include "l1_dyn_dwl_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 #include "l1_dyn_dwl_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 #if (L1_MP3 == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 #include "l1mp3_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 #if (L1_MIDI == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 #include "l1midi_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 //added here from e-sample for AAC |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #if (L1_AAC == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 #include "l1aac_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 #include "l1_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 #include "cust_os.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 #include "l1_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 #include "l1_varex.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 #include "l1_mftab.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 #include "l1_tabs.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 #include "l1_ctl.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 #include "l1_time.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 #include "l1_scen.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 #if TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 #include "l1tm_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 #include "l1tm_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 #include "l1tm_varex.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 #endif // TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 #if (L1_STEREOPATH == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 #include "sys_dma.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 #include "sys_inth.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 #include "abb.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 #include "l1audio_stereo.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 #else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 // Layer1 and debug include files. |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 #include <ctype.h> |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 #include <math.h> |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 #include "l1_ver.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 #include "l1_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 #include "l1_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 #if TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 #include "l1tm_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 #include "l1audio_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 #include "l1audio_cust.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 #include "l1audio_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 #include "l1audio_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 #include "l1audio_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 #include "l1audio_abb.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 #if (L1_GTT == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 #include "l1gtt_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 #include "l1gtt_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 //added here from e-sample for AAC |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 #if (L1_DYN_DSP_DWNLD == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 #include "l1_dyn_dwl_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 #include "l1_dyn_dwl_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 #if (L1_MP3 == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 #include "l1mp3_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 #include"l1mp3_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 #if (L1_MIDI == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 #include "l1midi_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 //added here from e-sample for AAC |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 #if (L1_AAC == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 #include "l1aac_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 #include"l1aac_const.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 #include "l1_defty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 #include "cust_os.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 #include "l1_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 #include "tpudrv.h" // TPU drivers. ("eva3.lib") |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 #include "l1_varex.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 #include "l1_proto.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 #include "l1_mftab.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 #include "l1_tabs.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 #include "mem.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 #include "armio.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 #include "timer.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 #include "timer1.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 #include "dma.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 #include "inth.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 #include "ulpd.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 #include "rhea_arm.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 #include "clkm.h" // Clockm ("eva3.lib") |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 #include "l1_ctl.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 #if TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 #include "l1tm_msgty.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 #include "l1tm_signa.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 #include "l1tm_varex.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 #endif // TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 #if (L1_STEREOPATH == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 #include "sys_dma.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 #include "sys_inth.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 #include "abb.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 #include "l1audio_stereo.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 #include "l1_time.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 #if L2_L3_SIMUL |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 #include "l1_scen.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 #if (OP_RIV_AUDIO == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 #include "rv_general.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 #include "audio_api.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 #include "audio_structs_i.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 #include "audio_var_i.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 #include "audio_macro_i.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 #include "audio_const_i.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 #include "l1audio_macro.h" |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 /**************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 /* Prototypes for L1S audio function */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 /**************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 UWORD8 copy_data_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD16 **ptr_buf, UWORD16 data_size, API *ptr_dst); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 UWORD8 copy_data_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD16 **ptr_buf, UWORD16 data_size, API *ptr_src); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 #if (MELODY_E2) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 UWORD16 audio_twentyms_to_TDMA_convertion(UWORD16 twentyms_value); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 #if (MELODY_E2) || (L1_VOICE_MEMO_AMR) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 UWORD8 copy_byte_data_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, UWORD8 *ptr_dst); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 UWORD8 copy_byte_data_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, UWORD8 *ptr_src); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 #if (L1_VOICE_MEMO_AMR) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 UWORD8 copy_byte_data_le_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, API *ptr_dst); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 UWORD8 copy_byte_data_le_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, API *ptr_src); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 #if (L1_EXT_AUDIO_MGT == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 void l1_ext_audio_mgt_dma_handler(SYS_UWORD16 dma_status); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 #if (L1_IIR == 2) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 void l1_audio_iir4x_copy_params(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 #if (L1_AGC_UL== 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 void l1_audio_agc_ul_copy_params(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 #if (L1_AGC_DL== 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 void l1_audio_agc_dl_copy_params(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 #if (L1_DRC == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 void l1_audio_drc1x_copy_params(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
220 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
221 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
222 #if(L1_BT_AUDIO ==1)||(L1_WCM ==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
223 void l1_audio_manager(UWORD8 *src, UWORD16 size); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
224 void l1_audio_bt_init(UINT16 media_buf_size); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
225 extern void l1mp3_dma_it_handler(SYS_UWORD16 d_dma_channel_it_status); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
226 extern void l1aac_dma_it_handler(SYS_UWORD16 d_dma_channel_it_status); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
227 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
228 #if(L1_BT_AUDIO ==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
229 T_L1_BT_AUDIO bt_audio; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
230 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
231 extern T_MP3_DMA_PARAM *mp3_dma; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
232 extern T_AAC_DMA_PARAM *aac_dma; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
233 extern void l1a_bt_audio_noti_process(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
234 extern UWORD16 pending_dec_req; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
235 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
236 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
237 /**************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
238 /* External prototypes */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
239 /**************************************/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
240 extern UWORD8 Cust_get_pointer (UWORD16 **ptr, UWORD16 *buffer_size, UWORD8 session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
241 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
242 #if ((L1_STEREOPATH == 1) && (OP_L1_STANDALONE == 1)) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
243 extern void l1tm_stereopath_DMA_handler(SYS_UWORD16 dma_status); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
244 #if TESTMODE |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
245 extern T_STP_DRV_MCU_DSP *stp_drv_ndb; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
246 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
247 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
248 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
249 #if (L1_EXT_AUDIO_MGT == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
250 extern NU_HISR EXT_AUDIO_MGT_hisr; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
251 extern T_MIDI_DMA_PARAM midi_buf; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
252 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
253 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
254 #if (L1_DRC == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
255 extern T_DRC_MCU_DSP *drc_ndb; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
256 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
257 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
258 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
259 /* copy_data_from_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
260 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
261 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
262 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
263 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
264 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
265 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
266 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
267 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
268 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
269 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
270 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
271 /* This function copies the data from the buffer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
272 /* (buffer size: buffer_size, start address: ptr_buf) to */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
273 /* the destination indicated by ptr_dst. The size of the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
274 /* data to download is data_size. The session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
275 /* indicates to the custom flash manager the type of */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
276 /* data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
277 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
278 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
279 UWORD8 copy_data_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD16 **ptr_buf, UWORD16 data_size, API *ptr_dst) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
280 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
281 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
282 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
283 while (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
284 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
285 while( (data_size !=0) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
286 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
287 *ptr_dst++ = *(*ptr_buf)++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
288 data_size--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
289 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
290 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
291 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
292 if ( data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
293 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
294 *buffer_size = data_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
295 error_id = Cust_get_pointer( ptr_buf, buffer_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
296 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
297 // An error is occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
298 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
299 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
300 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
301 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
302 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
303 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
304 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
305 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
306 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
307 /* copy_data_to_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
308 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
309 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
310 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
311 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
312 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
313 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
314 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
315 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
316 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
317 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
318 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
319 /* This function copies the data to the buffer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
320 /* (buffer size: buffer_size, start address: ptr_buf) */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
321 /* from the source indicated by ptr_src. The size of the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
322 /* data to save is data_size. The session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
323 /* indicates to the custom flash manager the type of */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
324 /* data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
325 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
326 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
327 UWORD8 copy_data_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD16 **ptr_buf, UWORD16 data_size, API *ptr_src) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
328 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
329 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
330 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
331 while (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
332 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
333 while( (data_size !=0) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
334 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
335 *(*ptr_buf)++ = *ptr_src++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
336 data_size--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
337 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
338 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
339 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
340 if (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
341 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
342 *buffer_size = data_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
343 error_id = Cust_get_pointer(ptr_buf, buffer_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
344 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
345 // An error is occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
346 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
347 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
348 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
349 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
350 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
351 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
352 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
353 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
354 #if (MELODY_E2) || (L1_VOICE_MEMO_AMR) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
355 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
356 /* copy_byte_data_from_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
357 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
358 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
359 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
360 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
361 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
362 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
363 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
364 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
365 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
366 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
367 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
368 /* This function copies byte per byte the data from */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
369 /* the buffer (buffer size (in byte): buffer_size, */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
370 /* start address: ptr_buf) to the destination indicated */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
371 /* by ptr_dst. The size of the data to download is */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
372 /* data_size(in byte). The session_id indicates to the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
373 /* custom flash manager the type of data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
374 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
375 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
376 UWORD8 copy_byte_data_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, UWORD8 *ptr_dst) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
377 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
378 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
379 UWORD16 requested_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
380 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
381 while (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
382 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
383 while( (data_size !=0) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
384 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
385 *ptr_dst++ = *(*ptr_buf)++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
386 data_size--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
387 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
388 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
389 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
390 if ( data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
391 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
392 // Calculate the size of the data to request in 16-bit word |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
393 if (*buffer_size & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
394 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
395 // The size is a odd value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
396 requested_size = (data_size >> 1) + 1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
397 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
398 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
399 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
400 // the size is an even value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
401 requested_size = (data_size >> 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
402 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
403 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
404 error_id = Cust_get_pointer( (UWORD16 **)ptr_buf, &requested_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
405 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
406 // An error is occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
407 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
408 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
409 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
410 *buffer_size = (requested_size << 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
411 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
412 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
413 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
414 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
415 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
416 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
417 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
418 /* copy_data_to_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
419 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
420 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
421 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
422 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
423 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
424 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
425 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
426 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
427 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
428 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
429 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
430 /* This function copies byte per byte the data to the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
431 /* buffer (buffer size in byte: buffer_size, start */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
432 /* address: ptr_buf) from the source indicated by */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
433 /* ptr_src. The size in byte of the data to save is */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
434 /* data_size. The session_id indicates to the custom */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
435 /* flash manager the type of data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
436 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
437 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
438 UWORD8 copy_byte_data_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, UWORD8 *ptr_src) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
439 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
440 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
441 UWORD16 requested_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
442 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
443 while (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
444 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
445 while( (data_size !=0) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
446 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
447 *(*ptr_buf)++ = *ptr_src++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
448 data_size--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
449 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
450 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
451 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
452 if (data_size != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
453 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
454 // Calculate the size of the data to request in 16-bit word |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
455 if (*buffer_size & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
456 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
457 // The size is a odd value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
458 requested_size = (data_size >> 1) + 1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
459 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
460 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
461 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
462 // the size is an even value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
463 requested_size = (data_size >> 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
464 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
465 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
466 error_id = Cust_get_pointer((UWORD16 **)ptr_buf, &requested_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
467 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
468 // An error is occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
469 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
470 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
471 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
472 *buffer_size = (requested_size << 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
473 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
474 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
475 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
476 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
477 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
478 #endif //#if (MELODY_E2) || (L1_VOICE_MEMO_AMR) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
479 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
480 #if (MELODY_E2) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
481 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
482 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
483 /* audio_twentyms_to_TDMA_convertion() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
484 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
485 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
486 /* Parameters : 20ms value */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
487 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
488 /* Return : TDMA value */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
489 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
490 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
491 /* This function convert a duration from 20ms unit to */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
492 /* TDMA unit. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
493 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
494 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
495 UWORD16 audio_twentyms_to_TDMA_convertion(UWORD16 twentyms_value) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
496 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
497 UWORD16 TDMA_value; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
498 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
499 // 20ms # 4 TDMA |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
500 TDMA_value = twentyms_value << 2; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
501 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
502 // Compensation factor: 1 TDMA each 60ms. |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
503 TDMA_value += (twentyms_value/3); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
504 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
505 return(TDMA_value); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
506 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
507 #endif // MELODY_E2 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
508 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
509 #if (L1_VOICE_MEMO_AMR) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
510 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
511 /* copy_byte_data_le_from_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
512 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
513 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
514 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
515 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
516 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
517 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
518 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
519 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
520 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
521 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
522 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
523 /* This function copies byte per byte the data from */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
524 /* the buffer (buffer size (in byte): buffer_size, */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
525 /* start address: ptr_buf) to the destination indicated */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
526 /* by ptr_dst. The size of the data to download is */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
527 /* data_size(in byte). The session_id indicates to the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
528 /* custom flash manager the type of data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
529 /* Data in buffer is expected to be big-endian and will */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
530 /* be copied in order to retrieve little-endian order in */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
531 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
532 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
533 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
534 UWORD8 copy_byte_data_le_from_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, API *ptr_dst) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
535 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
536 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
537 UWORD16 requested_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
538 UWORD16 data_size_inv = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
539 UWORD16 temp_uword16 = 0 ; //omaps00090550 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
540 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
541 while (data_size_inv != data_size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
542 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
543 /* we go from 0 to data_size copying to MSB (even numbers) then LSB (odd numbers) of DSP */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
544 while( (data_size_inv != data_size) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
545 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
546 if (data_size_inv & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
547 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
548 temp_uword16 |= *(*ptr_buf)++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
549 *(ptr_dst)++ = temp_uword16; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
550 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
551 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
552 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
553 temp_uword16 = (*(*ptr_buf)++ << 8); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
554 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
555 data_size_inv++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
556 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
557 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
558 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
559 if ( data_size_inv != data_size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
560 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
561 // Calculate the size of the data to request in 16-bit word |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
562 if ((data_size - data_size_inv) & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
563 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
564 // The size is an odd value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
565 requested_size = ((data_size - data_size_inv) >> 1) + 1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
566 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
567 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
568 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
569 // the size is an even value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
570 requested_size = ((data_size - data_size_inv) >> 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
571 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
572 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
573 error_id = Cust_get_pointer((UWORD16 **)ptr_buf, &requested_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
574 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
575 // An error is occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
576 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
577 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
578 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
579 *buffer_size = (requested_size << 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
580 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
581 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
582 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
583 if (data_size & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
584 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
585 *(ptr_dst)++ = temp_uword16; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
586 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
587 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
588 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
589 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
590 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
591 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
592 /* copy_byte_data_le_to_buffer() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
593 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
594 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
595 /* Parameters : session_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
596 /* buffer_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
597 /* data_size */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
598 /* ptr_dst */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
599 /* ptr_src */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
600 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
601 /* Return : error_id */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
602 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
603 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
604 /* This function copies byte per byte the data to the */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
605 /* buffer (buffer size in byte: buffer_size, start */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
606 /* address: ptr_buf) from the source indicated by */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
607 /* ptr_src. The size in byte of the data to save is */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
608 /* data_size. The session_id indicates to the custom */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
609 /* flash manager the type of data. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
610 /* Data is expected to be little-endian in ptr_src and */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
611 /* will be copied in order to retrieve big-endian */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
612 /* order in buffer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
613 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
614 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
615 UWORD8 copy_byte_data_le_to_buffer (UWORD8 session_id, UWORD16 *buffer_size, UWORD8 **ptr_buf, UWORD16 data_size, API *ptr_src) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
616 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
617 UWORD8 error_id = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
618 UWORD8 data_size_inv = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
619 UWORD16 requested_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
620 UWORD16 temp_uword16=0; //omaps00090550 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
621 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
622 /* we go from 0 to data_size copying MSB (even numbers) then LSB (odd numbers) from DSP */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
623 while (data_size_inv != data_size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
624 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
625 while( (data_size_inv != data_size) && (*buffer_size != 0) ) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
626 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
627 /* if data_size_inv is odd, we need the LSB of the DSP word */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
628 if (data_size_inv & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
629 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
630 *(*ptr_buf)++ = (UWORD8)(temp_uword16 & 0x00FF); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
631 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
632 /* if data_size_inv is even, we need the MSB of the DSP word */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
633 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
634 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
635 temp_uword16 = *(ptr_src)++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
636 *(*ptr_buf)++ = (UWORD8)(temp_uword16 >> 8); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
637 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
638 data_size_inv++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
639 (*buffer_size)--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
640 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
641 // A new buffer is requested in order to finish to copy the data |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
642 if ( data_size_inv != data_size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
643 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
644 // Calculate the size of the data to request in 16-bit word |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
645 if ((data_size - data_size_inv) & 0x0001) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
646 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
647 // The size is a odd value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
648 requested_size = ((data_size - data_size_inv) >> 1) + 1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
649 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
650 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
651 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
652 // the size is an even value |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
653 requested_size = ((data_size - data_size_inv) >> 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
654 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
655 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
656 error_id = Cust_get_pointer((UWORD16 **)ptr_buf, &requested_size, session_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
657 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
658 // An error occured |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
659 if (error_id) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
660 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
661 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
662 *buffer_size = (requested_size << 1); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
663 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
664 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
665 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
666 return(error_id); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
667 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
668 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
669 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
670 #if (L1_STEREOPATH == 1) && (CODE_VERSION == NOT_SIMULATION) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
671 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
672 /* l1_audio_api_handler() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
673 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
674 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
675 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
676 /* Functionality : API int management */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
677 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
678 void l1_audio_api_handler(void) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
679 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
680 UWORD16 rootcause; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
681 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
682 if (l1a_l1s_com.stereopath_drv_task.parameters.feature_identifier == AUDIO_SP_TESTS_ID) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
683 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
684 #if (TESTMODE && (OP_L1_STANDALONE == 1)) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
685 rootcause = stp_drv_ndb->d_cport_api_dma_rootcause; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
686 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
687 l1tm_stereopath_DMA_handler((SYS_UWORD16) rootcause); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
688 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
689 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
690 } /* l1_audio_api_handler() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
691 #endif // (L1_STEREOPATH == 1) && (CODE_VERSION == NOT_SIMULATION) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
692 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
693 #if (L1_EXT_AUDIO_MGT == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
694 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
695 /* l1_ext_audio_mgt_dma_handler() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
696 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
697 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
698 /* Parameters : dma_status */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
699 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
700 /* Return : none */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
701 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
702 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
703 /* This function is used to handle a DMA interrupt */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
704 /* that will notify to the external midi play process */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
705 /* that a new buffer is needed. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
706 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
707 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
708 void l1_ext_audio_mgt_dma_handler(SYS_UWORD16 dma_status) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
709 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
710 NU_Activate_HISR(&EXT_AUDIO_MGT_hisr); // activate external MIDI HISR |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
711 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
712 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
713 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
714 #if (L1_LIMITER == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
715 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
716 /* l1_audio_lim_update_mul_low_high() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
717 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
718 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
719 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
720 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
721 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
722 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
723 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
724 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
725 /* This function is used to update mul_low and mul_high */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
726 /* Limiter parameters in function to volume gain (Q15) */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
727 /* First the function read the last controlled volume */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
728 /* in the MCU/DSP API then it processed mul_low[0/1] */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
729 /* and mul_high[0/1] according to following equations: */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
730 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
731 /* thr_low = - thr_low_slope x volume + thr_low_0 */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
732 /* thr_high = - thr_high_slope x volume + thr_high_0 */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
733 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
734 /* mul_low[0] = 32767 / thr_low */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
735 /* mul_low[1] = 32767 x thr_low */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
736 /* mul_high[0] = 32767 / thr_high */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
737 /* mul_high[1] = 32767 x thr_high */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
738 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
739 void l1_audio_lim_update_mul_low_high() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
740 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
741 #if (CODE_VERSION != SIMULATION) |
607
262fcce10859
gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
606
diff
changeset
|
742 #if (ANALOG == 3) |
606
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
743 WORD16 volume_q15 = ABB_Read_DLGain(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
744 #endif |
607
262fcce10859
gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
606
diff
changeset
|
745 #if (ANALOG == 11) |
606
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
746 WORD16 volume_q15 = (WORD16)(l1_audio_abb_Read_DLGain()); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
747 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
748 #else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
749 WORD16 volume_q15 = 0x4000; // -6 dB for example in simulation |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
750 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
751 WORD16 thr_low, thr_high; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
752 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
753 /* Process Thr_low */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
754 thr_low = (- (l1a_l1s_com.limiter_task.parameters.thr_low_slope * volume_q15)>>15) + |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
755 l1a_l1s_com.limiter_task.parameters.thr_low_0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
756 // if (thr_low > 32767) //OMAPS00090550 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
757 // thr_low = 32767; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
758 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
759 /* Process Thr_high */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
760 thr_high = (- (l1a_l1s_com.limiter_task.parameters.thr_high_slope * volume_q15)>>15) + |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
761 l1a_l1s_com.limiter_task.parameters.thr_high_0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
762 // if (thr_high > 32767) //OMAPS00090550 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
763 // thr_high = 32767; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
764 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
765 /* Process amd store mul_low[0/1] */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
766 if (thr_low != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
767 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_low[0] = 32767 / thr_low; // Q0 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
768 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
769 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_low[0] = 32767; // should never happen |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
770 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_low[1] = thr_low; // Q15 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
771 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
772 /* Process and store mul_high[0/1] */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
773 if (thr_high != 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
774 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_high[0] = 32767 / thr_high; // Q0 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
775 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
776 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_high[0] = 32767; // should never happen |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
777 l1s_dsp_com.dsp_ndb_ptr->a_lim_mul_high[1] = thr_high; // Q15 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
778 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
779 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
780 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
781 /* l1_audio_lim_update_mul_low_high() */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
782 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
783 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
784 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
785 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
786 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
787 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
788 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
789 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
790 /* This function MUST be called at each volume change in */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
791 /* order to request a limiter partial update. */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
792 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
793 void l1_audio_lim_partial_update() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
794 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
795 // Set partial update command |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
796 l1a_l1s_com.limiter_task.command.partial_update = TRUE; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
797 // Force L1S execution |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
798 l1a_l1s_com.time_to_next_l1s_task = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
799 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
800 #endif // L1_LIMITER == 1 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
801 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
802 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
803 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
804 #if (L1_AGC_UL == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
805 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
806 /* l1_audio_agc_ul_copy_params */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
807 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
808 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
809 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
810 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
811 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
812 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
813 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
814 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
815 /* This function is used to copy the AGC UL 1x parameter */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
816 /* to API memory using a pointer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
817 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
818 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
819 void l1_audio_agc_ul_copy_params() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
820 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
821 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
822 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_control = l1a_l1s_com.agc_ul_task.parameters.control; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
823 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_frame_size = l1a_l1s_com.agc_ul_task.parameters.frame_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
824 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_targeted_level = l1a_l1s_com.agc_ul_task.parameters.targeted_level; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
825 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_signal_up = l1a_l1s_com.agc_ul_task.parameters.signal_up; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
826 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_signal_down = l1a_l1s_com.agc_ul_task.parameters.signal_down; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
827 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_max_scale = l1a_l1s_com.agc_ul_task.parameters.max_scale; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
828 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_gain_smooth_alpha = l1a_l1s_com.agc_ul_task.parameters.gain_smooth_alpha; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
829 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_gain_smooth_alpha_fast = l1a_l1s_com.agc_ul_task.parameters.gain_smooth_alpha_fast; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
830 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_gain_smooth_beta = l1a_l1s_com.agc_ul_task.parameters.gain_smooth_beta; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
831 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_gain_smooth_beta_fast = l1a_l1s_com.agc_ul_task.parameters.gain_smooth_beta_fast; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
832 l1s_dsp_com.dsp_ndb_ptr->d_agc_ul_gain_intp_flag = l1a_l1s_com.agc_ul_task.parameters.gain_intp_flag; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
833 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
834 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
835 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
836 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
837 #if (L1_AGC_DL == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
838 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
839 /* l1_audio_agc_dl_copy_params */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
840 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
841 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
842 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
843 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
844 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
845 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
846 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
847 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
848 /* This function is used to copy the AGC DL 1x parameter */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
849 /* to API memory using a pointer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
850 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
851 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
852 void l1_audio_agc_dl_copy_params() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
853 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
854 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_control = l1a_l1s_com.agc_dl_task.parameters.control; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
855 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_frame_size = l1a_l1s_com.agc_dl_task.parameters.frame_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
856 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_targeted_level = l1a_l1s_com.agc_dl_task.parameters.targeted_level; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
857 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_signal_up = l1a_l1s_com.agc_dl_task.parameters.signal_up; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
858 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_signal_down = l1a_l1s_com.agc_dl_task.parameters.signal_down; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
859 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_max_scale = l1a_l1s_com.agc_dl_task.parameters.max_scale; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
860 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_gain_smooth_alpha = l1a_l1s_com.agc_dl_task.parameters.gain_smooth_alpha; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
861 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_gain_smooth_alpha_fast = l1a_l1s_com.agc_dl_task.parameters.gain_smooth_alpha_fast; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
862 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_gain_smooth_beta = l1a_l1s_com.agc_dl_task.parameters.gain_smooth_beta; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
863 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_gain_smooth_beta_fast = l1a_l1s_com.agc_dl_task.parameters.gain_smooth_beta_fast; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
864 l1s_dsp_com.dsp_ndb_ptr->d_agc_dl_gain_intp_flag = l1a_l1s_com.agc_dl_task.parameters.gain_intp_flag; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
865 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
866 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
867 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
868 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
869 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
870 #if (L1_IIR == 2) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
871 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
872 /* l1_audio_iir4x_copy_params */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
873 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
874 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
875 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
876 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
877 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
878 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
879 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
880 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
881 /* This function is used to copy the IIR 4x parameter */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
882 /* to API memory using a pointer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
883 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
884 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
885 void l1_audio_iir4x_copy_params() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
886 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
887 UWORD8 i; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
888 UWORD8 j; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
889 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
890 // Set IIR parameters |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
891 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_control = l1a_l1s_com.iir_task.parameters->parameters.control; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
892 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_frame_size = l1a_l1s_com.iir_task.parameters->parameters.frame_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
893 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_fir_swap = l1a_l1s_com.iir_task.parameters->parameters.fir_swap; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
894 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
895 // Set parameter os FIR part |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
896 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_fir_enable = l1a_l1s_com.iir_task.parameters->parameters.fir_filter.fir_enable; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
897 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_fir_length = l1a_l1s_com.iir_task.parameters->parameters.fir_filter.fir_length; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
898 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_fir_shift = l1a_l1s_com.iir_task.parameters->parameters.fir_filter.fir_shift; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
899 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
900 for (i=0; i < (l1a_l1s_com.iir_task.parameters->parameters.fir_filter.fir_length); i++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
901 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
902 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_fir_taps[i] = l1a_l1s_com.iir_task.parameters->parameters.fir_filter.fir_taps[i]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
903 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
904 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
905 // Set parameters for IIR part |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
906 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_enable = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_enable; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
907 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_number = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_number; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
908 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
909 // Set parameters for IIR part - SOS 1 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
910 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_1 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[0].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
911 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_1 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[0].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
912 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
913 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
914 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
915 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_1[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[0].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
916 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
917 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
918 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
919 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_1[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[0].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
920 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
921 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_1 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[0].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
922 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
923 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
924 // Set parameters for IIR part - SOS 2 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
925 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_2 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[1].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
926 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_2 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[1].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
927 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
928 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
929 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
930 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_2[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[1].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
931 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
932 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
933 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
934 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_2[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[1].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
935 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
936 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_2 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[1].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
937 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
938 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
939 // Set parameters for IIR part - SOS 3 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
940 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_3 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[2].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
941 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_3 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[2].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
942 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
943 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
944 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
945 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_3[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[2].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
946 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
947 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
948 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
949 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_3[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[2].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
950 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
951 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_3 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[2].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
952 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
953 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
954 // Set parameters for IIR part - SOS 4 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
955 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_4 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[3].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
956 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_4 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[3].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
957 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
958 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
959 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
960 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_4[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[3].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
961 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
962 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
963 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
964 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_4[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[3].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
965 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
966 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_4 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[3].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
967 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
968 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
969 // Set parameters for IIR part - SOS 5 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
970 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_5 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[4].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
971 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_5 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[4].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
972 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
973 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
974 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
975 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_5[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[4].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
976 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
977 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
978 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
979 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_5[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[4].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
980 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
981 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_5 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[4].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
982 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
983 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
984 // Set parameters for IIR part - SOS 6 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
985 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_6 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[5].sos_fact; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
986 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_fact_form_6 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[5].sos_fact_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
987 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
988 for (j=0; j < IIR_4X_ORDER_OF_SECTION; j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
989 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
990 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_den_6[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[5].sos_den[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
991 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
992 for (j=0; j < (IIR_4X_ORDER_OF_SECTION + 1); j++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
993 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
994 l1s_dsp_com.dsp_ndb_ptr->a_iir4x_sos_num_6[j] = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[5].sos_num[j]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
995 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
996 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_sos_num_form_6 = l1a_l1s_com.iir_task.parameters->parameters.sos_filter.sos_filter[5].sos_num_form; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
997 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
998 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
999 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1000 l1s_dsp_com.dsp_ndb_ptr->d_iir4x_gain = l1a_l1s_com.iir_task.parameters->parameters.gain; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1001 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1002 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1003 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1004 #endif // L1_IIR == 2 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1005 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1006 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1007 #if (L1_DRC == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1008 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1009 /* l1_audio_drc1x_copy_params */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1010 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1011 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1012 /* Parameters : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1013 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1014 /* Return : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1015 /* */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1016 /* Description : */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1017 /* ------------- */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1018 /* This function is used to copy the DRC 1x parameter */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1019 /* to API memory using a pointer */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1020 /*-------------------------------------------------------*/ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1021 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1022 void l1_audio_drc1x_copy_params() |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1023 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1024 UWORD8 i; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1025 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1026 // Set DRC parameters |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1027 drc_ndb->d_drc_speech_mode_samp_f = l1a_l1s_com.drc_task.parameters->parameters.speech_mode_samp_f; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1028 drc_ndb->d_drc_num_subbands = l1a_l1s_com.drc_task.parameters->parameters.num_subbands; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1029 drc_ndb->d_drc_frame_len = l1a_l1s_com.drc_task.parameters->parameters.frame_len; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1030 drc_ndb->d_drc_expansion_knee_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.expansion_knee_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1031 drc_ndb->d_drc_expansion_knee_md_hg = l1a_l1s_com.drc_task.parameters->parameters.expansion_knee_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1032 drc_ndb->d_drc_expansion_ratio_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.expansion_ratio_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1033 drc_ndb->d_drc_expansion_ratio_md_hg = l1a_l1s_com.drc_task.parameters->parameters.expansion_ratio_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1034 drc_ndb->d_drc_max_amplification_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.max_amplification_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1035 drc_ndb->d_drc_max_amplification_md_hg = l1a_l1s_com.drc_task.parameters->parameters.max_amplification_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1036 drc_ndb->d_drc_compression_knee_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.compression_knee_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1037 drc_ndb->d_drc_compression_knee_md_hg = l1a_l1s_com.drc_task.parameters->parameters.compression_knee_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1038 drc_ndb->d_drc_compression_ratio_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.compression_ratio_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1039 drc_ndb->d_drc_compression_ratio_md_hg = l1a_l1s_com.drc_task.parameters->parameters.compression_ratio_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1040 drc_ndb->d_drc_energy_limiting_th_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.energy_limiting_th_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1041 drc_ndb->d_drc_energy_limiting_th_md_hg = l1a_l1s_com.drc_task.parameters->parameters.energy_limiting_th_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1042 drc_ndb->d_drc_limiter_threshold_fb = l1a_l1s_com.drc_task.parameters->parameters.limiter_threshold_fb; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1043 drc_ndb->d_drc_limiter_threshold_bs = l1a_l1s_com.drc_task.parameters->parameters.limiter_threshold_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1044 drc_ndb->d_drc_limiter_threshold_md = l1a_l1s_com.drc_task.parameters->parameters.limiter_threshold_md; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1045 drc_ndb->d_drc_limiter_threshold_hg = l1a_l1s_com.drc_task.parameters->parameters.limiter_threshold_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1046 drc_ndb->d_drc_limiter_hangover_spect_preserve = l1a_l1s_com.drc_task.parameters->parameters.limiter_hangover_spect_preserve; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1047 drc_ndb->d_drc_limiter_release_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.limiter_release_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1048 drc_ndb->d_drc_limiter_release_md_hg = l1a_l1s_com.drc_task.parameters->parameters.limiter_release_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1049 drc_ndb->d_drc_gain_track_fb_bs = l1a_l1s_com.drc_task.parameters->parameters.gain_track_fb_bs; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1050 drc_ndb->d_drc_gain_track_md_hg = l1a_l1s_com.drc_task.parameters->parameters.gain_track_md_hg; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1051 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1052 for (i=0; i < DRC_LPF_LENGTH; i++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1053 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1054 drc_ndb->a_drc_low_pass_filter[i] = l1a_l1s_com.drc_task.parameters->parameters.low_pass_filter[i]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1055 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1056 for (i=0; i < DRC_BPF_LENGTH; i++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1057 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1058 drc_ndb->a_drc_mid_band_filter[i] = l1a_l1s_com.drc_task.parameters->parameters.mid_band_filter[i]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1059 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1060 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1061 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1062 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1063 #endif // L1_DRC == 1 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1064 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1065 #if(L1_BT_AUDIO == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1066 BOOL L1Audio_InformBtAudioPathState (BOOL connected) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1067 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1068 if(connected==bt_audio.connected_status) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1069 return BT_STATUS_OK; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1070 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1071 return BT_STATUS_ERROR; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1072 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1073 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1074 void L1Audio_RegisterBthal (L1AudioPcmCallback pcmCallback, L1AudioConfigureCallback configCallback) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1075 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1076 bt_audio.audio_configure_callback=configCallback; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1077 bt_audio.audio_pcmblock_callback=pcmCallback; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1078 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1079 UWORD8 bt_flag=1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1080 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1081 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1082 L1AudioPcmStatus L1Audio_PullPcmBlock (L1AudioPcmBlock *pcmBlock) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1083 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1084 UWORD8 status=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1085 if(bt_flag == 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1086 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1087 AUDIO_SEND_TRACE("pull back bef init",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1088 bt_audio.pcm_data_ready = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1089 // return L1_PCM_PENDING; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1090 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1091 // AUDIO_SEND_TRACE("pull back called",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1092 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1093 if(bt_audio.pcm_data_end == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1094 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1095 AUDIO_SEND_TRACE("abnormal BT request mp3/aac",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1096 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1097 if(bt_audio.pcmblock.lengthInBytes==2*C_MP3_OUTPUT_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1098 l1mp3_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1099 else if(bt_audio.pcmblock.lengthInBytes==2*C_AAC_OUTPUT_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1100 l1aac_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1101 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1102 bt_audio.pcm_data_end = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1103 bt_audio.pcm_data_ready = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1104 bt_flag = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1105 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1106 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1107 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1108 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1109 if(bt_audio.pcm_data_failed==0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1110 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1111 if(bt_audio.pcm_data_ready>0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1112 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1113 //AUDIO_SEND_TRACE("Data ready for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1114 pcmBlock->pcmBuffer= bt_audio.pcmblock.pcmBuffer; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1115 pcmBlock->lengthInBytes=bt_audio.pcmblock.lengthInBytes; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1116 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1117 bt_audio.pcm_data_ready=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1118 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1119 if( bt_audio.pcm_data_end==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1120 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1121 AUDIO_SEND_TRACE("Data ended for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1122 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1123 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1124 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1125 if(bt_audio.pcmblock.lengthInBytes==2*AUDIO_EXT_MIDI_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1126 return L1_PCM_READY; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1127 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1128 status= L1_PCM_READY; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1129 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1130 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1131 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1132 if( bt_audio.pcm_data_end==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1133 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1134 AUDIO_SEND_TRACE("Data ended for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1135 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1136 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1137 // AUDIO_SEND_TRACE("Data pending for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1138 bt_audio.pcm_data_pending=1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1139 status= L1_PCM_PENDING; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1140 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1141 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1142 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1143 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1144 AUDIO_SEND_TRACE("Data failed for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1145 return L1_PCM_FAILED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1146 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1147 if((bt_audio.pcmblock.lengthInBytes==2*C_MP3_OUTPUT_BUFFER_SIZE)&& bt_flag==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1148 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1149 if(l1a_apihisr_com.mp3.command.stop==TRUE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1150 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1151 bt_flag=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1152 l1mp3_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1153 bt_audio.pcm_data_end = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1154 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1155 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1156 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1157 l1mp3_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1158 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1159 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1160 else if(bt_audio.pcmblock.lengthInBytes==2*C_AAC_OUTPUT_BUFFER_SIZE&& bt_flag==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1161 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1162 if(l1a_apihisr_com.aac.command.stop==TRUE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1163 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1164 bt_flag=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1165 AUDIO_SEND_TRACE("Media ended for BT-Pull event",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1166 l1aac_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1167 bt_audio.pcm_data_end = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1168 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1169 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1170 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1171 l1aac_dma_it_handler(0); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1172 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1173 else if(bt_audio.pcmblock.lengthInBytes==2*AUDIO_EXT_MIDI_BUFFER_SIZE && bt_flag==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1174 if( bt_audio.pcm_data_end==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1175 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1176 bt_flag=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1177 return L1_PCM_MEDIA_ENDED; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1178 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1179 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1180 l1a_bt_audio_noti_process(); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1181 return status; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1182 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1183 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1184 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1185 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1186 void l1_audio_bt_init(UINT16 media_buf_size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1187 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1188 bt_audio.pcm_data_pending =0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1189 bt_audio.pcm_data_end =0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1190 bt_audio.pcm_data_ready =1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1191 bt_audio.pcm_data_failed =0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1192 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1193 bt_flag=1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1194 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1195 if(media_buf_size==C_MP3_OUTPUT_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1196 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1197 bt_audio.pcmblock.pcmBuffer=(UWORD8 *)&mp3_dma->a_mp3_dma_input_buffer[0][0]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1198 bt_audio.pcmblock.lengthInBytes=2*media_buf_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1199 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1200 else if(media_buf_size==C_AAC_OUTPUT_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1201 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1202 bt_audio.pcmblock.pcmBuffer=(UWORD8 *)&aac_dma->a_aac_dma_input_buffer[0][0]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1203 bt_audio.pcmblock.lengthInBytes=2*media_buf_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1204 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1205 else if(media_buf_size==AUDIO_EXT_MIDI_BUFFER_SIZE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1206 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1207 bt_audio.pcmblock.pcmBuffer=(UWORD8 *)&midi_buf.audio_play_buffer[0]; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1208 bt_audio.pcmblock.lengthInBytes=2*media_buf_size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1209 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1210 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1211 #endif//L1_BT_AUDIO == 1 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1212 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1213 #if(L1_BT_AUDIO==1) ||(L1_WCM==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1214 void l1_audio_manager(UWORD8 *src, UWORD16 size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1215 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1216 UWORD16 i ; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1217 #if(L1_BT_AUDIO==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1218 bt_audio.pcmblock.pcmBuffer=src; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1219 bt_audio.pcmblock.lengthInBytes=2*size; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1220 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1221 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1222 #if (OP_L1_STANDALONE == 0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1223 #if 0 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1224 // l1_audio_wcm(src,size); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1225 if( wcm_enable == 1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1226 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1227 switch(size) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1228 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1229 case 2048: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1230 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1231 arm_wcm_module( AAC, (T_SINT16 *)src , &wcm_output[0]); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1232 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1233 case 1152: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1234 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1235 arm_wcm_module( MP3, (T_SINT16 *)src , &wcm_output[0]); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1236 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1237 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1238 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1239 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1240 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1241 for (i=0 ; i< size ; i++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1242 while(size>0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1243 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1244 *src++=(API)*wcm_output++; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1245 size--; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1246 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1247 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1248 /* for (i=0 ; i< size ; i++) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1249 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1250 *src++ = (UINT8 )wcm_output[i]&0x00ff; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1251 *src++ = (UINT8 )(wcm_output[i] & 0xff00) >> 8; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1252 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1253 */ |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1254 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1255 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1256 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1257 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1258 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1259 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1260 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1261 #if(L1_BT_AUDIO==1) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1262 if(bt_audio.connected_status==TRUE) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1263 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1264 if(bt_audio.pcm_data_pending>0) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1265 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1266 bt_audio.pcm_data_pending = 0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1267 AUDIO_SEND_TRACE("Pending callback",RV_TRACE_LEVEL_ERROR); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1268 bt_audio.audio_pcmblock_callback(&bt_audio.pcmblock); |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1269 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1270 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1271 else |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1272 bt_audio.pcm_data_ready = 1; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1273 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1274 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1275 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1276 #endif |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1277 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1278 UWORD16 l1_ext_audio_get_frequencyrate(UWORD16 frequency_index) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1279 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1280 UWORD16 sampling_frequency=0; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1281 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1282 switch(frequency_index) |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1283 { |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1284 case 1: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1285 sampling_frequency=8000; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1286 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1287 case 2: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1288 sampling_frequency=11025; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1289 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1290 case 3: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1291 sampling_frequency=16000; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1292 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1293 case 4: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1294 sampling_frequency=22050; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1295 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1296 case 5: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1297 sampling_frequency=32000; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1298 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1299 case 6: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1300 sampling_frequency=44100; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1301 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1302 case 7: |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1303 sampling_frequency=48000; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1304 break; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1305 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1306 |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1307 // Sampling frequency should never be zero |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1308 return sampling_frequency; |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1309 } |
c5286d24539e
gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1310 #endif // AUDIO_TASK |