16 #include <linux/module.h>
18 #include "../codecs/wm8996.h"
19 #include "../codecs/wm9081.h"
21 #define WM8996_HPSEL_GPIO 214
22 #define MCLK_AUDIO_RATE (512 * 48000)
31 if (dapm->
dev != codec_dai->
dev)
44 pr_err(
"Failed to stop FLL\n");
63 if (dapm->
dev != codec_dai->
dev)
73 pr_err(
"Failed to start FLL\n");
100 .pin =
"Headset Mic",
106 static int speyside_jack_polarity;
111 if (speyside_jack_polarity && (
strcmp(source->
name,
"MICB1") == 0))
113 if (!speyside_jack_polarity && (
strcmp(source->
name,
"MICB2") == 0))
153 pr_err(
"Failed to request HP_SEL GPIO: %d\n", ret);
165 speyside_headset_pins);
169 wm8996_detect(codec, &speyside_headset, speyside_set_polarity);
174 static int speyside_late_probe(
struct snd_soc_card *card)
198 .stream_name =
"CPU-DSP",
199 .cpu_dai_name =
"samsung-i2s.0",
200 .codec_dai_name =
"wm0010-sdi1",
201 .platform_name =
"samsung-audio",
202 .codec_name =
"spi0.0",
203 .init = speyside_wm0010_init,
209 .stream_name =
"DSP-CODEC",
210 .cpu_dai_name =
"wm0010-sdi2",
211 .codec_dai_name =
"wm8996-aif1",
212 .codec_name =
"wm8996.1-001a",
213 .init = speyside_wm8996_init,
216 .params = &dsp_codec_params,
222 .cpu_dai_name =
"wm8996-aif2",
223 .codec_dai_name =
"wm1250-ev1",
224 .codec_name =
"wm1250-ev1.1-0027",
241 .codec_name =
"wm9081.1-006c",
242 .init = speyside_wm9081_init,
248 .dev_name =
"wm9081.1-006c",
249 .name_prefix =
"Sub",
273 {
"IN1RN",
NULL,
"MICB1" },
274 {
"IN1RP",
NULL,
"MICB1" },
275 {
"IN1RN",
NULL,
"MICB2" },
276 {
"IN1RP",
NULL,
"MICB2" },
277 {
"MICB1",
NULL,
"Headset Mic", speyside_get_micbias },
278 {
"MICB2",
NULL,
"Headset Mic", speyside_get_micbias },
280 {
"IN1LP",
NULL,
"MICB2" },
281 {
"IN1RN",
NULL,
"MICB1" },
282 {
"MICB2",
NULL,
"Main AMIC" },
284 {
"DMIC1DAT",
NULL,
"MICB1" },
285 {
"DMIC2DAT",
NULL,
"MICB1" },
286 {
"MICB1",
NULL,
"Main DMIC" },
288 {
"Headphone",
NULL,
"HPOUT1L" },
289 {
"Headphone",
NULL,
"HPOUT1R" },
291 {
"Sub IN1",
NULL,
"HPOUT2L" },
292 {
"Sub IN2",
NULL,
"HPOUT2R" },
294 {
"Main Speaker",
NULL,
"Sub SPKN" },
295 {
"Main Speaker",
NULL,
"Sub SPKP" },
296 {
"Main Speaker",
NULL,
"SPKDAT" },
302 .dai_link = speyside_dai,
304 .aux_dev = speyside_aux_dev,
306 .codec_conf = speyside_codec_conf,
307 .num_configs =
ARRAY_SIZE(speyside_codec_conf),
309 .set_bias_level = speyside_set_bias_level,
310 .set_bias_level_post = speyside_set_bias_level_post,
316 .dapm_routes = audio_paths,
318 .fully_routed =
true,
320 .late_probe = speyside_late_probe,
332 dev_err(&pdev->
dev,
"snd_soc_register_card() failed: %d\n",
355 .probe = speyside_probe,