[SRU][R][PATCH 16/18] ASoC: SOF: Intel: use hdev->info.link_mask directly
Chris Chiu
chris.chiu at canonical.com
Tue Mar 17 05:22:01 UTC 2026
From: Bard Liao <yung-chuan.liao at linux.intel.com>
BugLink: https://bugs.launchpad.net/bugs/2139391
The link_mask variable is not changed after setting to
hdev->info.link_mask until it is used for another purpose to get the
used SoundWire links and set to mach->mach_params.links. Besides, the
link_mask variable should be reset before any link id is added to the
link_mask. To fix the issue above and avoid confusing, use the
hdev->info.link_mask variable directly to check if the SoundWire link
is enabled.
Fixes: 5226d19d4cae ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Bard Liao <yung-chuan.liao at linux.intel.com>
(cherry picked from commit 284e70ace9ecdeb8644fbe65c5da12c90b377545 linux-next)
Signed-off-by: Chris Chiu <chris.chiu at canonical.com>
---
sound/soc/sof/intel/hda.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index b401bf6482ba..b327a55f7d29 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1304,9 +1304,8 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
int i;
hdev = pdata->hw_pdata;
- link_mask = hdev->info.link_mask;
- if (!link_mask) {
+ if (!hdev->info.link_mask) {
dev_info(sdev->dev, "SoundWire links not enabled\n");
return NULL;
}
@@ -1337,7 +1336,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
* link_mask supported by hw and then go on searching
* link_adr
*/
- if (~link_mask & mach->link_mask)
+ if (~hdev->info.link_mask & mach->link_mask)
continue;
/* No need to match adr if there is no links defined */
--
2.43.0
More information about the kernel-team
mailing list