14 #include <linux/module.h>
19 #include <mach/gpio.h>
21 #include "../codecs/wm8994.h"
23 #define MACHINE_NAME 0
24 #define CPU_VOICE_DAI 1
26 static const char *aquila_str[] = {
43 .pin =
"Headset Stereophone",
50 static struct snd_soc_jack_gpio jack_gpios[] = {
72 {
"Ext Left Spk",
NULL,
"SPKOUTLP"},
73 {
"Ext Left Spk",
NULL,
"SPKOUTLN"},
75 {
"Ext Right Spk",
NULL,
"SPKOUTRP"},
76 {
"Ext Right Spk",
NULL,
"SPKOUTRN"},
78 {
"Ext Rcv",
NULL,
"HPOUT2N"},
79 {
"Ext Rcv",
NULL,
"HPOUT2P"},
81 {
"Headset Stereophone",
NULL,
"HPOUT1L"},
82 {
"Headset Stereophone",
NULL,
"HPOUT1R"},
84 {
"IN1RN",
NULL,
"Headset Mic"},
85 {
"IN1RP",
NULL,
"Headset Mic"},
87 {
"IN1RN",
NULL,
"2nd Mic"},
88 {
"IN1RP",
NULL,
"2nd Mic"},
90 {
"IN1LN",
NULL,
"Main Mic"},
91 {
"IN1LP",
NULL,
"Main Mic"},
93 {
"IN2LN",
NULL,
"Radio In"},
94 {
"IN2RN",
NULL,
"Radio In"},
111 if (machine_is_aquila()) {
127 ret = snd_soc_jack_add_gpios(&jack,
ARRAY_SIZE(jack_gpios), jack_gpios);
140 unsigned int pll_out = 24000000;
171 .hw_params = goni_hifi_hw_params,
179 unsigned int pll_out = 24000000;
207 .name =
"goni-voice-dai",
222 .hw_params = goni_voice_hw_params,
228 .stream_name =
"WM8994 HiFi",
229 .cpu_dai_name =
"samsung-i2s.0",
230 .codec_dai_name =
"wm8994-aif1",
231 .platform_name =
"samsung-audio",
232 .codec_name =
"wm8994-codec.0-001a",
233 .init = goni_wm8994_init,
234 .ops = &goni_hifi_ops,
236 .name =
"WM8994 Voice",
237 .stream_name =
"Voice",
238 .cpu_dai_name =
"goni-voice-dai",
239 .codec_dai_name =
"wm8994-aif2",
240 .codec_name =
"wm8994-codec.0-001a",
241 .ops = &goni_voice_ops,
248 .dai_link = goni_dai,
251 .dapm_widgets = goni_dapm_widgets,
252 .num_dapm_widgets =
ARRAY_SIZE(goni_dapm_widgets),
253 .dapm_routes = goni_dapm_routes,
254 .num_dapm_routes =
ARRAY_SIZE(goni_dapm_routes),
257 static int __init goni_init(
void)
261 if (machine_is_aquila()) {
265 }
else if (!machine_is_goni())
269 if (!goni_snd_device)
279 platform_set_drvdata(goni_snd_device, &goni);
290 static void __exit goni_exit(
void)