Lines Matching +full:dmic +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0-only
19 #include <sound/soc-acpi.h>
27 #define GLK_REALTEK_CODEC_DAI "rt5682-aif1"
70 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
77 /* HP jack connectors - unknown if we have jack detection */
88 { "DMic", NULL, "SoC DMIC" },
100 { "HDMI1", NULL, "hif5-0 Output" },
101 { "HDMI2", NULL, "hif6-0 Output" },
102 { "HDMI2", NULL, "hif7-0 Output" },
111 /* DMIC */
113 { "DMIC01 Rx", NULL, "DMIC AIF" },
126 rate->min = rate->max = 48000; in geminilake_ssp_fixup()
127 chan->min = chan->max = DUAL_CHANNEL; in geminilake_ssp_fixup()
138 struct glk_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); in geminilake_rt5682_codec_init()
139 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in geminilake_rt5682_codec_init()
147 dev_err(rtd->dev, "can't set codec pll: %d\n", ret); in geminilake_rt5682_codec_init()
155 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret); in geminilake_rt5682_codec_init()
161 ret = snd_soc_card_jack_new(rtd->card, "Headset Jack", in geminilake_rt5682_codec_init()
164 &ctx->geminilake_headset, NULL, 0); in geminilake_rt5682_codec_init()
166 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); in geminilake_rt5682_codec_init()
170 jack = &ctx->geminilake_headset; in geminilake_rt5682_codec_init()
172 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in geminilake_rt5682_codec_init()
173 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND); in geminilake_rt5682_codec_init()
174 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP); in geminilake_rt5682_codec_init()
175 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN); in geminilake_rt5682_codec_init()
180 dev_err(rtd->dev, "Headset Jack call-back failed: %d\n", ret); in geminilake_rt5682_codec_init()
197 dev_err(rtd->dev, "set TDM slot err:%d\n", ret); in geminilake_rt5682_hw_params()
210 struct glk_card_private *ctx = snd_soc_card_get_drvdata(rtd->card); in geminilake_hdmi_init()
214 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in geminilake_hdmi_init()
216 return -ENOMEM; in geminilake_hdmi_init()
218 pcm->device = GLK_DPCM_AUDIO_HDMI1_PB + dai->id; in geminilake_hdmi_init()
219 pcm->codec_dai = dai; in geminilake_hdmi_init()
221 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in geminilake_hdmi_init()
228 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in geminilake_rt5682_fe_init()
235 dev_err(rtd->dev, "Ref Cap ignore suspend failed %d\n", ret); in geminilake_rt5682_fe_init()
271 chan->min = chan->max = 4; in geminilake_dmic_fixup()
278 struct snd_pcm_runtime *runtime = substream->runtime; in geminilake_dmic_startup()
280 runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL; in geminilake_dmic_startup()
284 return snd_pcm_hw_constraint_list(substream->runtime, 0, in geminilake_dmic_startup()
303 return snd_pcm_hw_constraint_list(substream->runtime, 0, in geminilake_refcap_startup()
327 SND_SOC_DAILINK_DEF(dmic,
328 DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin")));
348 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00",
354 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
359 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
364 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
369 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
374 /* geminilake digital audio interface glue - connects codec <--> CPU */
426 .name = "Glk Audio DMIC cap",
433 SND_SOC_DAILINK_REG(dmic, dummy, platform),
470 /* SSP1 - Codec */
471 .name = "SSP1-Codec",
483 /* SSP2 - Codec */
484 .name = "SSP2-Codec",
541 if (list_empty(&ctx->hdmi_pcm_list)) in glk_card_late_probe()
542 return -EINVAL; in glk_card_late_probe()
544 if (ctx->common_hdmi_codec_drv) { in glk_card_late_probe()
545 pcm = list_first_entry(&ctx->hdmi_pcm_list, struct glk_hdmi_pcm, in glk_card_late_probe()
547 component = pcm->codec_dai->component; in glk_card_late_probe()
551 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in glk_card_late_probe()
552 component = pcm->codec_dai->component; in glk_card_late_probe()
554 "HDMI/DP, pcm=%d Jack", pcm->device); in glk_card_late_probe()
562 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in glk_card_late_probe()
570 return hdac_hdmi_jack_port_init(component, &card->dapm); in glk_card_late_probe()
597 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in geminilake_audio_probe()
599 return -ENOMEM; in geminilake_audio_probe()
601 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in geminilake_audio_probe()
604 card->dev = &pdev->dev; in geminilake_audio_probe()
608 mach = pdev->dev.platform_data; in geminilake_audio_probe()
609 platform_name = mach->mach_params.platform; in geminilake_audio_probe()
615 ctx->common_hdmi_codec_drv = mach->mach_params.common_hdmi_codec_drv; in geminilake_audio_probe()
617 return devm_snd_soc_register_card(&pdev->dev, card); in geminilake_audio_probe()
640 MODULE_DESCRIPTION("Geminilake Audio Machine driver-RT5682 & MAX98357A in I2S mode");