[SRU][R][PATCH 02/18] ASoC: sdw_utils: subtract the endpoint that is not present
Chris Chiu
chris.chiu at canonical.com
Tue Mar 17 05:21:47 UTC 2026
From: Bard Liao <yung-chuan.liao at linux.intel.com>
When asoc_sdw_count_sdw_endpoints() count the num_ends, it doesn't skip
the unpresented endpoints. But, asoc_sdw_parse_sdw_endpoints() will skip
the unpresented endpoints either by quirk or the SDCA function doesn't
show up the endpoint. The endpoint number mismatches between count and
parse and the machine driver will show up a warning about it.
Fixes: 26ee34d2f5c7 ("ASoC: sdw_utils: Add codec_conf for every DAI")
Closes: https://github.com/thesofproject/linux/issues/5620
Signed-off-by: Bard Liao <yung-chuan.liao at linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi at linux.intel.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda at amd.com>
Reviewed-by: Charles Keepax <ckeepax at opensource.cirrus.com>
Link: https://patch.msgid.link/20251212121112.3313017-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie at kernel.org>
(cherry picked from commit cb0ae6f22790ead71a866f94c7a5a70ad56af16a)
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
sound/soc/sdw_utils/soc_sdw_utils.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c
index 8e65ced38d9e..ff003e7df90d 100644
--- a/sound/soc/sdw_utils/soc_sdw_utils.c
+++ b/sound/soc/sdw_utils/soc_sdw_utils.c
@@ -1533,8 +1533,10 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
* endpoint check is not necessary
*/
if (dai_info->quirk &&
- !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk)))
+ !(dai_info->quirk_exclude ^ !!(dai_info->quirk & ctx->mc_quirk))) {
+ (*num_devs)--;
continue;
+ }
} else {
/* Check SDCA codec endpoint if there is no matching quirk */
ret = is_sdca_endpoint_present(dev, codec_info, adr_link, i, j);
@@ -1542,8 +1544,10 @@ int asoc_sdw_parse_sdw_endpoints(struct snd_soc_card *card,
return ret;
/* The endpoint is not present, skip */
- if (!ret)
+ if (!ret) {
+ (*num_devs)--;
continue;
+ }
}
dev_dbg(dev,
--
2.43.0
More information about the kernel-team
mailing list