ASoC: SOF: Intel: fix iteration in is_endpoint_present()
authorMaciej Strozek <mstrozek@opensource.cirrus.com>
Thu, 2 Apr 2026 06:45:31 +0000 (14:45 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 6 Apr 2026 12:23:32 +0000 (13:23 +0100)
commit1de6ddcddc954a69f96b1c23205e03ddd603e3c8
treeb30dae40c3844a3ece7a24eeef7cc9d853a7ab35
parent86facd80a2a37536937f06de637abf9e8cabdb4b
ASoC: SOF: Intel: fix iteration in is_endpoint_present()

is_endpoint_present() iterates over sdca_data.num_functions, but checks
the dai_type according to codec info list, which will cause problems if
not all endpoints from the codec info list are present. Make sure the
type of actually present functions is compared against target dai_type.

Fixes: 5226d19d4cae ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260402064531.2287261-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c