ASoC: Intel: sof_sdw: add common sdw dai link init
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 8 Feb 2024 16:55:38 +0000 (10:55 -0600)
committerMark Brown <broonie@kernel.org>
Thu, 8 Feb 2024 21:23:17 +0000 (21:23 +0000)
commit8266c73126b75eabbebefe7ce489a798e9ef2662
tree2bc4ef923815e003224baa25b3420f5d0863cbaf
parent7bc6ceba7d354564d6b49d23830fa9d366e8ed31
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>
14 files changed:
sound/soc/intel/boards/sof_sdw.c
sound/soc/intel/boards/sof_sdw_common.h
sound/soc/intel/boards/sof_sdw_cs42l42.c
sound/soc/intel/boards/sof_sdw_cs42l43.c
sound/soc/intel/boards/sof_sdw_cs_amp.c
sound/soc/intel/boards/sof_sdw_maxim.c
sound/soc/intel/boards/sof_sdw_rt5682.c
sound/soc/intel/boards/sof_sdw_rt700.c
sound/soc/intel/boards/sof_sdw_rt711.c
sound/soc/intel/boards/sof_sdw_rt712_sdca.c
sound/soc/intel/boards/sof_sdw_rt715.c
sound/soc/intel/boards/sof_sdw_rt715_sdca.c
sound/soc/intel/boards/sof_sdw_rt_amp.c
sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c