1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
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 ****************************************************************************/
28 #elif defined(HAVE_WM8751)
30 #elif defined(HAVE_WM8975) || defined(HAVE_WM8978)
32 #elif defined(HAVE_WM8985)
34 #elif defined(HAVE_WM8758)
36 #elif defined(HAVE_WM8721)
38 #elif defined(HAVE_WM8731)
40 #elif defined(HAVE_TLV320)
42 #elif defined(HAVE_AS3514)
44 #elif defined(HAVE_MAS35XX)
55 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
65 #if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\
66 || defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8731) \
67 || defined(HAVE_AS3514) || defined(HAVE_WM8978) || defined(HAVE_WM8985)
83 SOUND_CHAN_MONO_RIGHT
,
88 struct sound_settings_info
{
97 /* This struct is used by every driver to export its min/max/default values for
98 * its audio settings. Keep in mind that the order must be correct! */
99 extern const struct sound_settings_info audiohw_settings
[];
101 /* All usable functions implemented by a audio codec drivers. Most of
102 * the function in sound settings are only called, when in audio codecs
103 * .h file suitable defines are added.
107 * Initialize audio codec to a well defined state.
109 void audiohw_init(void);
112 * Do some stuff (codec related) after audiohw_init.
114 void audiohw_postinit(void);
119 void audiohw_close(void);
122 * Mute or enable sound.
123 * @param mute true or false.
125 void audiohw_mute(bool mute
);
128 * Silently en/disable audio output.
129 * @param enable true or false.
131 void audiohw_enable_output(bool enable
);
133 #ifdef HAVE_RECORDING
137 * @param source_mic if this is true, we want to record from microphone,
138 * else we want to record FM/LineIn.
140 void audiohw_enable_recording(bool source_mic
);
145 void audiohw_disable_recording(void);
148 * Set gain of recording source.
149 * @param left gain value.
150 * @param right will not be used if recording from micophone (mono).
151 * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN.
153 void audiohw_set_recvol(int left
, int right
, int type
);
156 * Enable or disable recording monitor.
157 * @param enable ture or false.
159 void audiohw_set_monitor(bool enable
);
161 #endif /*HAVE_RECORDING*/
163 #endif /* _AUDIOHW_H_ */