Serial driver for imx31. Perhaps not 100% but maybe 80-90% (future developments will...
[kugel-rb.git] / firmware / export / mas35xx.h
blobd89b489182f18710d516d20c474c9fd7e51e49f2
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Implementation of MAS35xx audiohw api driver.
12 * Copyright (C) 2007 by Christian Gmeiner
14 * All files in this archive are subject to the GNU General Public License.
15 * See the file COPYING in the source tree root for full license agreement.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _MAS35XX_H
23 #define _MAS35XX_H
25 #include "config.h"
27 #if CONFIG_CODEC == MAS3507D
28 static const unsigned int bass_table[] =
30 0x9e400, /* -15dB */
31 0xa2800, /* -14dB */
32 0xa7400, /* -13dB */
33 0xac400, /* -12dB */
34 0xb1800, /* -11dB */
35 0xb7400, /* -10dB */
36 0xbd400, /* -9dB */
37 0xc3c00, /* -8dB */
38 0xca400, /* -7dB */
39 0xd1800, /* -6dB */
40 0xd8c00, /* -5dB */
41 0xe0400, /* -4dB */
42 0xe8000, /* -3dB */
43 0xefc00, /* -2dB */
44 0xf7c00, /* -1dB */
46 0x800, /* 1dB */
47 0x10000, /* 2dB */
48 0x17c00, /* 3dB */
49 0x1f800, /* 4dB */
50 0x27000, /* 5dB */
51 0x2e400, /* 6dB */
52 0x35800, /* 7dB */
53 0x3c000, /* 8dB */
54 0x42800, /* 9dB */
55 0x48800, /* 10dB */
56 0x4e400, /* 11dB */
57 0x53800, /* 12dB */
58 0x58800, /* 13dB */
59 0x5d400, /* 14dB */
60 0x61800 /* 15dB */
63 static const unsigned int treble_table[] =
65 0xb2c00, /* -15dB */
66 0xbb400, /* -14dB */
67 0xc1800, /* -13dB */
68 0xc6c00, /* -12dB */
69 0xcbc00, /* -11dB */
70 0xd0400, /* -10dB */
71 0xd5000, /* -9dB */
72 0xd9800, /* -8dB */
73 0xde000, /* -7dB */
74 0xe2800, /* -6dB */
75 0xe7e00, /* -5dB */
76 0xec000, /* -4dB */
77 0xf0c00, /* -3dB */
78 0xf5c00, /* -2dB */
79 0xfac00, /* -1dB */
81 0x5400, /* 1dB */
82 0xac00, /* 2dB */
83 0x10400, /* 3dB */
84 0x16000, /* 4dB */
85 0x1c000, /* 5dB */
86 0x22400, /* 6dB */
87 0x28400, /* 7dB */
88 0x2ec00, /* 8dB */
89 0x35400, /* 9dB */
90 0x3c000, /* 10dB */
91 0x42c00, /* 11dB */
92 0x49c00, /* 12dB */
93 0x51800, /* 13dB */
94 0x58400, /* 14dB */
95 0x5f800 /* 15dB */
98 static const unsigned int prescale_table[] =
100 0x80000, /* 0db */
101 0x8e000, /* 1dB */
102 0x9a400, /* 2dB */
103 0xa5800, /* 3dB */
104 0xaf400, /* 4dB */
105 0xb8000, /* 5dB */
106 0xbfc00, /* 6dB */
107 0xc6c00, /* 7dB */
108 0xcd000, /* 8dB */
109 0xd25c0, /* 9dB */
110 0xd7800, /* 10dB */
111 0xdc000, /* 11dB */
112 0xdfc00, /* 12dB */
113 0xe3400, /* 13dB */
114 0xe6800, /* 14dB */
115 0xe9400 /* 15dB */
117 #endif /*CONFIG_CODEC == MAS3507D*/
119 #endif /* _MAS35XX_H */