]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: sdw_utils: Call init callbacks on the correct codec DAI
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Mon, 12 Jan 2026 14:07:57 +0000 (14:07 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jan 2026 13:35:18 +0000 (13:35 +0000)
commit5b027c74f3ee8979193c50d31187edfa31acc0db
tree5294d34ec383482f5fa16d945d96d3256a437cdd
parent1ddbcb910a06f53fc2b14e1743c6ad4ccfd7107f
ASoC: sdw_utils: Call init callbacks on the correct codec DAI

asoc_sdw_rtd_init() needs to call the rtd_init() callbacks for each
codec in a dailink. It was finding the codecs by looking for the
matching DAI name in codec_info_list[] but this isn't correct, because
the DAI name isn't guaranteed to be unique. Parts using the same codec
driver (so the same DAI names) might require different machine driver
setup.

Instead, get the struct sdw_slave and extract the SoundWire part ID.
Use this to lookup the entry in codec_info_list[]. This is the same
identity info that was used to find the entry when the machine driver
created the dailink.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: e377c9477317 ("ASoC: intel/sdw_utils: move soundwire codec_info_list structure")
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260112140758.215799-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sdw_utils/soc_sdw_utils.c