Lines Matching +full:dai +full:- +full:links
1 // SPDX-License-Identifier: GPL-2.0+
11 #include <sound/soc-dapm.h>
45 struct snd_soc_card *card = rtd->card; in acp3x_5682_init()
47 struct snd_soc_component *component = codec_dai->component; in acp3x_5682_init()
49 dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name); in acp3x_5682_init()
51 /* set rt5682 dai fmt */ in acp3x_5682_init()
56 dev_err(rtd->card->dev, in acp3x_5682_init()
57 "Failed to set rt5682 dai fmt: %d\n", ret); in acp3x_5682_init()
65 dev_err(rtd->dev, "can't set rt5682 PLL: %d\n", ret); in acp3x_5682_init()
73 dev_err(rtd->dev, in acp3x_5682_init()
81 dev_err(rtd->dev, in acp3x_5682_init()
86 rt5682_dai_wclk = clk_get(component->dev, "rt5682-dai-wclk"); in acp3x_5682_init()
87 rt5682_dai_bclk = clk_get(component->dev, "rt5682-dai-bclk"); in acp3x_5682_init()
95 dev_err(card->dev, "HP jack creation failed %d\n", ret); in acp3x_5682_init()
106 dev_err(rtd->dev, "Headset Jack call-back failed: %d\n", ret); in acp3x_5682_init()
123 dev_err(rtd->dev, "can't enable wclk %d\n", ret); in rt5682_clk_enable()
133 struct snd_soc_pcm_runtime *rtd = substream->private_data; in acp3x_1015_hw_params()
141 if (strcmp(codec_dai->name, "rt1015-aif")) in acp3x_1015_hw_params()
183 struct snd_pcm_runtime *runtime = substream->runtime; in acp3x_5682_startup()
185 struct snd_soc_card *card = rtd->card; in acp3x_5682_startup()
188 machine->play_i2s_instance = I2S_SP_INSTANCE; in acp3x_5682_startup()
189 machine->cap_i2s_instance = I2S_SP_INSTANCE; in acp3x_5682_startup()
191 runtime->hw.channels_max = DUAL_CHANNEL; in acp3x_5682_startup()
201 struct snd_pcm_runtime *runtime = substream->runtime; in acp3x_max_startup()
203 struct snd_soc_card *card = rtd->card; in acp3x_max_startup()
206 machine->play_i2s_instance = I2S_BT_INSTANCE; in acp3x_max_startup()
208 runtime->hw.channels_max = DUAL_CHANNEL; in acp3x_max_startup()
219 struct snd_soc_card *card = rtd->card; in acp3x_ec_dmic0_startup()
223 machine->cap_i2s_instance = I2S_BT_INSTANCE; in acp3x_ec_dmic0_startup()
234 ucontrol->value.integer.value[0] = dmic_switch; in dmic_get()
242 dmic_switch = ucontrol->value.integer.value[0]; in dmic_set()
275 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00", "rt5682-aif1")));
281 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC1015:00", "rt1015-aif"),
282 COMP_CODEC("i2c-10EC1015:01", "rt1015-aif")));
291 .dlc = COMP_CODEC_CONF("i2c-10EC1015:00"),
295 .dlc = COMP_CODEC_CONF("i2c-10EC1015:01"),
302 .name = "acp3x-5682-play",
313 .name = "acp3x-max98357-play",
325 .name = "acp3x-ec-dmic0-capture",
465 match = acpi_match_device(dev->driver->acpi_match_table, dev); in soc_is_rltk_max()
468 return (void *)match->driver_data; in soc_is_rltk_max()
471 static void card_spk_dai_link_present(struct snd_soc_dai_link *links, in card_spk_dai_link_present() argument
475 links[1].codecs = rt1015; in card_spk_dai_link_present()
476 links[1].num_codecs = ARRAY_SIZE(rt1015); in card_spk_dai_link_present()
478 links[1].codecs = rt1015p; in card_spk_dai_link_present()
479 links[1].num_codecs = ARRAY_SIZE(rt1015p); in card_spk_dai_link_present()
481 links[1].codecs = max; in card_spk_dai_link_present()
482 links[1].num_codecs = ARRAY_SIZE(max); in card_spk_dai_link_present()
491 struct device *dev = &pdev->dev; in acp3x_probe()
495 return -ENODEV; in acp3x_probe()
497 machine = devm_kzalloc(&pdev->dev, sizeof(*machine), GFP_KERNEL); in acp3x_probe()
499 return -ENOMEM; in acp3x_probe()
501 card_spk_dai_link_present(card->dai_link, card->name); in acp3x_probe()
502 card->dev = &pdev->dev; in acp3x_probe()
506 dmic_sel = devm_gpiod_get(&pdev->dev, "dmic", GPIOD_OUT_LOW); in acp3x_probe()
508 dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n", in acp3x_probe()
513 ret = devm_snd_soc_register_card(&pdev->dev, card); in acp3x_probe()
515 return dev_err_probe(&pdev->dev, ret, in acp3x_probe()
517 card->name); in acp3x_probe()
532 .name = "acp3x-alc5682-max98357",