Improve insert of playlists. Decode M3U files using current code page and strip any...
[kugel-rb.git] / firmware / export / audiohw.h
blob9da1a3875f7b9a33b4d92657554fb7e36d06dfe5
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Christian Gmeiner
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _AUDIOHW_H_
21 #define _AUDIOHW_H_
23 #include "config.h"
24 #include <stdbool.h>
26 #ifdef HAVE_UDA1380
27 #include "uda1380.h"
28 #elif defined(HAVE_WM8751)
29 #include "wm8751.h"
30 #elif defined(HAVE_WM8975) || defined(HAVE_WM8978)
31 #include "wm8975.h"
32 #elif defined(HAVE_WM8758)
33 #include "wm8758.h"
34 #elif defined(HAVE_WM8721)
35 #include "wm8721.h"
36 #elif defined(HAVE_WM8731)
37 #include "wm8731.h"
38 #elif defined(HAVE_TLV320)
39 #include "tlv320.h"
40 #elif defined(HAVE_AS3514)
41 #include "as3514.h"
42 #elif defined(HAVE_MAS35XX)
43 #include "mas35xx.h"
44 #endif
46 enum {
47 SOUND_VOLUME = 0,
48 SOUND_BASS,
49 SOUND_TREBLE,
50 SOUND_BALANCE,
51 SOUND_CHANNELS,
52 SOUND_STEREO_WIDTH,
53 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
54 SOUND_LOUDNESS,
55 SOUND_AVC,
56 SOUND_MDB_STRENGTH,
57 SOUND_MDB_HARMONICS,
58 SOUND_MDB_CENTER,
59 SOUND_MDB_SHAPE,
60 SOUND_MDB_ENABLE,
61 SOUND_SUPERBASS,
62 #endif
63 #if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\
64 || defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8731) \
65 || defined(HAVE_AS3514) || defined(HAVE_WM8978)
66 SOUND_LEFT_GAIN,
67 SOUND_RIGHT_GAIN,
68 SOUND_MIC_GAIN,
69 #endif
72 enum Channel {
73 SOUND_CHAN_STEREO,
74 SOUND_CHAN_MONO,
75 SOUND_CHAN_CUSTOM,
76 SOUND_CHAN_MONO_LEFT,
77 SOUND_CHAN_MONO_RIGHT,
78 SOUND_CHAN_KARAOKE,
79 SOUND_CHAN_NUM_MODES,
82 struct sound_settings_info {
83 const char *unit;
84 int numdecimals;
85 int steps;
86 int minval;
87 int maxval;
88 int defaultval;
91 /* This struct is used by every driver to export its min/max/default values for
92 * its audio settings. Keep in mind that the order must be correct! */
93 extern const struct sound_settings_info audiohw_settings[];
95 /* All usable functions implemented by a audio codec drivers. Most of
96 * the function in sound settings are only called, when in audio codecs
97 * .h file suitable defines are added.
101 * Initialize audio codec to a well defined state.
103 void audiohw_init(void);
106 * Close audio codec.
108 void audiohw_close(void);
111 * Mute or enable sound.
112 * @param mute true or false
114 void audiohw_mute(bool mute);
116 #endif /* _AUDIOHW_H_ */