Commit 611ba05e authored by Ajit Kumar Pandey's avatar Ajit Kumar Pandey Committed by Mark Brown

ASoC: amd: acp: acp-legacy: Add DMIC dai link support for Renoir

Add DMIC related dai link for pdm-dmic dai on Renoir platform with
generic dmic codec dai.
Signed-off-by: default avatarAjit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220117115854.455995-6-AjitKumar.Pandey@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6a75585a
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
static struct acp_card_drvdata rt5682_rt1019_data = { static struct acp_card_drvdata rt5682_rt1019_data = {
.hs_cpu_id = I2S_SP, .hs_cpu_id = I2S_SP,
.amp_cpu_id = I2S_SP, .amp_cpu_id = I2S_SP,
.dmic_cpu_id = NONE, .dmic_cpu_id = DMIC,
.hs_codec_id = RT5682, .hs_codec_id = RT5682,
.amp_codec_id = RT1019, .amp_codec_id = RT1019,
.dmic_codec_id = NONE, .dmic_codec_id = DMIC,
.gpio_spkr_en = EN_SPKR_GPIO_GB, .gpio_spkr_en = EN_SPKR_GPIO_GB,
}; };
......
...@@ -438,6 +438,8 @@ SND_SOC_DAILINK_DEF(sof_sp, ...@@ -438,6 +438,8 @@ SND_SOC_DAILINK_DEF(sof_sp,
DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-sp"))); DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-sp")));
SND_SOC_DAILINK_DEF(sof_dmic, SND_SOC_DAILINK_DEF(sof_dmic,
DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-dmic"))); DAILINK_COMP_ARRAY(COMP_CPU("acp-sof-dmic")));
SND_SOC_DAILINK_DEF(pdm_dmic,
DAILINK_COMP_ARRAY(COMP_CPU("acp-pdm-dmic")));
int acp_sofdsp_dai_links_create(struct snd_soc_card *card) int acp_sofdsp_dai_links_create(struct snd_soc_card *card)
{ {
...@@ -613,6 +615,25 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) ...@@ -613,6 +615,25 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card)
links[i].ops = &acp_card_maxim_ops; links[i].ops = &acp_card_maxim_ops;
links[i].init = acp_card_maxim_init; links[i].init = acp_card_maxim_init;
} }
i++;
}
if (drv_data->dmic_cpu_id == DMIC) {
links[i].name = "acp-dmic-codec";
links[i].id = DMIC_BE_ID;
if (drv_data->dmic_codec_id == DMIC) {
links[i].codecs = dmic_codec;
links[i].num_codecs = ARRAY_SIZE(dmic_codec);
} else {
/* Use dummy codec if codec id not specified */
links[i].codecs = dummy_codec;
links[i].num_codecs = ARRAY_SIZE(dummy_codec);
}
links[i].cpus = pdm_dmic;
links[i].num_cpus = ARRAY_SIZE(pdm_dmic);
links[i].platforms = platform_component;
links[i].num_platforms = ARRAY_SIZE(platform_component);
links[i].dpcm_capture = 1;
} }
card->dai_link = links; card->dai_link = links;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment