Lines Matching +full:hdmi +full:- +full:dp2
1 // SPDX-License-Identifier: GPL-2.0-only
16 #include <sound/soc-acpi.h>
20 #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi"
22 #define DMIC_CH(p) p->list[p->count-1]
52 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
53 struct snd_soc_card *card = dapm->card; in platform_clock_control()
59 dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n"); in platform_clock_control()
60 return -EIO; in platform_clock_control()
67 dev_err(card->dev, "set sysclk err = %d\n", ret); in platform_clock_control()
68 return -EIO; in platform_clock_control()
74 dev_err(card->dev, "set sysclk err = %d\n", ret); in platform_clock_control()
75 return -EIO; in platform_clock_control()
94 SND_SOC_DAPM_SPK("DP2", NULL),
112 /* HP jack connectors - unknown if we have jack detection */
158 rate->min = rate->max = 48000; in skylake_ssp_fixup()
159 chan->min = chan->max = 2; in skylake_ssp_fixup()
171 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in skylake_nau8825_codec_init()
183 dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret); in skylake_nau8825_codec_init()
189 snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); in skylake_nau8825_codec_init()
196 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi1_init()
200 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi1_init()
202 return -ENOMEM; in skylake_hdmi1_init()
204 pcm->device = SKL_DPCM_AUDIO_HDMI1_PB; in skylake_hdmi1_init()
205 pcm->codec_dai = dai; in skylake_hdmi1_init()
207 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi1_init()
214 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi2_init()
218 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi2_init()
220 return -ENOMEM; in skylake_hdmi2_init()
222 pcm->device = SKL_DPCM_AUDIO_HDMI2_PB; in skylake_hdmi2_init()
223 pcm->codec_dai = dai; in skylake_hdmi2_init()
225 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi2_init()
232 struct skl_nau8825_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi3_init()
236 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi3_init()
238 return -ENOMEM; in skylake_hdmi3_init()
240 pcm->device = SKL_DPCM_AUDIO_HDMI3_PB; in skylake_hdmi3_init()
241 pcm->codec_dai = dai; in skylake_hdmi3_init()
243 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi3_init()
251 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in skylake_nau8825_fe_init()
281 struct snd_pcm_runtime *runtime = substream->runtime; in skl_fe_startup()
290 runtime->hw.channels_max = 2; in skl_fe_startup()
294 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; in skl_fe_startup()
318 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret); in skylake_nau8825_hw_params()
334 chan->min = chan->max = 2; in skylake_dmic_fixup()
336 chan->min = chan->max = 4; in skylake_dmic_fixup()
363 struct snd_pcm_runtime *runtime = substream->runtime; in skylake_dmic_startup()
365 runtime->hw.channels_max = DMIC_CH(dmic_constraints); in skylake_dmic_startup()
369 return snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_dmic_startup()
397 substream->runtime->hw.channels_max = 1; in skylake_refcap_startup()
398 snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_refcap_startup()
402 return snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_refcap_startup()
440 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508825:00",
446 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
451 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
456 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
461 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
466 /* skylake digital audio interface glue - connects codec <--> CPU */
513 .name = "Skl HDMI Port1",
524 .name = "Skl HDMI Port2",
535 .name = "Skl HDMI Port3",
548 /* SSP0 - Codec */
549 .name = "SSP0-Codec",
561 /* SSP1 - Codec */
562 .name = "SSP1-Codec",
619 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in skylake_card_late_probe()
620 component = pcm->codec_dai->component; in skylake_card_late_probe()
622 "HDMI/DP, pcm=%d Jack", pcm->device); in skylake_card_late_probe()
630 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in skylake_card_late_probe()
639 return -EINVAL; in skylake_card_late_probe()
641 return hdac_hdmi_jack_port_init(component, &card->dapm); in skylake_card_late_probe()
665 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in skylake_audio_probe()
667 return -ENOMEM; in skylake_audio_probe()
669 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in skylake_audio_probe()
671 skylake_audio_card.dev = &pdev->dev; in skylake_audio_probe()
674 mach = pdev->dev.platform_data; in skylake_audio_probe()
676 dmic_constraints = mach->mach_params.dmic_num == 2 ? in skylake_audio_probe()
679 return devm_snd_soc_register_card(&pdev->dev, &skylake_audio_card); in skylake_audio_probe()
701 MODULE_DESCRIPTION("Audio Machine driver-NAU88L25 & MAX98357A in I2S mode");