Skip to content

Commit a217204

Browse files
committed
ASoC: SOF: Intel: reset link_mask before adding new bits
link_mask is set to hdev->info.link_mask at the beginning of hda_sdw_machine_select(). However, some SDW links may not have any peripheral connected. We should set the mask bits where at least one peripheral is connected. 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 a217204

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
13001300
struct sof_intel_hda_dev *hdev;
13011301
int link_index, link_num;
13021302
int amp_index = 1;
1303-
u32 link_mask = 0;
1303+
u32 link_mask;
13041304
int i;
13051305

13061306
hdev = pdata->hw_pdata;
@@ -1392,6 +1392,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
13921392
return NULL;
13931393

13941394
/* Get link mask and link number */
1395+
link_mask = 0;
13951396
for (i = 0; i < peripherals->num_peripherals; i++)
13961397
link_mask |= BIT(peripherals->array[i]->bus->link_id);
13971398

0 commit comments

Comments
 (0)