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"
57 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
58 struct snd_soc_card *card = dapm->card; in platform_clock_control()
64 dev_err(card->dev, "Codec dai not found; Unable to set/unset codec pll\n"); in platform_clock_control()
65 return -EIO; in platform_clock_control()
72 dev_err(card->dev, "failed to stop PLL: %d\n", ret); in platform_clock_control()
77 dev_err(card->dev, "failed to start PLL: %d\n", ret); in platform_clock_control()
93 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
122 { "DMic", NULL, "SoC DMIC" },
124 {"HDMI1", NULL, "hif5-0 Output"},
125 {"HDMI2", NULL, "hif6-0 Output"},
126 {"HDMI3", NULL, "hif7-0 Output"},
138 /* DMIC */
140 { "DMIC01 Rx", NULL, "DMIC AIF" },
163 rate->min = rate->max = 48000; in kabylake_ssp_fixup()
164 chan->min = chan->max = DUAL_CHANNEL; in kabylake_ssp_fixup()
175 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_da7219_codec_init()
176 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in kabylake_da7219_codec_init()
185 dev_err(rtd->dev, "can't set codec sysclk configuration\n"); in kabylake_da7219_codec_init()
196 &ctx->kabylake_headset, in kabylake_da7219_codec_init()
200 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); in kabylake_da7219_codec_init()
204 jack = &ctx->kabylake_headset; in kabylake_da7219_codec_init()
206 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in kabylake_da7219_codec_init()
207 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in kabylake_da7219_codec_init()
208 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in kabylake_da7219_codec_init()
209 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in kabylake_da7219_codec_init()
210 da7219_aad_jack_det(component, &ctx->kabylake_headset); in kabylake_da7219_codec_init()
212 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); in kabylake_da7219_codec_init()
214 dev_err(rtd->dev, "SoC DMIC - Ignore suspend failed %d\n", ret); in kabylake_da7219_codec_init()
221 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_hdmi_init()
225 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in kabylake_hdmi_init()
227 return -ENOMEM; in kabylake_hdmi_init()
229 pcm->device = device; in kabylake_hdmi_init()
230 pcm->codec_dai = dai; in kabylake_hdmi_init()
232 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in kabylake_hdmi_init()
255 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in kabylake_da7219_fe_init()
295 struct snd_pcm_runtime *runtime = substream->runtime; in kbl_fe_startup()
304 runtime->hw.channels_max = DUAL_CHANNEL; in kbl_fe_startup()
308 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; in kbl_fe_startup()
332 chan->min = chan->max = 2; in kabylake_dmic_fixup()
334 chan->min = chan->max = 4; in kabylake_dmic_fixup()
341 struct snd_pcm_runtime *runtime = substream->runtime; in kabylake_dmic_startup()
343 runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL; in kabylake_dmic_startup()
347 return snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_dmic_startup()
375 substream->runtime->hw.channels_max = 1; in kabylake_refcap_startup()
376 snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_refcap_startup()
380 return snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_refcap_startup()
398 SND_SOC_DAILINK_DEF(dmic,
399 DAILINK_COMP_ARRAY(COMP_CPU("DMIC Pin")));
419 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00",
425 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
431 "intel-hdmi-hifi1")));
436 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
441 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
446 /* kabylake digital audio interface glue - connects codec <--> CPU */
483 .name = "Kbl Audio DMIC cap",
490 SND_SOC_DAILINK_REG(dmic, dummy, platform),
528 /* SSP0 - Codec */
529 .name = "SSP0-Codec",
541 /* SSP1 - Codec */
542 .name = "SSP1-Codec",
598 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in kabylake_card_late_probe()
599 component = pcm->codec_dai->component; in kabylake_card_late_probe()
601 "HDMI/DP, pcm=%d Jack", pcm->device); in kabylake_card_late_probe()
608 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in kabylake_card_late_probe()
618 return -EINVAL; in kabylake_card_late_probe()
620 return hdac_hdmi_jack_port_init(component, &card->dapm); in kabylake_card_late_probe()
643 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in kabylake_audio_probe()
645 return -ENOMEM; in kabylake_audio_probe()
647 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in kabylake_audio_probe()
650 (struct snd_soc_card *)pdev->id_entry->driver_data; in kabylake_audio_probe()
652 kabylake_audio_card->dev = &pdev->dev; in kabylake_audio_probe()
654 return devm_snd_soc_register_card(&pdev->dev, kabylake_audio_card); in kabylake_audio_probe()
679 MODULE_DESCRIPTION("Audio Machine driver-DA7219 & MAX98357A in I2S mode");