Skip to content

Commit 2124ec2

Browse files
bardliaoujfalusi
authored andcommitted
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 86b5062 commit 2124ec2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sound/soc/sof/intel/hda.c

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

13121312
hdev = pdata->hw_pdata;
1313-
link_mask = hdev->info.link_mask;
13141313

1315-
if (!link_mask) {
1314+
if (!hdev->info.link_mask) {
13161315
dev_info(sdev->dev, "SoundWire links not enabled\n");
13171316
return NULL;
13181317
}
@@ -1343,7 +1342,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
13431342
* link_mask supported by hw and then go on searching
13441343
* link_adr
13451344
*/
1346-
if (~link_mask & mach->link_mask)
1345+
if (~hdev->info.link_mask & mach->link_mask)
13471346
continue;
13481347

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

0 commit comments

Comments
 (0)