aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 04:25:22 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:16:41 -0500
commit0948e3c8bb187b3dea38be1e1ffd1797866014f1 (patch)
tree2ba279101be08d4f8b7e1e1261e79bfb4e520743 /include/sound
parentc8714ba160a498e249dbd32c637b85a1efa1013b (diff)
[ALSA] Clean up sa11xx-uda1341 driver
Modules: SA11xx UDA1341 driver,L3 drivers,UDA1341 Clean up sa11xx-uda1341 driver: - Fix buggy destructor - Remove the global variable - Move array definitions from uda1341.h - Make functions in uda1341.c static Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/uda1341.h107
1 files changed, 1 insertions, 106 deletions
diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h
index 61ff65a628bc..54a048ac6e4f 100644
--- a/include/sound/uda1341.h
+++ b/include/sound/uda1341.h
@@ -15,7 +15,7 @@
15 * features support 15 * features support
16 */ 16 */
17 17
18/* $Id: uda1341.h,v 1.6 2004/05/03 17:36:50 tiwai Exp $ */ 18/* $Id: uda1341.h,v 1.7 2005/11/17 10:25:22 tiwai Exp $ */
19 19
20#define UDA1341_ALSA_NAME "snd-uda1341" 20#define UDA1341_ALSA_NAME "snd-uda1341"
21 21
@@ -37,11 +37,6 @@ enum uda1341_onoff {
37 ON, 37 ON,
38}; 38};
39 39
40const char *onoff_names[] = {
41 "Off",
42 "On",
43};
44
45enum uda1341_format { 40enum uda1341_format {
46 I2S=0, 41 I2S=0,
47 LSB16, 42 LSB16,
@@ -53,17 +48,6 @@ enum uda1341_format {
53 LSB20MSB, 48 LSB20MSB,
54}; 49};
55 50
56const char *format_names[] = {
57 "I2S-bus",
58 "LSB 16bits",
59 "LSB 18bits",
60 "LSB 20bits",
61 "MSB",
62 "in LSB 16bits/out MSB",
63 "in LSB 18bits/out MSB",
64 "in LSB 20bits/out MSB",
65};
66
67enum uda1341_fs { 51enum uda1341_fs {
68 F512=0, 52 F512=0,
69 F384, 53 F384,
@@ -71,23 +55,11 @@ enum uda1341_fs {
71 Funused, 55 Funused,
72}; 56};
73 57
74const char *fs_names[] = {
75 "512*fs",
76 "384*fs",
77 "256*fs",
78 "Unused - bad value!",
79};
80
81enum uda1341_peak { 58enum uda1341_peak {
82 BEFORE=0, 59 BEFORE=0,
83 AFTER, 60 AFTER,
84}; 61};
85 62
86const char *peak_names[] = {
87 "before",
88 "after",
89};
90
91enum uda1341_filter { 63enum uda1341_filter {
92 FLAT=0, 64 FLAT=0,
93 MIN, 65 MIN,
@@ -95,24 +67,6 @@ enum uda1341_filter {
95 MAX, 67 MAX,
96}; 68};
97 69
98const char *filter_names[] = {
99 "flat",
100 "min",
101 "min",
102 "max",
103};
104
105const char*bass_values[][16] = {
106 {"0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB", "0 dB",
107 "0 dB", "0 dB", "0 dB", "0 dB", "undefined", }, //flat
108 {"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
109 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
110 {"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "18 dB",
111 "18 dB", "18 dB", "18 dB", "18 dB", "undefined",}, // min
112 {"0 dB", "2 dB", "4 dB", "6 dB", "8 dB", "10 dB", "12 dB", "14 dB", "16 dB", "18 dB", "20 dB",
113 "22 dB", "24 dB", "24 dB", "24 dB", "undefined",}, // max
114};
115
116enum uda1341_mixer { 70enum uda1341_mixer {
117 DOUBLE, 71 DOUBLE,
118 LINE, 72 LINE,
@@ -120,13 +74,6 @@ enum uda1341_mixer {
120 MIXER, 74 MIXER,
121}; 75};
122 76
123const char *mixer_names[] = {
124 "double differential",
125 "input channel 1 (line in)",
126 "input channel 2 (microphone)",
127 "digital mixer",
128};
129
130enum uda1341_deemp { 77enum uda1341_deemp {
131 NONE, 78 NONE,
132 D32, 79 D32,
@@ -134,58 +81,6 @@ enum uda1341_deemp {
134 D48, 81 D48,
135}; 82};
136 83
137const char *deemp_names[] = {
138 "none",
139 "32 kHz",
140 "44.1 kHz",
141 "48 kHz",
142};
143
144const char *mic_sens_value[] = {
145 "-3 dB", "0 dB", "3 dB", "9 dB", "15 dB", "21 dB", "27 dB", "not used",
146};
147
148const unsigned short AGC_atime[] = {
149 11, 16, 11, 16, 21, 11, 16, 21,
150};
151
152const unsigned short AGC_dtime[] = {
153 100, 100, 200, 200, 200, 400, 400, 400,
154};
155
156const char *AGC_level[] = {
157 "-9.0", "-11.5", "-15.0", "-17.5",
158};
159
160const char *ig_small_value[] = {
161 "-3.0", "-2.5", "-2.0", "-1.5", "-1.0", "-0.5",
162};
163
164/*
165 * this was computed as peak_value[i] = pow((63-i)*1.42,1.013)
166 *
167 * UDA1341 datasheet on page 21: Peak value (dB) = (Peak level - 63.5)*5*log2
168 * There is an table with these values [level]=value: [3]=-90.31, [7]=-84.29
169 * [61]=-2.78, [62] = -1.48, [63] = 0.0
170 * I tried to compute it, but using but even using logarithm with base either 10 or 2
171 * i was'n able to get values in the table from the formula. So I constructed another
172 * formula (see above) to interpolate the values as good as possible. If there is some
173 * mistake, please contact me on tomas.kasparek@seznam.cz. Thanks.
174 * UDA1341TS datasheet is available at:
175 * http://www-us9.semiconductors.com/acrobat/datasheets/UDA1341TS_3.pdf
176 */
177const char *peak_value[] = {
178 "-INF dB", "N.A.", "N.A", "90.31 dB", "N.A.", "N.A.", "N.A.", "-84.29 dB",
179 "-82.65 dB", "-81.13 dB", "-79.61 dB", "-78.09 dB", "-76.57 dB", "-75.05 dB", "-73.53 dB",
180 "-72.01 dB", "-70.49 dB", "-68.97 dB", "-67.45 dB", "-65.93 dB", "-64.41 dB", "-62.90 dB",
181 "-61.38 dB", "-59.86 dB", "-58.35 dB", "-56.83 dB", "-55.32 dB", "-53.80 dB", "-52.29 dB",
182 "-50.78 dB", "-49.26 dB", "-47.75 dB", "-46.24 dB", "-44.73 dB", "-43.22 dB", "-41.71 dB",
183 "-40.20 dB", "-38.69 dB", "-37.19 dB", "-35.68 dB", "-34.17 dB", "-32.67 dB", "-31.17 dB",
184 "-29.66 dB", "-28.16 dB", "-26.66 dB", "-25.16 dB", "-23.66 dB", "-22.16 dB", "-20.67 dB",
185 "-19.17 dB", "-17.68 dB", "-16.19 dB", "-14.70 dB", "-13.21 dB", "-11.72 dB", "-10.24 dB",
186 "-8.76 dB", "-7.28 dB", "-5.81 dB", "-4.34 dB", "-2.88 dB", "-1.43 dB", "0.00 dB",
187};
188
189enum uda1341_config { 84enum uda1341_config {
190 CMD_READ_REG = 0, 85 CMD_READ_REG = 0,
191 CMD_RESET, 86 CMD_RESET,