ASoC: Intel: sof_sdw_rt722_sdca: use rt_dmic_rtd_init

rt_dmic_rtd_init() can be used for rt722 dmic, too.

Reviewed-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240326160429.13560-28-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Bard Liao 2024-03-26 11:04:22 -05:00 committed by Mark Brown
parent 266c9b27cb
commit df19c6cd0f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
4 changed files with 2 additions and 16 deletions

View File

@ -917,7 +917,7 @@ static struct sof_sdw_codec_info codec_info_list[] = {
.dai_name = "rt722-sdca-aif3",
.dai_type = SOF_SDW_DAI_TYPE_MIC,
.dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID},
.rtd_init = rt722_sdca_dmic_rtd_init,
.rtd_init = rt_dmic_rtd_init,
},
},
.dai_num = 3,

View File

@ -183,7 +183,6 @@ int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt722_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd);
int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd);

View File

@ -59,17 +59,3 @@ int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd)
return ret;
}
int rt722_sdca_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_card *card = rtd->card;
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0);
struct snd_soc_component *component = codec_dai->component;
card->components = devm_kasprintf(card->dev, GFP_KERNEL,
"%s mic:%s",
card->components, component->name_prefix);
if (!card->components)
return -ENOMEM;
return 0;
}

View File

@ -15,6 +15,7 @@
static const char * const dmics[] = {
"rt715",
"rt712-sdca-dmic",
"rt722-sdca",
};
int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd)