ASoC: intel: sof_sdw: Add simple DAI link creation helper
The code contains a fair amount of state tracking and one part of that is keeping track of which entry in the large global cpus snd_soc_dai_link_component array is currently in use. Add a helper function to allocate a simple DAI link, this simplifies the code slightly and moves us in the direction of eliminating the need for the large global cpus array. This does slightly increase the number of allocations done, but this is probe time and the code already does a large number of allocations so this increase is small over all. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915075611.1619548-3-yung-chuan.liao@linux.intel.comSigned-off-by: Mark Brown <broonie@kernel.org>
Showing
Please register or sign in to comment