When setting a cache path also enable the cache implicitly.
[Rockbox.git] / firmware / export / mas35xx.h
blobdbe9d38a371103eea082816765f56630a43e88a3
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 #define AUDIOHW_CAPS (BASS_CAP | TREBLE_CAP)
29 #if CONFIG_CODEC == MAS3507D
30 #define VOLUME_MIN -780
31 #define VOLUME_MAX 180
32 #else
33 #define VOLUME_MIN -400
34 #define VOLUME_MAX 600
35 #endif
38 #if CONFIG_CODEC == MAS3507D
40 static const unsigned int bass_table[] =
42 0x9e400, /* -15dB */
43 0xa2800, /* -14dB */
44 0xa7400, /* -13dB */
45 0xac400, /* -12dB */
46 0xb1800, /* -11dB */
47 0xb7400, /* -10dB */
48 0xbd400, /* -9dB */
49 0xc3c00, /* -8dB */
50 0xca400, /* -7dB */
51 0xd1800, /* -6dB */
52 0xd8c00, /* -5dB */
53 0xe0400, /* -4dB */
54 0xe8000, /* -3dB */
55 0xefc00, /* -2dB */
56 0xf7c00, /* -1dB */
58 0x800, /* 1dB */
59 0x10000, /* 2dB */
60 0x17c00, /* 3dB */
61 0x1f800, /* 4dB */
62 0x27000, /* 5dB */
63 0x2e400, /* 6dB */
64 0x35800, /* 7dB */
65 0x3c000, /* 8dB */
66 0x42800, /* 9dB */
67 0x48800, /* 10dB */
68 0x4e400, /* 11dB */
69 0x53800, /* 12dB */
70 0x58800, /* 13dB */
71 0x5d400, /* 14dB */
72 0x61800 /* 15dB */
75 static const unsigned int treble_table[] =
77 0xb2c00, /* -15dB */
78 0xbb400, /* -14dB */
79 0xc1800, /* -13dB */
80 0xc6c00, /* -12dB */
81 0xcbc00, /* -11dB */
82 0xd0400, /* -10dB */
83 0xd5000, /* -9dB */
84 0xd9800, /* -8dB */
85 0xde000, /* -7dB */
86 0xe2800, /* -6dB */
87 0xe7e00, /* -5dB */
88 0xec000, /* -4dB */
89 0xf0c00, /* -3dB */
90 0xf5c00, /* -2dB */
91 0xfac00, /* -1dB */
93 0x5400, /* 1dB */
94 0xac00, /* 2dB */
95 0x10400, /* 3dB */
96 0x16000, /* 4dB */
97 0x1c000, /* 5dB */
98 0x22400, /* 6dB */
99 0x28400, /* 7dB */
100 0x2ec00, /* 8dB */
101 0x35400, /* 9dB */
102 0x3c000, /* 10dB */
103 0x42c00, /* 11dB */
104 0x49c00, /* 12dB */
105 0x51800, /* 13dB */
106 0x58400, /* 14dB */
107 0x5f800 /* 15dB */
110 static const unsigned int prescale_table[] =
112 0x80000, /* 0db */
113 0x8e000, /* 1dB */
114 0x9a400, /* 2dB */
115 0xa5800, /* 3dB */
116 0xaf400, /* 4dB */
117 0xb8000, /* 5dB */
118 0xbfc00, /* 6dB */
119 0xc6c00, /* 7dB */
120 0xcd000, /* 8dB */
121 0xd25c0, /* 9dB */
122 0xd7800, /* 10dB */
123 0xdc000, /* 11dB */
124 0xdfc00, /* 12dB */
125 0xe3400, /* 13dB */
126 0xe6800, /* 14dB */
127 0xe9400 /* 15dB */
129 #endif /*CONFIG_CODEC == MAS3507D*/
131 #endif /* _MAS35XX_H */