ASoC: intel: sof_sdw: Merge codec_conf_alloc into dailink_info
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Mon, 31 Jul 2023 21:42:56 +0000 (16:42 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jul 2023 22:22:42 +0000 (23:22 +0100)
commita386162e7dc2c8bc1be2777b1c6d41156f69b210
treebb154e553966fe10c593e7a0af1d09f2f5deabd6
parent98a7a1143f83289a84cba6dab60a4531cc4dfae2
ASoC: intel: sof_sdw: Merge codec_conf_alloc into dailink_info

Rename get_sdw_dailink_info to simply get_dailink_info and have it also
return the number of codecs present. Then hoist the allocation of the
codec conf structure up into sof_card_dai_links_create. This saves an
extra loop through the adr_link array, allows us to get rid of
sof_card_codec_conf_alloc and makes the allocation more explicit.

Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230731214257.444605-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c