]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Thu, 1 Aug 2024 11:18:12 +0000 (16:48 +0530)
committerMark Brown <broonie@kernel.org>
Thu, 1 Aug 2024 11:44:15 +0000 (12:44 +0100)
commit59f8b622d52e30c5be7f14212c26ca37e810ece9
treea108104ef6eea9bd3f7b0935e24d73525fdbf404
parent5bd414c7b80e39ef11bd86db76e726962c1bfc92
ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()

To make it generic, refactor existing implementation for
init_dai_link() and init_simple_dai_link() as mentioned below.
- Move init_dai_link() and init_simple_dai_link() to common place holder
- Rename the functions with "asoc_sdw" as prefix.
- Pass the platform specific 'platform_component' structure and its size as
arguments for init_simple_dai_link() function and allocate one more
extra dlc for platform component.
- Pass the 'platform_component' and 'num_platforms' as arguments for
init_dai_link().

Link: https://github.com/thesofproject/linux/pull/5068
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://patch.msgid.link/20240801111821.18076-6-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc_sdw_utils.h
sound/soc/intel/boards/sof_sdw.c
sound/soc/sdw_utils/soc_sdw_utils.c