Lines Matching +full:audio +full:- +full:tx

1 // SPDX-License-Identifier: GPL-2.0-only
23 #define KBL_DIALOG_CODEC_DAI "da7219-hifi"
24 #define MAX98927_CODEC_DAI "max98927-aif1"
25 #define MAX98927_DEV0_NAME "i2c-MX98927:00"
26 #define MAX98927_DEV1_NAME "i2c-MX98927:01"
28 #define MAX98373_CODEC_DAI "max98373-aif1"
29 #define MAX98373_DEV0_NAME "i2c-MX98373:00"
30 #define MAX98373_DEV1_NAME "i2c-MX98373:01"
66 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control()
67 struct snd_soc_card *card = dapm->card; in platform_clock_control()
73 dev_err(card->dev, "Codec dai not found; Unable to set/unset codec pll\n"); in platform_clock_control()
74 return -EIO; in platform_clock_control()
81 dev_err(card->dev, "can't set codec sysclk configuration\n"); in platform_clock_control()
89 dev_err(card->dev, "failed to stop PLL: %d\n", ret); in platform_clock_control()
94 dev_err(card->dev, "failed to start PLL: %d\n", ret); in platform_clock_control()
146 {"HDMI1", NULL, "hif5-0 Output"},
147 {"HDMI2", NULL, "hif6-0 Output"},
148 {"HDMI3", NULL, "hif7-0 Output"},
151 { "Left HiFi Playback", NULL, "ssp0 Tx" },
152 { "Right HiFi Playback", NULL, "ssp0 Tx" },
153 { "ssp0 Tx", NULL, "spk_out" },
167 { "hifi1", NULL, "iDisp1 Tx" },
168 { "iDisp1 Tx", NULL, "iDisp1_out" },
169 { "hifi2", NULL, "iDisp2 Tx" },
170 { "iDisp2 Tx", NULL, "iDisp2_out" },
171 { "hifi3", NULL, "iDisp3 Tx"},
172 { "iDisp3 Tx", NULL, "iDisp3_out"},
183 { "Playback", NULL, "ssp1 Tx" },
184 { "ssp1 Tx", NULL, "codec1_out" },
203 if (!strcmp(codec_dai->component->name, MAX98927_DEV0_NAME)) { in kabylake_ssp0_hw_params()
206 dev_err(runtime->dev, "DEV0 TDM slot err:%d\n", ret); in kabylake_ssp0_hw_params()
210 if (!strcmp(codec_dai->component->name, MAX98927_DEV1_NAME)) { in kabylake_ssp0_hw_params()
213 dev_err(runtime->dev, "DEV1 TDM slot err:%d\n", ret); in kabylake_ssp0_hw_params()
217 if (!strcmp(codec_dai->component->name, MAX98373_DEV0_NAME)) { in kabylake_ssp0_hw_params()
221 dev_err(runtime->dev, in kabylake_ssp0_hw_params()
226 if (!strcmp(codec_dai->component->name, MAX98373_DEV1_NAME)) { in kabylake_ssp0_hw_params()
230 dev_err(runtime->dev, in kabylake_ssp0_hw_params()
247 const char *name = codec_dai->component->name; in kabylake_ssp0_trigger()
248 struct snd_soc_component *component = codec_dai->component; in kabylake_ssp0_trigger()
260 codec_dai->component->name_prefix); in kabylake_ssp0_trigger()
268 dev_err(rtd->dev, "failed to enable %s: %d\n", in kabylake_ssp0_trigger()
279 dev_err(rtd->dev, "failed to disable %s: %d\n", in kabylake_ssp0_trigger()
325 return -EINVAL; in kabylake_ssp_fixup()
335 if (!strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Port") || in kabylake_ssp_fixup()
336 !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Headset Playback") || in kabylake_ssp_fixup()
337 !strcmp(rtd_dpcm->fe->dai_link->name, "Kbl Audio Capture Port")) { in kabylake_ssp_fixup()
338 rate->min = rate->max = 48000; in kabylake_ssp_fixup()
339 chan->min = chan->max = 2; in kabylake_ssp_fixup()
348 if (!strcmp(rtd_dpcm->be->dai_link->name, "SSP0-Codec")) in kabylake_ssp_fixup()
356 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_da7219_codec_init()
357 struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; in kabylake_da7219_codec_init()
359 struct snd_soc_card *card = rtd->card; in kabylake_da7219_codec_init()
363 ret = snd_soc_dapm_add_routes(&card->dapm, in kabylake_da7219_codec_init()
377 &ctx->kabylake_headset, in kabylake_da7219_codec_init()
381 dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret); in kabylake_da7219_codec_init()
385 jack = &ctx->kabylake_headset; in kabylake_da7219_codec_init()
386 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); in kabylake_da7219_codec_init()
387 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP); in kabylake_da7219_codec_init()
388 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); in kabylake_da7219_codec_init()
389 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); in kabylake_da7219_codec_init()
391 snd_soc_component_set_jack(component, &ctx->kabylake_headset, NULL); in kabylake_da7219_codec_init()
399 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); in kabylake_dmic_init()
401 dev_err(rtd->dev, "SoC DMIC - Ignore suspend failed %d\n", ret); in kabylake_dmic_init()
408 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); in kabylake_hdmi_init()
412 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL); in kabylake_hdmi_init()
414 return -ENOMEM; in kabylake_hdmi_init()
416 pcm->device = device; in kabylake_hdmi_init()
417 pcm->codec_dai = dai; in kabylake_hdmi_init()
419 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); in kabylake_hdmi_init()
442 struct snd_soc_component *component = asoc_rtd_to_cpu(rtd, 0)->component; in kabylake_da7219_fe_init()
482 struct snd_pcm_runtime *runtime = substream->runtime; in kbl_fe_startup()
488 * 16 bit audio in kbl_fe_startup()
491 runtime->hw.channels_max = DUAL_CHANNEL; in kbl_fe_startup()
495 runtime->hw.formats = SNDRV_PCM_FMTBIT_S16_LE; in kbl_fe_startup()
519 chan->min = chan->max = 2; in kabylake_dmic_fixup()
521 chan->min = chan->max = 4; in kabylake_dmic_fixup()
528 struct snd_pcm_runtime *runtime = substream->runtime; in kabylake_dmic_startup()
530 runtime->hw.channels_min = runtime->hw.channels_max = QUAD_CHANNEL; in kabylake_dmic_startup()
534 return snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_dmic_startup()
561 substream->runtime->hw.channels_max = 1; in kabylake_refcap_startup()
562 snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_refcap_startup()
566 return snd_pcm_hw_constraint_list(substream->runtime, 0, in kabylake_refcap_startup()
652 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00",
658 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", "dmic-hifi")));
663 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi1")));
668 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi2")));
673 DAILINK_COMP_ARRAY(COMP_CODEC("ehdaudio0D2", "intel-hdmi-hifi3")));
678 /* kabylake digital audio interface glue - connects codec <--> CPU */
682 .name = "Kbl Audio Port",
683 .stream_name = "Audio",
694 .name = "Kbl Audio Echo Reference cap",
702 .name = "Kbl Audio Reference cap",
712 .name = "Kbl Audio DMIC cap",
755 .name = "Kbl Audio Headset Playback",
756 .stream_name = "Headset Audio",
767 .name = "Kbl Audio Capture Port",
768 .stream_name = "Audio Record",
780 /* SSP0 - Codec */
781 .name = "SSP0-Codec",
795 /* SSP1 - Codec */
796 .name = "SSP1-Codec",
844 /* kabylake digital audio interface glue - connects codec <--> CPU */
848 .name = "Kbl Audio Port",
849 .stream_name = "Audio",
860 .name = "Kbl Audio Echo Reference cap",
868 .name = "Kbl Audio Reference cap",
878 .name = "Kbl Audio DMIC cap",
923 /* SSP0 - Codec */
924 .name = "SSP0-Codec",
977 struct snd_soc_dapm_context *dapm = &card->dapm; in kabylake_card_late_probe()
982 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { in kabylake_card_late_probe()
983 component = pcm->codec_dai->component; in kabylake_card_late_probe()
985 "HDMI/DP, pcm=%d Jack", pcm->device); in kabylake_card_late_probe()
992 err = hdac_hdmi_jack_init(pcm->codec_dai, pcm->device, in kabylake_card_late_probe()
1001 return -EINVAL; in kabylake_card_late_probe()
1004 err = hdac_hdmi_jack_port_init(component, &card->dapm); in kabylake_card_late_probe()
1011 dev_err(card->dev, "failed to disable Left Spk: %d\n", err); in kabylake_card_late_probe()
1017 dev_err(card->dev, "failed to disable Right Spk: %d\n", err); in kabylake_card_late_probe()
1024 /* kabylake audio machine driver for SPT + DA7219 */
1043 /* kabylake audio machine driver for Maxim98927 */
1105 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in kabylake_audio_probe()
1107 return -ENOMEM; in kabylake_audio_probe()
1109 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); in kabylake_audio_probe()
1112 (struct snd_soc_card *)pdev->id_entry->driver_data; in kabylake_audio_probe()
1114 kbl_dai_link = kabylake_audio_card->dai_link; in kabylake_audio_probe()
1117 if (!strcmp(pdev->name, "kbl_da7219_max98373") || in kabylake_audio_probe()
1118 (!strcmp(pdev->name, "kbl_max98373"))) { in kabylake_audio_probe()
1119 for (i = 0; i < kabylake_audio_card->num_links; ++i) { in kabylake_audio_probe()
1120 if (strcmp(kbl_dai_link[i].name, "SSP0-Codec")) in kabylake_audio_probe()
1130 kabylake_audio_card->dev = &pdev->dev; in kabylake_audio_probe()
1133 return devm_snd_soc_register_card(&pdev->dev, kabylake_audio_card); in kabylake_audio_probe()
1173 MODULE_DESCRIPTION("Audio KabyLake Machine driver for MAX98927/MAX98373 & DA7219");