Lines Matching +full:hdmi +full:- +full:dp1
1 // SPDX-License-Identifier: GPL-2.0-only
18 #include <sound/soc-acpi.h>
24 #define SKL_NUVOTON_CODEC_DAI "nau8825-hifi"
25 #define SKL_SSM_CODEC_DAI "ssm4567-hifi"
26 #define DMIC_CH(p) p->list[p->count-1]
62 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
63 struct snd_soc_card *card = dapm->card; in platform_clock_control()
69 dev_err(card->dev, "Codec dai not found\n"); in platform_clock_control()
70 return -EIO; in platform_clock_control()
77 dev_err(card->dev, "set sysclk err = %d\n", ret); in platform_clock_control()
78 return -EIO; in platform_clock_control()
84 dev_err(card->dev, "set sysclk err = %d\n", ret); in platform_clock_control()
85 return -EIO; in platform_clock_control()
97 SND_SOC_DAPM_SPK("DP1", NULL),
116 /* HP jack connectors - unknown if we have jack detection */
161 .dlc = COMP_CODEC_CONF("i2c-INT343B:00"),
165 .dlc = COMP_CODEC_CONF("i2c-INT343B:01"),
190 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in skylake_nau8825_codec_init()
202 dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret); in skylake_nau8825_codec_init()
208 snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); in skylake_nau8825_codec_init()
215 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi1_init()
219 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi1_init()
221 return -ENOMEM; in skylake_hdmi1_init()
223 pcm->device = SKL_DPCM_AUDIO_HDMI1_PB; in skylake_hdmi1_init()
224 pcm->codec_dai = dai; in skylake_hdmi1_init()
226 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi1_init()
233 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi2_init()
237 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi2_init()
239 return -ENOMEM; in skylake_hdmi2_init()
241 pcm->device = SKL_DPCM_AUDIO_HDMI2_PB; in skylake_hdmi2_init()
242 pcm->codec_dai = dai; in skylake_hdmi2_init()
244 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi2_init()
252 struct skl_nau88125_private *ctx = snd_soc_card_get_drvdata(rtd->card); in skylake_hdmi3_init()
256 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in skylake_hdmi3_init()
258 return -ENOMEM; in skylake_hdmi3_init()
260 pcm->device = SKL_DPCM_AUDIO_HDMI3_PB; in skylake_hdmi3_init()
261 pcm->codec_dai = dai; in skylake_hdmi3_init()
263 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in skylake_hdmi3_init()
271 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in skylake_nau8825_fe_init()
301 struct snd_pcm_runtime *runtime = substream->runtime; in skl_fe_startup()
310 runtime->hw.channels_max = 2; in skl_fe_startup()
314 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; in skl_fe_startup()
337 rate->min = rate->max = 48000; in skylake_ssp_fixup()
338 chan->min = chan->max = 2; in skylake_ssp_fixup()
352 chan->min = chan->max = 2; in skylake_dmic_fixup()
354 chan->min = chan->max = 4; in skylake_dmic_fixup()
370 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret); in skylake_nau8825_hw_params()
401 struct snd_pcm_runtime *runtime = substream->runtime; in skylake_dmic_startup()
403 runtime->hw.channels_max = DMIC_CH(dmic_constraints); in skylake_dmic_startup()
407 return snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_dmic_startup()
435 substream->runtime->hw.channels_max = 1; in skylake_refcap_startup()
436 snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_refcap_startup()
440 return snd_pcm_hw_constraint_list(substream->runtime, 0, in skylake_refcap_startup()
474 /* Left */ COMP_CODEC("i2c-INT343B:00", SKL_SSM_CODEC_DAI),
475 /* Right */ COMP_CODEC("i2c-INT343B:01", SKL_SSM_CODEC_DAI)));
480 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10508825:00", SKL_NUVOTON_CODEC_DAI)));
485 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
490 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
495 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
500 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
505 /* skylake digital audio interface glue - connects codec <--> CPU */
552 .name = "Skl HDMI Port1",
563 .name = "Skl HDMI Port2",
574 .name = "Skl HDMI Port3",
587 /* SSP0 - Codec */
588 .name = "SSP0-Codec",
602 /* SSP1 - Codec */
603 .name = "SSP1-Codec",
660 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in skylake_card_late_probe()
661 component = pcm->codec_dai->component; in skylake_card_late_probe()
663 "HDMI/DP, pcm=%d Jack", pcm->device); in skylake_card_late_probe()
671 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in skylake_card_late_probe()
680 return -EINVAL; in skylake_card_late_probe()
682 return hdac_hdmi_jack_port_init(component, &card->dapm); in skylake_card_late_probe()
709 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in skylake_audio_probe()
711 return -ENOMEM; in skylake_audio_probe()
713 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in skylake_audio_probe()
715 skylake_audio_card.dev = &pdev->dev; in skylake_audio_probe()
718 mach = pdev->dev.platform_data; in skylake_audio_probe()
720 dmic_constraints = mach->mach_params.dmic_num == 2 ? in skylake_audio_probe()
723 return devm_snd_soc_register_card(&pdev->dev, &skylake_audio_card); in skylake_audio_probe()