Lines Matching +full:dmic +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright(c) 2017-18 Intel Corporation.
22 #include "../../codecs/da7219-aad.h"
24 #define KBL_DIALOG_CODEC_DAI "da7219-hifi"
56 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
57 struct snd_soc_card *card = dapm->card; in platform_clock_control()
63 dev_err(card->dev, "Codec dai not found; Unable to set/unset codec pll\n"); in platform_clock_control()
64 return -EIO; in platform_clock_control()
71 dev_err(card->dev, "failed to stop PLL: %d\n", ret); in platform_clock_control()
76 dev_err(card->dev, "failed to start PLL: %d\n", ret); in platform_clock_control()
92 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
109 { "DMic", NULL, "SoC DMIC" },
124 /* DMIC */
126 { "DMIC01 Rx", NULL, "DMIC AIF" },
149 rate->min = rate->max = 48000; in kabylake_ssp_fixup()
150 chan->min = chan->max = DUAL_CHANNEL; in kabylake_ssp_fixup()
161 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_da7219_codec_init()
162 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in kabylake_da7219_codec_init()
171 dev_err(rtd->dev, "can't set codec sysclk configuration\n"); in kabylake_da7219_codec_init()
182 &ctx->kabylake_headset, NULL, 0); in kabylake_da7219_codec_init()
184 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); in kabylake_da7219_codec_init()
188 jack = &ctx->kabylake_headset; in kabylake_da7219_codec_init()
190 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in kabylake_da7219_codec_init()
191 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in kabylake_da7219_codec_init()
192 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in kabylake_da7219_codec_init()
193 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in kabylake_da7219_codec_init()
194 da7219_aad_jack_det(component, &ctx->kabylake_headset); in kabylake_da7219_codec_init()
196 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); in kabylake_da7219_codec_init()
198 dev_err(rtd->dev, "SoC DMIC - Ignore suspend failed %d\n", ret); in kabylake_da7219_codec_init()
205 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_hdmi_init()
209 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in kabylake_hdmi_init()
211 return -ENOMEM; in kabylake_hdmi_init()
213 pcm->device = device; in kabylake_hdmi_init()
214 pcm->codec_dai = dai; in kabylake_hdmi_init()
216 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in kabylake_hdmi_init()
239 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in kabylake_da7219_fe_init()
279 struct snd_pcm_runtime *runtime = substream->runtime; in kbl_fe_startup()
288 runtime->hw.channels_max = DUAL_CHANNEL; in kbl_fe_startup()
292 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; in kbl_fe_startup()
316 chan->min = chan->max = 2; in kabylake_dmic_fixup()
318 chan->min = chan->max = 4; in kabylake_dmic_fixup()
325 struct snd_pcm_runtime *runtime = substream->runtime; in kabylake_dmic_startup()
327 runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL; in kabylake_dmic_startup()
331 return snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_dmic_startup()
345 SND_SOC_DAILINK_DEF(dmic,
346 DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin")));
366 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00",
372 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
378 "intel-hdmi-hifi1")));
383 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
388 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
393 /* kabylake digital audio interface glue - connects codec <--> CPU */
420 .name = "Kbl Audio DMIC cap",
427 SND_SOC_DAILINK_REG(dmic, dummy, platform),
465 /* SSP0 - Codec */
466 .name = "SSP0-Codec",
478 /* SSP1 - Codec */
479 .name = "SSP1-Codec",
535 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in kabylake_card_late_probe()
536 component = pcm->codec_dai->component; in kabylake_card_late_probe()
538 "HDMI/DP, pcm=%d Jack", pcm->device); in kabylake_card_late_probe()
546 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in kabylake_card_late_probe()
556 return -EINVAL; in kabylake_card_late_probe()
558 return hdac_hdmi_jack_port_init(component, &card->dapm); in kabylake_card_late_probe()
581 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in kabylake_audio_probe()
583 return -ENOMEM; in kabylake_audio_probe()
585 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in kabylake_audio_probe()
588 (struct snd_soc_card *)pdev->id_entry->driver_data; in kabylake_audio_probe()
590 kabylake_audio_card->dev = &pdev->dev; in kabylake_audio_probe()
592 return devm_snd_soc_register_card(&pdev->dev, kabylake_audio_card); in kabylake_audio_probe()
616 MODULE_DESCRIPTION("Audio Machine driver-DA7219 & MAX98357A in I2S mode");