Lines Matching +full:codec +full:- +full:aif1 +full:- +full:bclk

1 // SPDX-License-Identifier: GPL-2.0+
3 // Machine driver for AMD ACP Audio engine using DA7219 & MAX98357 codec.
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()
56 dev_err(rtd->card->dev, in acp3x_5682_init()
61 /* set codec PLL */ in acp3x_5682_init()
65 dev_err(rtd->dev, "can't set rt5682 PLL: %d\n", ret); in acp3x_5682_init()
69 /* Set codec sysclk */ in acp3x_5682_init()
73 dev_err(rtd->dev, in acp3x_5682_init()
78 /* Set tdm/i2s1 master bclk ratio */ in acp3x_5682_init()
81 dev_err(rtd->dev, in acp3x_5682_init()
82 "Failed to set rt5682 tdm bclk ratio: %d\n", ret); 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()
185 struct snd_pcm_runtime *runtime = substream->runtime; in acp3x_5682_startup()
187 struct snd_soc_card *card = rtd->card; in acp3x_5682_startup()
190 machine->play_i2s_instance = I2S_SP_INSTANCE; in acp3x_5682_startup()
191 machine->cap_i2s_instance = I2S_SP_INSTANCE; in acp3x_5682_startup()
193 runtime->hw.channels_max = DUAL_CHANNEL; in acp3x_5682_startup()
203 struct snd_pcm_runtime *runtime = substream->runtime; in acp3x_max_startup()
205 struct snd_soc_card *card = rtd->card; in acp3x_max_startup()
208 machine->play_i2s_instance = I2S_BT_INSTANCE; in acp3x_max_startup()
210 runtime->hw.channels_max = DUAL_CHANNEL; in acp3x_max_startup()
221 struct snd_soc_card *card = rtd->card; in acp3x_ec_dmic0_startup()
225 machine->cap_i2s_instance = I2S_BT_INSTANCE; in acp3x_ec_dmic0_startup()
236 ucontrol->value.integer.value[0] = dmic_switch; in dmic_get()
244 dmic_switch = ucontrol->value.integer.value[0]; in dmic_set()
277 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")));
284 DAILINK_COMP_ARRAY(COMP_CODEC("GOOG0013:00", "EC Codec I2S RX")));
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",
428 match = acpi_match_device(dev->driver->acpi_match_table, dev); in soc_is_rltk_max()
431 return (void *)match->driver_data; in soc_is_rltk_max()
451 struct device *dev = &pdev->dev; in acp3x_probe()
455 return -ENODEV; in acp3x_probe()
457 machine = devm_kzalloc(&pdev->dev, sizeof(*machine), GFP_KERNEL); in acp3x_probe()
459 return -ENOMEM; in acp3x_probe()
461 card_spk_dai_link_present(card->dai_link, card->name); in acp3x_probe()
462 card->dev = &pdev->dev; in acp3x_probe()
466 dmic_sel = devm_gpiod_get(&pdev->dev, "dmic", GPIOD_OUT_LOW); in acp3x_probe()
468 dev_err(&pdev->dev, "DMIC gpio failed err=%ld\n", in acp3x_probe()
473 ret = devm_snd_soc_register_card(&pdev->dev, card); in acp3x_probe()
475 if (ret != -EPROBE_DEFER) in acp3x_probe()
476 dev_err(&pdev->dev, in acp3x_probe()
478 card->name, ret); in acp3x_probe()
480 dev_dbg(&pdev->dev, in acp3x_probe()
482 card->name, ret); in acp3x_probe()
497 .name = "acp3x-alc5682-max98357",