annotate chipsetsw/layer1/audio_cfile/l1audio_abb.c @ 259:539abdacabf0

g23m/copyblobs.sh: l1audio_async.obj deblobbed
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 Mar 2017 03:29:52 +0000
parents 3aa97c515334
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
2 * l1audio_abb.c
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
3 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
4 * Control audio
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
5 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
6 * Filename l1audio_abb.c
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
7 * Copyright 2003 (C) Texas Instruments
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
8 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
9 * Reference : S820, GACS001 (OMEGA) spec
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
10 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
11 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
12
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
13 #include "l1_macro.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
14 #include "l1_confg.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
15
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
16
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
17 #if (CODE_VERSION == NOT_SIMULATION)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
18
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
19 #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
20 #include "rv_general.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
21 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
22
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
23 #if (CODE_VERSION == SIMULATION)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
24 #include <string.h>
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
25 #include "l1_types.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
26 #include "sys_types.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
27 #include "l1_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
28 #include "l1_time.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
29 #if TESTMODE
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
30 #include "l1tm_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
31 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
32 #if (AUDIO_TASK == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
33 #include "l1audio_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
34 #include "l1audio_cust.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
35 #include "l1audio_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
36 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
37 #if (L1_GTT == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
38 #include "l1gtt_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
39 #include "l1gtt_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
40 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
41 #if (L1_DYN_DSP_DWNLD == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
42 #include "l1_dyn_dwl_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
43 #include "l1_dyn_dwl_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
44 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
45 #if (L1_MP3 == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
46 #include "l1mp3_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
47 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
48 #if (L1_MIDI == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
49 #include "l1midi_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
50 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
51 #if (L1_AAC == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
52 #include "l1aac_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
53 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
54 #include "l1_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
55 #include "l1_varex.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
56 #include "cust_os.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
57 #include "l1_msgty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
58 #include <stdio.h>
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
59 #include "sim_cfg.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
60 #include "sim_cons.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
61 #include "sim_def.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
62 #include "sim_var.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
63
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
64 #else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
65 #include <string.h>
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
66 #if (defined _WINDOWS && (OP_RIV_AUDIO == 1))
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
67 #define BOOL_FLAG
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
68 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
69 // Triton Audio ON/OFF Changes
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
70
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
71 #include "l1_types.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
72 #include "sys_types.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
73 #include "l1_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
74 #include "l1_time.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
75
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
76 #if TESTMODE
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
77 #include "l1tm_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
78 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
79 #if (AUDIO_TASK == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
80 #include "l1audio_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
81 #include "l1audio_cust.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
82 #include "l1audio_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
83 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
84 #if (L1_GTT == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
85 #include "l1gtt_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
86 #include "l1gtt_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
87 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
88 #if (L1_DYN_DSP_DWNLD == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
89 #include "l1_dyn_dwl_const.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
90 #include "l1_dyn_dwl_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
91 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
92 #if (L1_MP3 == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
93 #include "l1mp3_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
94 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
95 #if (L1_MIDI == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
96 #include "l1midi_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
97 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
98 #if (L1_AAC == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
99 #include "l1aac_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
100 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
101
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
102 #if (RF_FAM == 61)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
103 #include "l1_rf61.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
104 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
105
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
106 #include "l1_defty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
107 #include "l1_varex.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
108 #include "l1_msgty.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
109 #if (OP_RIV_AUDIO == 0)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
110 #include "cust_os.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
111 #include "tpudrv.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
112 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
113 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
114
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
115 #include "abb.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
116
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
117 #include "l1audio_abb.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
118
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
119 #if (ANLG_FAM == 11)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
120 #include "types.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
121 #include "bspTwl3029_I2c.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
122 #include "bspTwl3029_Aud_Map.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
123 #include "bspTwl3029_Audio.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
124 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
125
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
126 #if (CODE_VERSION == NOT_SIMULATION)&&(L1_AUDIO_MCU_ONOFF == 1)&&(CHIPSET == 15)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
127 void l1_audio_on_off_callback_fn(Uint8 callback_val);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
128 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
129 #include "l1audio_abb.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
130
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
131 #if ((CODE_VERSION == NOT_SIMULATION)&&(L1_AUDIO_MCU_ONOFF == 1)&&(OP_L1_STANDALONE == 1)&&(CHIPSET == 12))
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
132 #include "nucleus.h"
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
133 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
134
171
b6b3bda101c0 l1audio_abb.c: same fix for pre-Syren ABB as in the FreeCalypso/gcc tree
Mychaela Falconia <falcon@freecalypso.org>
parents: 170
diff changeset
135 #if (ANLG_FAM != 11)
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
136 extern T_L1S_DSP_COM l1s_dsp_com;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
137 extern void l1_audio_lim_partial_update();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
138
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
139
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
140 #define MAX_PGA_UL 24
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
141 #define MAX_PGA_DL 12
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
142 #define MAX_VOL_DL 249
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
143
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
144 static UWORD8 ABB_CurrentVolume = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
145
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
146 // Uplink PGA gain is coded on 5 bits, corresponding to -12 dB to +12 dB in 1dB steps
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
147 const UWORD8 ABB_uplink_PGA_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
148 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
149 0x10, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
150 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x11, 0x12, 0x13, 0x14, 0x15,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
151 0x16
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
152 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
153
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
154 // Downlink volume: mute, -24dB to 0dB in 6dB steps
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
155 const UWORD8 ABB_volume_control_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
156 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
157 0x05, 0x03, 0x04, 0x00, 0x06, 0x02
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
158 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
159
172
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
160 /*
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
161 * FreeCalypso: ABB_Read_DLGain() functions and the ABB_DL_volume_read_gain
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
162 * and ABB_DL_PGA_read_gain constant tables it uses are new in the LoCosto
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
163 * version of this module (even though the code seems to support classic
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
164 * ABBs, not LoCosto/Triton) and do not appear in our TCS211 binary object.
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
165 */
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
166
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
167 #define INCLUDE_ABB_READ_DLGAIN 0
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
168
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
169 #if INCLUDE_ABB_READ_DLGAIN
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
170 // Downlink volume gain read in unsigned Q15 (in VBDCTRL)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
171 const WORD16 ABB_DL_volume_read_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
172 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
173 0x2000 , // 0: -12 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
174 0 , // 1: Mute
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
175 0x8000 , // 2: 0 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
176 0x0800 , // 3: -24 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
177 0x1000 , // 4: -18 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
178 0 , // 5: Mute
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
179 0x4000 , // 6: -6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
180 0 , // 7: Mute
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
181 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
182
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
183 // Downlink PGA gain read in unsigned Q15 (in VBDCTRL)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
184 const WORD16 ABB_DL_PGA_read_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
185 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
186 0x4026 , // 0: - 6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
187 0x47FA , // 1: - 5 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
188 0x50C3 , // 2: - 4 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
189 0x5A9D , // 3: - 3 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
190 0x65AC , // 4: - 2 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
191 0x7214 , // 5: - 1 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
192 0x8000 , // 6: 0 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
193 0x8F9E , // 7: 1 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
194 0xA124 , // 8: 2 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
195 0xB4CE , // 9: 3 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
196 0xCADD , // 10: 4 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
197 0xE39E , // 11: 5 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
198 0xFF64 , // 12: 6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
199 0x4026 , // 13: - 6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
200 0x4026 , // 14: - 6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
201 0x4026 , // 15: - 6 dB
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
202 };
172
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
203 #endif /* INCLUDE_ABB_READ_DLGAIN */
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
204
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
205 // Downlink PGA gain is coded on 4 bits, corresponding to -6dB to 6dB in 1dB steps
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
206 const UWORD8 ABB_downlink_PGA_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
207 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
208 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
209 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
210 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
211
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
212 // Side tone level: mute, -23dB to +4dB in 3dB steps
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
213 const UWORD8 ABB_sidetone_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
214 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
215 0x08, 0x0D, 0x0C, 0x06, 0x02, 0x07,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
216 0x03, 0x00, 0x04, 0x01, 0x05
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
217 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
218
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
219 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
220 * ABB_Audio_Config
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
221 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
222 * Configuration of VBCTRL1 register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
223 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
224 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
225 void ABB_Audio_Config (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
226 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
227 #if (ANLG_FAM == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
228 l1s_dsp_com.dsp_ndb_ptr->d_vbctrl = ABB_L1_WRITE (VBCTRL, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
229 #elif ((ANLG_FAM == 2) || (ANLG_FAM == 3) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
230 l1s_dsp_com.dsp_ndb_ptr->d_vbctrl1 = ABB_L1_WRITE (VBCTRL1, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
231 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
232 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
233
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
234
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
235 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
236 * ABB_Audio_Config_2
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
237 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
238 * Configuration of VBCTRL2 register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
239 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
240 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
241 void ABB_Audio_Config_2 (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
242 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
243 #if ((ANLG_FAM == 2) || (ANLG_FAM == 3))
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
244 l1s_dsp_com.dsp_ndb_ptr->d_vbctrl2 = ABB_L1_WRITE (VBCTRL2, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
245 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
246 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
247
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
248
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
249 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
250 * ABB_Audio_Control
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
251 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
252 * Configuration of VAUDCTRL register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
253 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
254 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
255 void ABB_Audio_Control (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
256 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
257 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
258 l1s_dsp_com.dsp_ndb_ptr->d_vaud_cfg = ABB_L1_WRITE (VAUDCTRL, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
259 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
260 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
261
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
262
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
263 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
264 * ABB_Audio_On_Off
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
265 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
266 * Configuration of VAUOCTRL register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
267 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
268 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
269 void ABB_Audio_On_Off (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
270 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
271 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
272 l1s_dsp_com.dsp_ndb_ptr->d_vauo_onoff = ABB_L1_WRITE (VAUOCTRL, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
273 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
274 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
275
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
276
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
277 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
278 * ABB_Audio_Volume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
279 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
280 * Configuration of VAUSCTRL register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
281 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
282 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
283 void ABB_Audio_Volume (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
284 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
285 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
286 l1s_dsp_com.dsp_ndb_ptr->d_vaus_vol = ABB_L1_WRITE (VAUSCTRL, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
287 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
288 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
289
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
290
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
291 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
292 * ABB_Audio_PLL
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
293 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
294 * Configuration of VAUDPLL register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
295 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
296 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
297 void ABB_Audio_PLL (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
298 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
299 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
300 l1s_dsp_com.dsp_ndb_ptr->d_vaud_pll = ABB_L1_WRITE (VAUDPLL, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
301 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
302 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
303
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
304
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
305 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
306 * ABB_Audio_VBPop
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
307 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
308 * Configuration of VBPOP register
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
309 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
310 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
311 void ABB_Audio_VBPop (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
312 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
313 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
314 l1s_dsp_com.dsp_ndb_ptr->d_vbpop = ABB_L1_WRITE (VBPOP, data);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
315 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
316 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
317
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
318
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
319 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
320 * ABB_Audio_Delay_Init
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
321 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
322 * Configuration of the delay initialization for POP noise reduction
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
323 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
324 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
325 void ABB_Audio_Delay_Init (UWORD8 delay)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
326 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
327 #if (ANLG_FAM == 3)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
328 l1s_dsp_com.dsp_ndb_ptr->d_vau_delay_init = delay;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
329 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
330 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
331
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
332
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
333 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
334 * ABB_CAL_UlVolume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
335 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
336 * Uplink audio volume calibration
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
337 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
338 * Parameter : pga index - range 0..24
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
339 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
340 * When this function is called the Mute bit of VBUCTRL is set to zero
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
341 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
342 void ABB_CAL_UlVolume (UWORD8 pga_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
343 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
344 UWORD16 index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
345 API reg_state;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
346
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
347 index = pga_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
348 if (index > MAX_PGA_UL)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
349 index = MAX_PGA_UL; //clip
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
350
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
351 //mask side tone gain and the mute settings
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
352 reg_state = l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl &= 0xF800;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
353
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
354 l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl = reg_state |
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
355 ABB_L1_WRITE ( VBUCTRL,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
356 ABB_uplink_PGA_gain[index]);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
357 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
358
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
359 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
360 * ABB_CAL_DlVolume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
361 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
362 * Downlink audio volume calibration
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
363 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
364 * Parameter : volume - range 0 to 255, pga - range 0-12
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
365 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
366 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
367
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
368 void ABB_CAL_DlVolume (UWORD8 volume_index, UWORD8 pga_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
369 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
370 UWORD16 volume, pga;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
371 // Remember current volume for subsequent mute commands
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
372 ABB_CurrentVolume = volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
373
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
374 // Normalize volume (0 to 5)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
375 if (volume_index > MAX_VOL_DL) volume_index=MAX_VOL_DL; //clip
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
376
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
377 if (volume_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
378 volume = (volume_index / 50) + 1;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
379 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
380 volume = volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
381
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
382 if (pga_index > MAX_PGA_DL) pga_index=MAX_PGA_DL; //clip
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
383 pga = pga_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
384
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
385
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
386 l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
387 ABB_L1_WRITE ( VBDCTRL,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
388 (ABB_volume_control_gain[volume] << 4) |
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
389 (ABB_downlink_PGA_gain[pga]) );
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
390
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
391 #if (L1_LIMITER == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
392 if (l1s_dsp_com.dsp_ndb_ptr->d_aqi_status & B_LIM_ENABLE)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
393 l1_audio_lim_partial_update();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
394 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
395 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
396
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
397 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
398 * ABB_DlVolume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
399 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
400 * Control Downlink audio volume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
401 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
402 * Parameter : volume - range 0 to 255
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
403 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
404 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
405
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
406 void ABB_DlVolume (UWORD8 volume_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
407 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
408 UWORD16 volume;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
409 API reg_state;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
410
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
411 // Remember current volume for subsequent mute commands
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
412 ABB_CurrentVolume = volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
413
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
414 // Normalize volume (0 to 5)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
415 if (volume_index > MAX_VOL_DL) volume_index=MAX_VOL_DL; //clip
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
416
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
417 if (volume_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
418 volume = (volume_index / 50) + 1;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
419 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
420 volume = volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
421
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
422 //mask PGA setting determined during calibration phase
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
423 reg_state = l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl &= 0x03c0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
424
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
425 l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl = reg_state |
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
426 ABB_L1_WRITE ( VBDCTRL,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
427 (ABB_volume_control_gain[volume] << 4));
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
428
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
429 #if (L1_LIMITER == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
430 if (l1s_dsp_com.dsp_ndb_ptr->d_aqi_status & B_LIM_ENABLE)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
431 l1_audio_lim_partial_update();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
432 #endif
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
433 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
434
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
435 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
436 * ABB_DlMute
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
437 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
438 * Mute downlink audio
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
439 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
440 * Parameter : Mute - On or Off
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
441 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
442 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
443
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
444 void ABB_DlMute (BOOL mute)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
445 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
446 UWORD8 current_volume;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
447
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
448 if (mute)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
449 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
450 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
451 * The current downlink volume must be memorized to avoid
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
452 * having 0 as the new current volume.
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
453 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
454
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
455 current_volume = ABB_CurrentVolume;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
456 ABB_DlVolume (0);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
457 ABB_CurrentVolume = current_volume;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
458 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
459 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
460 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
461 ABB_DlVolume (ABB_CurrentVolume);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
462 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
463 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
464
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
465 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
466 * ABB_UlMute
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
467 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
468 * Mute uplink audio
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
469 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
470 * Parameter : Mute - On or Off
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
471 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
472 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
473
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
474 void ABB_UlMute (BOOL mute)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
475 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
476 if (mute)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
477 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
478 l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl |=
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
479 ABB_L1_WRITE ( VBUCTRL,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
480 DXEN);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
481 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
482 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
483 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
484 l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl &= 0x7fff;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
485 l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl |= 0x01;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
486 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
487
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
488 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
489
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
490 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
491 * ABB_SideTone
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
492 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
493 * Control audio sidetone
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
494 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
495 * Parameter : volume - range 0 to 255
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
496 * nominal is 175 (-5dB)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
497 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
498 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
499
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
500 void ABB_SideTone (UWORD8 volume_index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
501 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
502 UWORD16 side_tone;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
503 API reg_state;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
504
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
505 // Normalize sidetone (0 to 10)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
506 side_tone = volume_index / 25;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
507
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
508 // mask uplink PGA gain and mute settings
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
509 reg_state = l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl &= 0x87c0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
510
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
511 l1s_dsp_com.dsp_ndb_ptr->d_vbuctrl = reg_state |
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
512 ABB_L1_WRITE (VBUCTRL,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
513 (ABB_sidetone_gain[side_tone] << 5));
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
514 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
515
172
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
516 #if INCLUDE_ABB_READ_DLGAIN
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
517 /*
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
518 * ABB_Read_DLVolume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
519 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
520 * Returns the last controlled ABB DL gain in unsigned Q15 format
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
521 * This value includes volume and PGA gain.
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
522 *
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
523 */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
524 UWORD16 ABB_Read_DLGain()
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
525 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
526
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
527 UWORD16 volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
528 UWORD16 pga_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
529
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
530 // Read last programmed volume
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
531 volume_index = (API)((l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl >> 10) & 0x7);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
532 pga_index = (API)((l1s_dsp_com.dsp_ndb_ptr->d_vbdctrl >> 6) & 0xF);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
533
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
534 // Convert volume into gain (dB)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
535 return((ABB_DL_volume_read_gain[volume_index] * ABB_DL_PGA_read_gain[pga_index]) >> 15);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
536 }
172
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
537 #endif /* INCLUDE_ABB_READ_DLGAIN */
3aa97c515334 l1audio_abb.c fully reconstructed, matches TCS211 object
Mychaela Falconia <falcon@freecalypso.org>
parents: 171
diff changeset
538 #endif /* classic ABBs */
170
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
539
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
540 #if (ANLG_FAM == 11)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
541 // Downlink volume gain read in unsigned Q15 (in VBDCTRL)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
542 const WORD16 L1_audio_abb_DL_volume_read_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
543 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
544 (WORD16)0x2000 , // 0: -12 dB //omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
545 (WORD16)0x0000 , // 1: Mute //omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
546 (WORD16)0x8000 , // 2: 0 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
547 (WORD16)0x0800 , // 3: -24 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
548 (WORD16)0x1000 , // 4: -18 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
549 (WORD16)0x0000 , // 5: Mute//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
550 (WORD16)0x4000 , // 6: -6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
551 (WORD16)0x0000 , // 7: Mute//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
552 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
553
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
554 // Downlink PGA gain read in unsigned Q15 (in VBDCTRL)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
555 const WORD16 L1_audio_abb_DL_PGA_read_gain[] =
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
556 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
557 (WORD16)0x4026 , // 0: - 6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
558 (WORD16) 0x47FA , // 1: - 5 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
559 (WORD16)0x50C3 , // 2: - 4 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
560 (WORD16)0x5A9D , // 3: - 3 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
561 (WORD16)0x65AC , // 4: - 2 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
562 (WORD16)0x7214 , // 5: - 1 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
563 (WORD16)0x8000 , // 6: 0 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
564 (WORD16)0x8F9E , // 7: 1 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
565 (WORD16)0xA124 , // 8: 2 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
566 (WORD16)0xB4CE , // 9: 3 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
567 (WORD16)0xCADD , // 10: 4 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
568 (WORD16)0xE39E , // 11: 5 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
569 (WORD16)0xFF64 , // 12: 6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
570 (WORD16)0x4026 , // 13: - 6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
571 (WORD16)0x4026 , // 14: - 6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
572 (WORD16)0x4026 , // 15: - 6 dB//omaps00090550
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
573 };
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
574
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
575 UWORD16 l1_audio_abb_Read_DLGain()
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
576 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
577
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
578 UWORD8 volume_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
579 UWORD8 pga_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
580 UWORD8 vdlgain;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
581
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
582 BspTwl3029_I2c_shadowRegRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
583 BSP_TWL_3029_MAP_AUDIO_VDLGAIN_OFFSET,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
584 &vdlgain);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
585
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
586 volume_index = ((vdlgain & 0x70) >> 4); // bits 4-6
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
587 pga_index = (vdlgain & 0x0f) ; //bits 0-3
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
588
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
589 // Convert volume into gain (dB)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
590 return((L1_audio_abb_DL_volume_read_gain[volume_index] * L1_audio_abb_DL_PGA_read_gain[pga_index]) >> 15);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
591 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
592
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
593 void ABB_Audio_On_Off (UWORD16 data)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
594 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
595
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
596 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
597 #endif // ANLG_FAM == 11
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
598
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
599 #endif // CODE_VERSION != SIMULATION
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
600
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
601 // Triton Audio ON/OFF Changes
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
602 #if (CODE_VERSION == SIMULATION)&&(L1_AUDIO_MCU_ONOFF == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
603
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
604 void l1_audio_abb_ul_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
605 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
606 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
607 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
608 void l1_audio_abb_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
609 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
610 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
611 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
612
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
613 void l1_audio_abb_ul_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
614 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
615 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
616 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
617
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
618 void l1_audio_abb_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
619 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
620 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
621 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
622
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
623 void l1_audio_abb_ul_off_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
624 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
625 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
626 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
627
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
628 void l1_audio_abb_ul_off_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
629 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
630 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
631 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
632
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
633 void l1_audio_abb_ul_on_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
634 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
635 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
636 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
637
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
638 void l1_audio_abb_ul_on_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
639 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
640 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
641 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
642
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
643 #endif // SIMULATION && L1_AUDIO_MCU_ONOFF
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
644
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
645 // Triton Audio ON/OFF Changes
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
646 #if ((CODE_VERSION == NOT_SIMULATION)&&(L1_AUDIO_MCU_ONOFF == 1)&&(OP_L1_STANDALONE == 1)&&(CHIPSET == 12))
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
647
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
648 void(*cb_array[3])(void);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
649 SYS_UWORD16 vauoctrl_status;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
650 extern NU_TIMER l1_audio_abb_ul_timer;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
651 extern NU_TIMER l1_audio_abb_dl_timer;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
652 extern NU_TIMER l1_audio_abb_ul_dl_timer;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
653
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
654 void l1_audio_abb_ul_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
655 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
656 SYS_UWORD16 reg;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
657 reg = ABB_Read_Register_on_page(PAGE1, VBUCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
658 ABB_Write_Register_on_page(PAGE1, VBUCTRL, reg|0x0200);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
659 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0002);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
660 cb_array[0]=callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
661 NU_Control_Timer(&l1_audio_abb_ul_timer, NU_ENABLE_TIMER);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
662 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
663 void l1_audio_abb_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
664 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
665 vauoctrl_status = ABB_Read_Register_on_page(PAGE1, VAUOCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
666 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, 0x0000);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
667 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0008);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
668 cb_array[1]=callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
669 NU_Control_Timer(&l1_audio_abb_dl_timer, NU_ENABLE_TIMER);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
670 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
671
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
672 void l1_audio_abb_ul_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
673 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
674 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0001);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
675 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
676 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
677
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
678 void l1_audio_abb_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
679 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
680 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0004);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
681 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
682 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
683
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
684 void l1_audio_abb_ul_off_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
685 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
686 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0001|0x0004);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
687 callback_fn();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
688 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
689
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
690 void l1_audio_abb_ul_off_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
691 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
692 vauoctrl_status = ABB_Read_Register_on_page(PAGE1, VAUOCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
693 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, 0x0000);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
694 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0008|0x0001);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
695 cb_array[1]=callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
696 NU_Control_Timer(&l1_audio_abb_dl_timer, NU_ENABLE_TIMER);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
697 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
698
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
699 void l1_audio_abb_ul_on_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
700 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
701 SYS_UWORD16 reg;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
702 reg = ABB_Read_Register_on_page(PAGE1, VBUCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
703 ABB_Write_Register_on_page(PAGE1, VBUCTRL, reg|0x0200);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
704 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0002|0x0004);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
705 cb_array[0]=callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
706 NU_Control_Timer(&l1_audio_abb_ul_timer, NU_ENABLE_TIMER);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
707 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
708
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
709 void l1_audio_abb_ul_on_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
710 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
711 SYS_UWORD16 reg;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
712 reg = ABB_Read_Register_on_page(PAGE1, VBUCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
713 vauoctrl_status = ABB_Read_Register_on_page(PAGE1, VAUOCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
714 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, 0x0000);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
715 ABB_Write_Register_on_page(PAGE1, VBUCTRL, reg|0x0200);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
716 ABB_Write_Register_on_page(PAGE0, TOGBR1, 0x0002|0x0008);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
717 cb_array[2]=callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
718 NU_Control_Timer(&l1_audio_abb_ul_dl_timer, NU_ENABLE_TIMER);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
719 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
720
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
721
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
722 void l1_audio_abb_onoff_timer_expiry(UNSIGNED index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
723 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
724 L1_trace_string("ON OFF Timer Expiry\r\n");
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
725 switch(index)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
726 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
727 case 0:
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
728 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
729 SYS_UWORD16 reg;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
730 reg = ABB_Read_Register_on_page(PAGE1, VBUCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
731 ABB_Write_Register_on_page(PAGE1, VBUCTRL, reg&0x01FF);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
732 cb_array[0]();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
733 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
734 break;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
735 case 1:
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
736 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
737 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, vauoctrl_status);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
738 cb_array[1]();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
739 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
740 break;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
741 case 2:
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
742 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
743 SYS_UWORD16 reg;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
744 reg = ABB_Read_Register_on_page(PAGE1, VBUCTRL);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
745 ABB_Write_Register_on_page(PAGE1, VBUCTRL, reg&0x01FF);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
746 ABB_Write_Register_on_page(PAGE1, VAUOCTRL, vauoctrl_status);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
747 cb_array[2]();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
748 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
749 break;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
750 default:
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
751 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
752 while(1);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
753 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
754 break;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
755 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
756 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
757 #endif // SIMULATION && L1_AUDIO_MCU_ONOFF
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
758
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
759 // Triton Audio ON/OFF Changes
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
760 #if (CODE_VERSION == NOT_SIMULATION)&&(L1_AUDIO_MCU_ONOFF == 1)&&(CHIPSET == 15)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
761
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
762 void(*cb_array[3])(void);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
763 UWORD8 cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
764
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
765 void l1_audio_abb_ul_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
766 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
767 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
768
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
769 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
770
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
771 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
772 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
773
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
774 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
775 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
776
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
777
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
778 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
779 AUDIO_DOWNLINK_NONE,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
780 ret, OUTEN_NONE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
781
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
782 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
783 void l1_audio_abb_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
784 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
785 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
786
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
787 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
788
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
789 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
790 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
791
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
792 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
793 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
794
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
795
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
796 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_NONE,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
797 AUDIO_DOWNLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
798 ret, OUTEN_NONE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
799
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
800 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
801
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
802 void l1_audio_abb_ul_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
803 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
804 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
805
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
806 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
807
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
808 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
809 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
810
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
811 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
812 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
813
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
814
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
815 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
816 AUDIO_DOWNLINK_NONE,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
817 ret, OUTEN_NONE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
818
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
819 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
820
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
821 void l1_audio_abb_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
822 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
823 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
824
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
825 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
826
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
827 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
828 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
829
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
830 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
831 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
832
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
833 // Configure the outen reg to 0 only when STEREOPATH_DRV_STATE is in IDLE STATE
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
834 if(l1s.audio_state[L1S_STEREOPATH_DRV_STATE] == 0)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
835 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
836 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_NONE,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
837 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
838 ret, OUTEN_DISABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
839 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
840 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
841 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
842 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_NONE,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
843 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
844 ret, OUTEN_ENABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
845 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
846
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
847 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
848
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
849 void l1_audio_abb_ul_off_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
850 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
851 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
852
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
853 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
854
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
855 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
856 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
857
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
858 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
859 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
860
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
861 // Configure the outen reg to 0 only when STEREOPATH_DRV_STATE is in IDLE STATE
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
862 if(l1s.audio_state[L1S_STEREOPATH_DRV_STATE] == 0)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
863 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
864 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
865 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
866 ret, OUTEN_DISABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
867 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
868 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
869 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
870 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
871 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
872 ret, OUTEN_ENABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
873 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
874
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
875 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
876
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
877 void l1_audio_abb_ul_off_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
878 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
879 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
880
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
881 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
882
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
883 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
884 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
885
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
886 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
887 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
888
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
889
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
890 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
891 AUDIO_DOWNLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
892 ret, OUTEN_NONE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
893 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
894
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
895 void l1_audio_abb_ul_on_dl_off_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
896 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
897 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
898
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
899 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
900
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
901 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
902 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
903
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
904 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
905 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
906
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
907 // Configure the outen reg to 0 only when STEREOPATH_DRV_STATE is in IDLE STATE
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
908 if(l1s.audio_state[L1S_STEREOPATH_DRV_STATE] == 0)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
909 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
910 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
911 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
912 ret, OUTEN_DISABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
913 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
914 else
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
915 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
916 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
917 AUDIO_DOWNLINK_OFF,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
918 ret, OUTEN_ENABLE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
919 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
920
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
921 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
922
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
923 void l1_audio_abb_ul_on_dl_on_req ( void(*callback_fn)(void) )
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
924 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
925 T_AUDIO_ON_OFF_CONTROL_RETURN ret;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
926
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
927 cb_array[cb_index] = callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
928
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
929 ret.audio_on_off_callback = l1_audio_on_off_callback_fn;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
930 ret.callback_val = cb_index;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
931
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
932 cb_index++;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
933 if(cb_index == 3)cb_index = 0;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
934
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
935
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
936 bspTwl3029_audio_on_off_control (AUDIO_UPLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
937 AUDIO_DOWNLINK_ON,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
938 ret, OUTEN_NONE);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
939 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
940
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
941
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
942 void l1_audio_on_off_callback_fn(Uint8 callback_val)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
943 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
944 cb_array[callback_val]();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
945 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
946
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
947 #endif // SIMULATION && L1_AUDIO_MCU_ONOFF
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
948
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
949 #if (AUDIO_DEBUG == 1)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
950 /*-------------------------------------------------------*/
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
951 /* l1_audio_regs_debug_read */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
952 /*-------------------------------------------------------*/
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
953 /* Parameters : */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
954 /* Return : */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
955 /* */
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
956 /*-------------------------------------------------------*/
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
957 UWORD8 audio_reg_read_status;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
958 BspI2c_TransactionRequest audo_read_i2cIntTransArray[20];
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
959 BspTwl3029_I2C_RegData audio_regs[20];
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
960 UWORD8 audio_regs_cpy[20];
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
961 void l1_audio_reg_debug_read_callback();
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
962 void l1_audio_regs_debug_read()
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
963 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
964 BspTwl3029_I2C_RegisterInfo i2cRegArray[20];
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
965 BspTwl3029_I2C_RegisterInfo* i2cRegArrayPtr = i2cRegArray;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
966
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
967 BspTwl3029_I2C_Callback callback;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
968 BspTwl3029_I2C_CallbackPtr callbackPtr = &callback;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
969
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
970 callbackPtr->callbackFunc = (BspI2c_TransactionDoneCallback)l1_audio_reg_debug_read_callback;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
971 callbackPtr->callbackVal = (BspI2c_TransactionId)(1);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
972 callbackPtr->i2cTransArrayPtr = (Bsp_Twl3029_I2cTransReqArrayPtr)audo_read_i2cIntTransArray;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
973
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
974 if(audio_reg_read_status==0)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
975 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
976 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
977 BSP_TWL_3029_MAP_AUDIO_PWRONSTATUS_OFFSET,&audio_regs[0],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
978 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
979 BSP_TWL_3029_MAP_AUDIO_CTRL1_OFFSET,&audio_regs[1],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
980 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
981 BSP_TWL_3029_MAP_AUDIO_CTRL2_OFFSET,&audio_regs[2],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
982 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
983 BSP_TWL_3029_MAP_AUDIO_CTRL3_OFFSET,&audio_regs[3],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
984 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
985 BSP_TWL_3029_MAP_AUDIO_CTRL4_OFFSET,&audio_regs[4],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
986 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
987 BSP_TWL_3029_MAP_AUDIO_CTRL5_OFFSET,&audio_regs[5],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
988 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
989 BSP_TWL_3029_MAP_AUDIO_CTRL6_OFFSET,&audio_regs[6],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
990 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
991 BSP_TWL_3029_MAP_AUDIO_VULGAIN_OFFSET,&audio_regs[7],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
992 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
993 BSP_TWL_3029_MAP_AUDIO_VDLGAIN_OFFSET,&audio_regs[8],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
994 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
995 BSP_TWL_3029_MAP_AUDIO_OUTEN1_OFFSET,&audio_regs[9],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
996 BspTwl3029_I2c_regQueRead(BSP_TWL3029_I2C_AUD,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
997 BSP_TWL_3029_MAP_AUDIO_OUTEN2_OFFSET,&audio_regs[10],i2cRegArrayPtr++);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
998 i2cRegArrayPtr = i2cRegArray;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
999 BspTwl3029_I2c_regInfoSend(i2cRegArrayPtr,11,callbackPtr,
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1000 (BspI2c_TransactionRequest*)callbackPtr->i2cTransArrayPtr);
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1001 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1002 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1003
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1004 void l1_audio_reg_debug_read_callback()
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1005 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1006 int i;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1007 audio_reg_read_status=1;
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1008 for(i=0;i<20;i++)
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1009 {
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1010 audio_regs_cpy[i]=audio_regs[i];
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1011 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1012 }
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1013
2c2408ed5295 l1audio_abb.c: initial import of LoCosto source
Mychaela Falconia <falcon@freecalypso.org>
parents: 15
diff changeset
1014 #endif