summaryrefslogtreecommitdiff
path: root/sound/soc/intel/boards/sof_sdw_cs_amp.c
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2024-02-08 10:55:38 -0600
committerMark Brown <broonie@kernel.org>2024-02-08 21:23:17 +0000
commit8266c73126b75eabbebefe7ce489a798e9ef2662 (patch)
tree2bc4ef923815e003224baa25b3420f5d0863cbaf /sound/soc/intel/boards/sof_sdw_cs_amp.c
parent7bc6ceba7d354564d6b49d23830fa9d366e8ed31 (diff)
ASoC: Intel: sof_sdw: add common sdw dai link init
Currently, we set sdw dai link .init callback in the codec_info_list's dais.init function. This works fine if all codecs in the dai link are the same. However, we need to do all the .init stuff for all different codecs in the dai link if not all codecs in the dai link are the same. Use a common dai link .init callback to call the new rtd_init callback in sof_sdw_dai_info{} to do rtd_init for each dai. Some codec init callback will become empty after this change. They will be removed in the follow up patch. Reviewed-by: Rander Wang <rander.wang@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://lore.kernel.org/r/20240208165545.93811-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_sdw_cs_amp.c')
-rw-r--r--sound/soc/intel/boards/sof_sdw_cs_amp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/sof_sdw_cs_amp.c b/sound/soc/intel/boards/sof_sdw_cs_amp.c
index f88c01552a92..56cf75bc6cc4 100644
--- a/sound/soc/intel/boards/sof_sdw_cs_amp.c
+++ b/sound/soc/intel/boards/sof_sdw_cs_amp.c
@@ -18,7 +18,7 @@ static const struct snd_soc_dapm_widget sof_widgets[] = {
SND_SOC_DAPM_SPK("Speakers", NULL),
};
-static int cs_spk_init(struct snd_soc_pcm_runtime *rtd)
+int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd)
{
const char *dai_name = rtd->dai_link->codecs->dai_name;
struct snd_soc_card *card = rtd->card;
@@ -67,7 +67,6 @@ int sof_sdw_cs_amp_init(struct snd_soc_card *card,
return 0;
info->amp_num++;
- dai_links->init = cs_spk_init;
return 0;
}