32 #include <linux/module.h>
34 #include <linux/kernel.h>
39 #include <linux/i2c.h>
49 #include <mach/hardware.h>
50 #include <mach/gpio.h>
52 #include "../codecs/wm8731.h"
56 #define MCLK_RATE 12000000
63 #undef ENABLE_MIC_INPUT
91 .hw_params = at91sam9g20ek_hw_params,
129 {
"Ext Spk",
NULL,
"LHPOUT"},
132 {
"MICIN",
NULL,
"Mic Bias"},
133 {
"Mic Bias",
NULL,
"Int Mic"},
147 "at91sam9g20ek_wm8731 "
148 ": at91sam9g20ek_wm8731_init() called\n");
167 #ifdef ENABLE_MIC_INPUT
181 .stream_name =
"WM8731 PCM",
182 .cpu_dai_name =
"atmel-ssc-dai.0",
183 .codec_dai_name =
"wm8731-hifi",
184 .init = at91sam9g20ek_wm8731_init,
185 .platform_name =
"atmel-pcm-audio",
186 .codec_name =
"wm8731.0-001b",
187 .ops = &at91sam9g20ek_ops,
191 .name =
"AT91SAMG20-EK",
193 .dai_link = &at91sam9g20ek_dai,
195 .set_bias_level = at91sam9g20ek_set_bias_level,
200 static int __init at91sam9g20ek_init(
void)
205 if (!(machine_is_at91sam9g20ek() || machine_is_at91sam9g20ek_2mmc()))
210 pr_err(
"Failed to set SSC 0 for audio: %d\n", ret);
240 if (!at91sam9g20ek_snd_device) {
246 platform_set_drvdata(at91sam9g20ek_snd_device,
247 &snd_soc_at91sam9g20ek);
266 static void __exit at91sam9g20ek_exit(
void)
269 at91sam9g20ek_snd_device =
NULL;