Skip to content

Commit 823d5b8

Browse files
committed
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: 5226d19 ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 93b8644 commit 823d5b8

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sound/soc/sof/intel/hda.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,9 +1304,8 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
13041304
int i;
13051305

13061306
hdev = pdata->hw_pdata;
1307-
link_mask = hdev->info.link_mask;
13081307

1309-
if (!link_mask) {
1308+
if (!hdev->info.link_mask) {
13101309
dev_info(sdev->dev, "SoundWire links not enabled\n");
13111310
return NULL;
13121311
}
@@ -1337,7 +1336,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
13371336
* link_mask supported by hw and then go on searching
13381337
* link_adr
13391338
*/
1340-
if (~link_mask & mach->link_mask)
1339+
if (~hdev->info.link_mask & mach->link_mask)
13411340
continue;
13421341

13431342
/* No need to match adr if there is no links defined */

0 commit comments

Comments
 (0)