17 #include <linux/module.h>
25 #include "../codecs/wm8750.h"
97 .hw_params = smartq_hifi_hw_params,
105 .pin =
"Internal Speaker",
110 static struct snd_soc_jack_gpio smartq_jack_gpios[] = {
113 .name =
"headphone detect",
115 .debounce_time = 200,
141 {
"Headphone Jack",
NULL,
"LOUT2"},
142 {
"Headphone Jack",
NULL,
"ROUT2"},
144 {
"Internal Speaker",
NULL,
"LOUT2"},
145 {
"Internal Speaker",
NULL,
"ROUT2"},
147 {
"Mic Bias",
NULL,
"Internal Mic"},
148 {
"LINPUT2",
NULL,
"Mic Bias"},
179 err = snd_soc_jack_add_gpios(&smartq_jack,
189 .stream_name =
"SmartQ Hi-Fi",
190 .cpu_dai_name =
"samsung-i2s.0",
191 .codec_dai_name =
"wm8750-hifi",
192 .platform_name =
"samsung-audio",
193 .codec_name =
"wm8750.0-0x1a",
194 .init = smartq_wm8987_init,
195 .ops = &smartq_hifi_ops,
202 .dai_link = smartq_dai,
205 .dapm_widgets = wm8987_dapm_widgets,
206 .num_dapm_widgets =
ARRAY_SIZE(wm8987_dapm_widgets),
207 .dapm_routes = audio_map,
209 .controls = wm8987_smartq_controls,
210 .num_controls =
ARRAY_SIZE(wm8987_smartq_controls),
215 static int __init smartq_init(
void)
219 if (!machine_is_smartq7() && !machine_is_smartq5()) {
220 pr_info(
"Only SmartQ is supported by this ASoC driver\n");
225 if (!smartq_snd_device)
228 platform_set_drvdata(smartq_snd_device, &snd_soc_smartq);
239 dev_err(&smartq_snd_device->
dev,
"Failed to register GPK12\n");
240 goto err_unregister_device;
246 dev_err(&smartq_snd_device->
dev,
"Failed to configure GPK12\n");
247 goto err_free_gpio_amp_shut;
252 err_free_gpio_amp_shut:
254 err_unregister_device:
260 static void __exit smartq_exit(
void)
263 snd_soc_jack_free_gpios(&smartq_jack,
ARRAY_SIZE(smartq_jack_gpios),