annotate gsm-fw/L1/audio_cfile/l1audio_stereo.c @ 940:0fb9b7f2ef87

gsm-fw/services/ffs/drv.c: Intel single bank flash driver hooked in
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 31 Oct 2015 23:39:41 +0000
parents 262fcce10859
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 /*
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
2 * l1audio_stereo.c
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
3 *
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
4 * Control audio
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
5 *
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
6 * Filename l1audio_stereo.c
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
7 * 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
8 *
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 "l1_macro.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "l1_confg.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
14
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
15 #define _L1AUDIO_STEREO_C_
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 #if (AUDIO_TASK == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
18
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
19 #include "l1_types.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
20 #include "sys_types.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
21
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
22 #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
23
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
24
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
25 #include <stdlib.h>
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
26 #include <string.h>
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 "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
29 #include "l1_ver.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
30 #include "l1_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
31 #include "l1_signa.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
32
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
33 #if TESTMODE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
34 #include "l1tm_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
35 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
36
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
37 #include "l1audio_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
38 #include "l1audio_cust.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "l1audio_signa.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
40 #include "l1audio_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
41 #include "l1audio_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
42
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
43 #if (L1_GTT == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
44 #include "l1gtt_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
45 #include "l1gtt_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
46 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
47 //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
48 #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
49 #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
50 #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
51 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
52 #if (L1_MP3 == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
53 #include "l1mp3_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
54 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
55
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
56 #if (L1_MIDI == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
57 #include "l1midi_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
58 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
59 //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
60 #if (L1_AAC == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
61 #include "l1aac_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
62 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
63
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
64 #include "l1_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
65 #include "cust_os.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
66 #include "l1_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
67 #include "l1_varex.h"
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_mftab.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
70 #include "l1_tabs.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
71 #include "l1_ctl.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
72
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
73 #include "l1_time.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
74 #include "l1_scen.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
75
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
76 #if (L1_STEREOPATH == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
77 #include "sys_dma.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
78 #include "sys_inth.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
79 #include "abb.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
80 #if TESTMODE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
81 #include "l1tm_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
82 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
83 #include "l1audio_stereo.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
84 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
85
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
86 #else
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
87 // 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
88
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
89 #include <ctype.h>
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
90 #include <math.h>
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
91 #include "l1_ver.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
92 #include "l1_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
93 #include "l1_signa.h"
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 #if TESTMODE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
96 #include "l1tm_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
97 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
98
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
99 #include "l1audio_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
100 #include "l1audio_cust.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
101 #include "l1audio_signa.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
102 #include "l1audio_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
103 #include "l1audio_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
104
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
105 #if (L1_GTT == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
106 #include "l1gtt_const.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
107 #include "l1gtt_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
108 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
109 //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
110 #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
111 #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
112 #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
113 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
114 #if (L1_MP3 == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
115 #include "l1mp3_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
116 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
117
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
118 #if (L1_MIDI == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
119 #include "l1midi_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
120 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
121 //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
122 #if (L1_AAC == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
123 #include "l1aac_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
124 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
125 #include "l1_defty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
126 #include "cust_os.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
127 #include "l1_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
128 #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
129 #include "l1_varex.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
130
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
131 #include "l1_proto.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
132 #include "l1_mftab.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
133 #include "l1_tabs.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
134 #include "mem.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
135 #include "armio.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
136 #include "timer.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
137 #include "timer1.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
138 #include "dma.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
139 #include "inth.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
140 #include "ulpd.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
141 #include "rhea_arm.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
142 #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
143 #include "l1_ctl.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
144
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
145 #include "l1_time.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
146 #if L2_L3_SIMUL
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
147 #include "l1_scen.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
148 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
149
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
150 #if (L1_STEREOPATH == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
151 #include "sys_dma.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
152 #include "sys_inth.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
153 #include "abb.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
154 #if TESTMODE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
155 #include "l1tm_msgty.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
156 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
157 #include "l1audio_stereo.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
158 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
159
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
160 #include "l1audio_abb.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
161 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
162
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
163 #include "l1audio_macro.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
164
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
165 //add the extern reference of abb_write_done
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
166 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
167 #include "bspTwl3029_I2c.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
168 #include "bspTwl3029_Aud_Map.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
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
171 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
172 Bsp_Twl3029_I2cTransReqArray l1audio_i2cTransArray;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
173 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
174
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
175 #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
176
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
177 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
178 #include "bspTwl3029_Int_Map.h"
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
179
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
180
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
181 //Add the call back function of the stereo path.
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
182 void l1s_stereopath_callback(UWORD8 cbvalue)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
183 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
184 BspTwl3029_ReturnCode returnVal = BSP_TWL3029_RETURN_CODE_FAILURE;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
185 UWORD16 count = 0;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
186 UINT8 triton_classD = 0;
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 /* callback function info pointer */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
189 BspTwl3029_I2C_Callback i2c_callback;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
190 BspTwl3029_I2C_CallbackPtr callbackPtr= &i2c_callback;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
191
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
192 /* I2C array */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
193 Bsp_Twl3029_I2cTransReqArray i2cTransArray;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
194 Bsp_Twl3029_I2cTransReqArrayPtr i2cTransArrayPtr= &i2cTransArray;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
195
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
196 /* twl3029 I2C reg info struct */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
197 BspTwl3029_I2C_RegisterInfo regInfo[10] ;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
198 BspTwl3029_I2C_RegisterInfo* regInfoPtr = regInfo;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
199
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
200 BspTwl3029_I2C_RegData tmpAudioHFTest1RegData=0;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
201 BspTwl3029_I2C_RegData tmpCtrl3RegData=0;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
202
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
203 bspTwl3029_Audio_getClassD_mode(&triton_classD);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
204
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
205 //Set the valud of abb_write_done to 1
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
206 l1s.abb_write_done = 1;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
207 switch(cbvalue)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
208 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
209 case L1S_TWL3029_STEROPATH_START:
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
210 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
211 l1a_l1s_com.outen_cfg_task.command_commited = l1a_l1s_com.outen_cfg_task.command_requested;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
212
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
213 returnVal = BspTwl3029_I2c_shadowRegRead(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_CTRL3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
214 &tmpCtrl3RegData);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
215 returnVal = BspTwl3029_I2c_shadowRegRead(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_HFTEST1_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
216 &tmpAudioHFTest1RegData);
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 returnVal = BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN1_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
219 l1a_l1s_com.outen_cfg_task.outen1, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
220 count++;
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 returnVal = BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN2_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
223 l1a_l1s_com.outen_cfg_task.outen2, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
224 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
225
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
226 if(l1a_l1s_com.outen_cfg_task.classD == 0x01) // User wants to configure classD
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
227 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
228 if(triton_classD == 0x00) // User wants to switch on and Triton not configured for classD
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
229 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
230 returnVal= BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_CKG_TESTUNLOCK_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
231 0xb6, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
232 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
233
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
234 returnVal= BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
235 l1a_l1s_com.outen_cfg_task.outen3, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
236 count++;
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 tmpCtrl3RegData |= 0x80; // AUDIO_CTRL3_SPKDIGON
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
239 tmpAudioHFTest1RegData = 0x01; // AUDIO_HFTEST1_SPKALLZB
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
240
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
241 BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_CTRL3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
242 tmpCtrl3RegData, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
243 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
244
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
245 BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_HFTEST1_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
246 tmpAudioHFTest1RegData, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
247 count++;
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 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
250 else if(l1a_l1s_com.outen_cfg_task.classD == 0x00)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
251 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
252 if(triton_classD != 0x00) // User wants no to classD and Triton configured for classD
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 tmpCtrl3RegData &= 0x7F; // AUDIO_CTRL3_SPKDIGON
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
255 tmpAudioHFTest1RegData = 0x00; // AUDIO_HFTEST1_SPKALLZB
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
256
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
257 BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_HFTEST1_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
258 tmpAudioHFTest1RegData, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
259 count++;
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 BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_AUDIO_CTRL3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
262 tmpCtrl3RegData, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
263 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
264
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
265 returnVal= BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
266 l1a_l1s_com.outen_cfg_task.outen3, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
267 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
268
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
269 BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD, BSP_TWL_3029_MAP_CKG_TESTUNLOCK_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
270 0x00, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
271 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
272 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
273 else // User no classD & Triton also no classD
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
274 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
275 returnVal= BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
276 l1a_l1s_com.outen_cfg_task.outen3, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
277 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
278 returnVal = BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN2_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
279 l1a_l1s_com.outen_cfg_task.outen2, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
280 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
281 returnVal= BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_OUTEN3_OFFSET,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
282 l1a_l1s_com.outen_cfg_task.outen3, regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
283 count++;
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 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
286 /*Switch OFF all pop modes unconditionally , it is turned on before turning on STON*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
287 returnVal=BspTwl3029_I2c_regQueWrite(BSP_TWL3029_I2C_AUD,BSP_TWL_3029_MAP_AUDIO_POPMAN_OFFSET, 0x00,regInfoPtr++);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
288 count++;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
289
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
290 callbackPtr->callbackFunc = l1s_stereopath_callback;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
291 callbackPtr->callbackVal = L1S_TWL3029_STEROPATH_OUTEN_CONFIG;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
292
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
293 if (returnVal != BSP_TWL3029_RETURN_CODE_FAILURE)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
294 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
295 regInfoPtr = regInfo;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
296 /* now request to I2C manager to write to Triton registers */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
297
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
298 returnVal = BspTwl3029_I2c_regInfoSend(regInfo,count,callbackPtr,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
299 (BspI2c_TransactionRequest*)i2cTransArrayPtr);
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 break;
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 case L1S_TWL3029_STEROPATH_CONFIG:
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
304 case L1S_TWL3029_STEROPATH_OUTEN_CONFIG:
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
305 case L1S_TWL3029_STEROPATH_STOP:
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
306 break;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
307 default:
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
308 break;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
309 }/* end switch */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
310 } /* end function l1s_stereopath_callback */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
311
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
312 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
313
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
314 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
315 /* l1s_stereopath_drv_config_ABB() */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
316 /*-------------------------------------------------------*/
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 /* Parameters : mono_stereo: indicates if buffer is made */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
319 /* of mono or stereo samples */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
320 /* sampling_frequency: sampling freq */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
321 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
322 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
323 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
324 /* Description : ABB configuration function */
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 void l1s_stereopath_drv_config_ABB(UWORD8 mono_stereo,UWORD8 sampling_frequency)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
328 {
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
329 #if (ANALOG == 3)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
330 UWORD16 regist;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
331
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
332 // Get the VAUDCTRL register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
333 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_cfg >> 6;
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 // reset sampling frequency and stereo/mono conversion
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
336 regist &= 0x319;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
337
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
338 // stereo/mono conversion ?
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
339 if (mono_stereo == AUDIO_SP_MONO_OUTPUT)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
340 regist |= 6;
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 // apply the request sampling frequency
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
343 regist |= (sampling_frequency << 5);
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 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
346 l1s_dsp_com.dsp_ndb_ptr->d_vaud_cfg = ABB_L1_WRITE(VAUDCTRL, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
347
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
348 // Get the VBCTRL2 register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
349 regist = l1s_dsp_com.dsp_ndb_ptr->d_vbctrl2 >> 6;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
350 // activate HSOVMID and VMIDFBYP
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
351 regist |= 0x90;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
352 l1s_dsp_com.dsp_ndb_ptr->d_vbctrl2 = ABB_L1_WRITE(VBCTRL2, regist);
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 // Get the VAUDPLL register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
355 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll >> 6;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
356 // reset PLL
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
357 regist &= 0x3fd;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
358 // switch PLL on
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
359 regist |= 0x2;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
360
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
361 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
362 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE(VAUDPLL, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
363
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
364 // Get the VBPOP register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
365 regist = l1s_dsp_com.dsp_ndb_ptr->d_vbpop >> 6;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
366 // deactivate vbpop for HSO
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
367 regist &= 0x3F8;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
368
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
369 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
370 l1s_dsp_com.dsp_ndb_ptr->d_vbpop = ABB_L1_WRITE(VBPOP, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
371
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
372 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
373
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
374 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
375 // Call to the Triton API which would configure the Audio path.
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
376 UWORD8 monostereo;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
377 UWORD8 pll;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
378 //Call back function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
379 BspTwl3029_I2C_Callback stereo_callbackFunc;
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 //Switch on the Stereo path PLL - Set the STPLLON to 1
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
382 pll = 0x02;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
383 //Check if stereo2mono is required
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
384 if (mono_stereo == AUDIO_SP_MONO_OUTPUT)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
385 monostereo = 0x03;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
386 else
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
387 monostereo = 0x00;
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 //Set the call back function to be called after the Audio configuration
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
390 stereo_callbackFunc.callbackFunc = l1s_stereopath_callback ;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
391 //stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_CONFIG;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
392 stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_START;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
393 stereo_callbackFunc.i2cTransArrayPtr = &l1audio_i2cTransArray;
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 //Call the Triton audio path configuration function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
396 if(BSP_TWL3029_RETURN_CODE_SUCCESS == bspTwl3029_Audio_Configure_Stereopath(&stereo_callbackFunc,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
397 pll,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
398 monostereo,
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
399 sampling_frequency ))
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
400 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
401 //Set the valud of abb_write_done to 1
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
402 l1s.abb_write_done = 1;
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
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
405 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
406 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
407
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
408
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 /* l1s_stereopath_drv_start_ABB() */
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 /* Parameters : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
414 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
415 /* Return : none */
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 /* Description : ABB start function */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
418 /* */
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 void l1s_stereopath_drv_start_ABB(void)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
421 {
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
422 #if (ANALOG == 3)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
423 // Get VAUDPLL register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
424 UWORD16 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll >> 6;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
425
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
426 // Reset I2S
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
427 regist &= 0x2ff;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
428 // I2S on
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
429 regist |= 0x100;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
430
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
431 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
432 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE(VAUDPLL, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
433
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
434 // Set AUDON bit of the PWRDNRG register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
435 regist = 0x100;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
436 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
437 l1s_dsp_com.dsp_ndb_ptr->d_togbr2 = ABB_L1_WRITE(TOGBR2, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
438 #endif
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
439 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
440 //Call back function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
441 BspTwl3029_I2C_Callback stereo_callbackFunc;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
442 //Set the call back function to be called after the Audio start
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
443 stereo_callbackFunc.callbackFunc = l1s_stereopath_callback ;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
444 stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_CONFIG;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
445 stereo_callbackFunc.i2cTransArrayPtr = &l1audio_i2cTransArray;
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 //call the Triton audio path start function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
448 if (BSP_TWL3029_RETURN_CODE_SUCCESS == bspTwl3029_Audio_Start_Stereopath(&stereo_callbackFunc))
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
449 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
450 l1s.abb_write_done = 1;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
451 };
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
452 #endif
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 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
455
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 /* l1s_stereopath_drv_stop_ABB() */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
458 /*-------------------------------------------------------*/
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 /* Parameters : none */
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 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
463 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
464 /* Description : ABB stop function */
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
467 void l1s_stereopath_drv_stop_ABB(void)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
468 {
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
469 #if (ANALOG == 3)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
470 UWORD16 regist;
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 // Reset AUDON bit of the PWRDNRG register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
473 regist = 0x80;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
474 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
475 l1s_dsp_com.dsp_ndb_ptr->d_togbr2 = ABB_L1_WRITE(TOGBR2, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
476
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
477 // Get VAUDPLL register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
478 regist = l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll >> 6;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
479 // PLL/I2S off
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
480 regist &= 0x2fd;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
481 ABB_Write_Register_on_page(PAGE1, VAUDPLL, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
482 // update DSP API
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
483 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE(VAUDPLL, regist);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
484 #endif
607
262fcce10859 gsm-fw/L1/audio_cfile/*.c: s/ANLG_FAM/ANALOG/
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents: 606
diff changeset
485 #if (ANALOG == 11)
606
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
486 //Call back function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
487 BspTwl3029_I2C_Callback stereo_callbackFunc;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
488
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
489 UWORD8 dl_control = 1; // OUTEN_DISABLE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
490
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
491 // Set the call back function to be called after the Audio start
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
492 stereo_callbackFunc.callbackFunc = l1s_stereopath_callback ;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
493 stereo_callbackFunc.callbackVal = L1S_TWL3029_STEROPATH_STOP;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
494 stereo_callbackFunc.i2cTransArrayPtr = &l1audio_i2cTransArray;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
495
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
496 if( (l1s.audio_state[L1S_AUDIO_DL_ONOFF_STATE] == L1_AUDIO_DL_ON) ||
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
497 (l1s.audio_state[L1S_AUDIO_DL_ONOFF_STATE] == L1_AUDIO_DL_SWITCHON_STARTED))
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 dl_control = 0; // OUTEN_ENABLE
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
500 }
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 //call the Triton audio path start function
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
503 if (BSP_TWL3029_RETURN_CODE_SUCCESS == bspTwl3029_Audio_Stop_Stereopath(&stereo_callbackFunc, dl_control))
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 l1s.abb_write_done = 1;
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
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
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
512 /* l1s_stereopath_drv_start_DMA() */
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 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
515 /* Parameters : d_dma_channel_parameter: DMA parameters */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
516 /* DMA_allocation: allocation of the DMA */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
517 /* (MCU/DSP) */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
518 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
519 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
520 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
521 /* Description : DMA config and start function */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
522 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
523 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
524 void l1s_stereopath_drv_start_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter,UWORD8 DMA_allocation)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
525 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
526 #if ((CHIPSET == 12) || (CHIPSET == 15))
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
527 #if (L1_MP3_SIX_BUFFER == 1)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
528 // allocate the DMA to the MCU
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
529 f_dma_channel_allocation_set(d_dma_channel_parameter.d_dma_channel_number, C_DMA_CHANNEL_ARM);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
530
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
531 // set parameters
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
532 f_dma_channel_parameter_set((T_DMA_TYPE_CHANNEL_PARAMETER *)&d_dma_channel_parameter);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
533 #else
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
534 // set parameters
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
535 f_dma_channel_parameter_set((T_DMA_TYPE_CHANNEL_PARAMETER *)&d_dma_channel_parameter);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
536
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
537 // allocate the DMA to the MCU
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
538 f_dma_channel_allocation_set(d_dma_channel_parameter.d_dma_channel_number, C_DMA_CHANNEL_ARM);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
539
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
540 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
541 // Enable the DMA channel
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
542 f_dma_channel_enable(d_dma_channel_parameter.d_dma_channel_number);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
543
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
544
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
545 // DMA allocation ?
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
546 if (DMA_allocation == AUDIO_SP_DMA_ALLOC_MCU)
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 // DMA is allocate to MCU, just unmask DMA IT
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
549 F_INTH_ENABLE_ONE_IT(C_INTH_DMA_IT);
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 // DMA is allocate to DSP, unmask API IT
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
554 F_INTH_ENABLE_ONE_IT(C_INTH_API_IT);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
555
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
556 // Re-allocate DMA to the DSP
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
557 f_dma_channel_allocation_set(d_dma_channel_parameter.d_dma_channel_number, C_DMA_CHANNEL_DSP);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
558 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
559 #endif
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
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
562 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
563 /* l1s_stereopath_drv_reset_DMA() */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
564 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
565 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
566 /* Parameters : d_dma_channel_parameter: DMA parameters */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
567 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
568 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
569 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
570 /* Description : DMA reset function */
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 void l1s_stereopath_drv_reset_DMA(T_DMA_TYPE_CHANNEL_PARAMETER d_dma_channel_parameter)
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 #if ((CHIPSET == 12) || (CHIPSET == 15))
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
576 // Allocate DMA to MCU
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
577 f_dma_channel_allocation_set(d_dma_channel_parameter.d_dma_channel_number, C_DMA_CHANNEL_ARM);
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 // Disable DMA channel
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
580 f_dma_channel_disable(d_dma_channel_parameter.d_dma_channel_number);
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 // Reset DMA channel
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
583 f_dma_channel_soft_reset(d_dma_channel_parameter.d_dma_channel_number);
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
584 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
585 }
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
589 /* l1s_stereopath_drv_reset_CPORT() */
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 /* Parameters : none */
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 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
595 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
596 /* Description : Cport reset function */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
597 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
598 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
599 void l1s_stereopath_drv_reset_CPORT(void)
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 #if ((CHIPSET == 12) || (CHIPSET == 15))
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
602 // init = 1 --> write ctrl register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
603 l1s_dsp_com.dsp_ndb_ptr->d_cport_init = (API) 0x0001;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
604 // set SW_RESET field to 1 to generate a software reset
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
605 l1s_dsp_com.dsp_ndb_ptr->d_cport_ctrl = (API) 0x0FFD;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
606 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
607 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
608
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
609 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
610 /* l1s_stereopath_drv_stop_CPORT() */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
611 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
612 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
613 /* Parameters : none */
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 /* Return : none */
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 /* Description : Cport stop function */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
618 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
619 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
620 void l1s_stereopath_drv_stop_CPORT(void)
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 #if (CHIPSET == 12) || (CHIPSET == 15)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
623 // init = 1 --> write ctrl register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
624 l1s_dsp_com.dsp_ndb_ptr->d_cport_init = (API) 0x0001;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
625 // Set EXT_MCLK_EN field to 1 to enable external clock
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
626 l1s_dsp_com.dsp_ndb_ptr->d_cport_ctrl = (API) 0x0000;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
627 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
628 }
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
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 /* l1s_stereopath_drv_config_CPORT() */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
633 /*-------------------------------------------------------*/
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 /* Parameters : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
636 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
637 /* Return : none */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
638 /* */
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
639 /* Description : Cport config function */
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
642 void l1s_stereopath_drv_config_CPORT(void)
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 #if (CHIPSET == 12) || (CHIPSET == 15)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
645 // init = 0x281F --> write cfr1,2,3,4 and ctrl register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
646 l1s_dsp_com.dsp_ndb_ptr->d_cport_init = (API) 0x281F;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
647 // 2 timeslots per frame, I2S mode
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
648 // 20 CLK_BIT cycles, 16 data bits per time slot
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
649 l1s_dsp_com.dsp_ndb_ptr->a_cport_cfr[0] = (API) 0x0C0B;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
650 // one cycle delay, enable data serial output
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
651 // CSYNC signal generate with the negative edge of CSCLK
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
652 // clk direction set to input
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
653 // l1s_dsp_com.dsp_ndb_ptr->a_cport_cfr[1] = (API) 0xEB00;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
654 l1s_dsp_com.dsp_ndb_ptr->a_cport_cfr[1] = (API) 0xFB00; // L1_DSP-SPR-18866
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
655 // mask receive/transmit interrupt request
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
656 // Set threshold to 2 (nb of elements = 2)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
657 l1s_dsp_com.dsp_ndb_ptr->d_cport_ctrl = (API) 0x012C;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
658 #endif
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
659 }
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
660
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
663 /* l1s_stereopath_drv_start_CPORT() */
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 /* Parameters : none */
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 /* Return : none */
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 /* Description : Cport start function */
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 /*-------------------------------------------------------*/
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
673 void l1s_stereopath_drv_start_CPORT(void)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
674 {
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
675 #if (CHIPSET == 12) || (CHIPSET == 15)
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
676 // init = 0x20 --> write tcl_tadt register
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
677 l1s_dsp_com.dsp_ndb_ptr->d_cport_init = (API) 0x0020;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
678 // CPEN = 1 --> cport enable
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
679 l1s_dsp_com.dsp_ndb_ptr->d_cport_tcl_tadt = (API) 0x0800;
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
680 #endif
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
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
683 #endif // L1_STEREOPATH && CODE_VERSION
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
684
c5286d24539e gsm-fw/L1/audio_cfile: initial import from LoCosto source
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff changeset
685 #endif // AUDIO_TASK