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_WM8978)
32 #elif defined(HAVE_WM8975)
34 #elif defined(HAVE_WM8985)
36 #elif defined(HAVE_WM8758)
38 #elif defined(HAVE_WM8721)
40 #elif defined(HAVE_WM8731)
42 #elif defined(HAVE_TLV320)
44 #elif defined(HAVE_AS3514)
46 #elif defined(HAVE_MAS35XX)
48 #elif defined(HAVE_TSC2100)
59 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
69 #if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\
70 || defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8731) \
71 || defined(HAVE_AS3514) || defined(HAVE_WM8978) || defined(HAVE_WM8985)
76 #if defined(HAVE_WM8758) || defined(HAVE_WM8985)
87 SOUND_CHAN_MONO_RIGHT
,
92 struct sound_settings_info
{
101 /* This struct is used by every driver to export its min/max/default values for
102 * its audio settings. Keep in mind that the order must be correct! */
103 extern const struct sound_settings_info audiohw_settings
[];
105 /* All usable functions implemented by a audio codec drivers. Most of
106 * the function in sound settings are only called, when in audio codecs
107 * .h file suitable defines are added.
111 * Initialize audio codec to a well defined state.
113 void audiohw_init(void);
116 * Do initial audio codec setup.
118 void audiohw_preinit(void);
121 * Do some stuff (codec related) after audiohw_init that needs to be
122 * delayed such as enabling outputs to prevent popping. This lets
123 * other inits in the system complete in the meantime.
125 void audiohw_postinit(void);
130 void audiohw_close(void);
133 * Mute or enable sound.
134 * @param mute true or false.
136 void audiohw_mute(bool mute
);
139 * Silently en/disable audio output.
140 * @param enable true or false.
142 void audiohw_enable_output(bool enable
);
144 #ifdef HAVE_RECORDING
148 * @param source_mic if this is true, we want to record from microphone,
149 * else we want to record FM/LineIn.
151 void audiohw_enable_recording(bool source_mic
);
156 void audiohw_disable_recording(void);
159 * Set gain of recording source.
160 * @param left gain value.
161 * @param right will not be used if recording from micophone (mono).
162 * @param type AUDIO_GAIN_MIC, AUDIO_GAIN_LINEIN.
164 void audiohw_set_recvol(int left
, int right
, int type
);
167 * Enable or disable recording monitor.
168 * @param enable ture or false.
170 void audiohw_set_monitor(bool enable
);
172 #endif /*HAVE_RECORDING*/
175 #if CONFIG_CODEC != SWCODEC
177 /* functions which are only used by mas35xx codecs, but are also
178 aviable on SWCODECS through dsp */
181 * Set channel configuration.
182 * @param val new channel value (see enum Channel).
184 void audiohw_set_channel(int val
);
188 * @param val new stereo width value.
190 void audiohw_set_stereo_width(int val
);
192 #endif /* CONFIG_CODEC != SWCODEC */
194 #endif /* _AUDIOHW_H_ */