Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: SOF: Intel: use hdev->info.link_mask directly

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@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260203072405.3716307-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bard Liao and committed by
Mark Brown
284e70ac 10db9f68

+2 -3
+2 -3
sound/soc/sof/intel/hda.c
··· 1304 1304 int i; 1305 1305 1306 1306 hdev = pdata->hw_pdata; 1307 - link_mask = hdev->info.link_mask; 1308 1307 1309 - if (!link_mask) { 1308 + if (!hdev->info.link_mask) { 1310 1309 dev_info(sdev->dev, "SoundWire links not enabled\n"); 1311 1310 return NULL; 1312 1311 } ··· 1336 1337 * link_mask supported by hw and then go on searching 1337 1338 * link_adr 1338 1339 */ 1339 - if (~link_mask & mach->link_mask) 1340 + if (~hdev->info.link_mask & mach->link_mask) 1340 1341 continue; 1341 1342 1342 1343 /* No need to match adr if there is no links defined */