Skip to content

Commit 7ff01ca

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: Intel: hda: list SoundWire peripherals on mismatch
Most of the SoundWire support issues come from bad ACPI information, or configuration reported by ACPI that are not supported by the SOF driver/topology. The users see a "No SoundWire machine driver found" message without any details, and the fallback to HDaudio w/ HDMI is used. We can reduce our support load with a clear dev_info() log that will give us a clear hint on the mismatch and why a machine driver/topology were not found. Example log on a MTL device: [ 13.158599] sof-audio-pci-intel-mtl 0000:00:1f.3: No SoundWire machine driver found for the ACPI-reported configuration: [ 13.158603] sof-audio-pci-intel-mtl 0000:00:1f.3: link 0 mfg_id 0x025d part_id 0x0713 version 0x3 [ 13.158606] sof-audio-pci-intel-mtl 0000:00:1f.3: link 1 mfg_id 0x025d part_id 0x1316 version 0x3 [ 13.158608] sof-audio-pci-intel-mtl 0000:00:1f.3: link 2 mfg_id 0x025d part_id 0x1316 version 0x3 In parallel, we will also provide an update to `alsa-info` to log all SoundWire peripherals found in ACPI tables. Signed-off-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5d4788b commit 7ff01ca

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

sound/soc/sof/intel/hda.c

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,6 +1645,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
16451645
{
16461646
struct snd_sof_pdata *pdata = sdev->pdata;
16471647
const struct snd_soc_acpi_link_adr *link;
1648+
struct sdw_extended_slave_id *ids;
16481649
struct snd_soc_acpi_mach *mach;
16491650
struct sof_intel_hda_dev *hdev;
16501651
u32 link_mask;
@@ -1658,6 +1659,16 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
16581659
return NULL;
16591660
}
16601661

1662+
if (!hdev->sdw) {
1663+
dev_dbg(sdev->dev, "SoundWire context not allocated\n");
1664+
return NULL;
1665+
}
1666+
1667+
if (!hdev->sdw->num_slaves) {
1668+
dev_warn(sdev->dev, "No SoundWire peripheral detected in ACPI tables\n");
1669+
return NULL;
1670+
}
1671+
16611672
/*
16621673
* Select SoundWire machine driver if needed using the
16631674
* alternate tables. This case deals with SoundWire-only
@@ -1740,7 +1751,11 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
17401751
return mach;
17411752
}
17421753

1743-
dev_info(sdev->dev, "No SoundWire machine driver found\n");
1754+
dev_info(sdev->dev, "No SoundWire machine driver found for the ACPI-reported configuration:\n");
1755+
ids = hdev->sdw->ids;
1756+
for (i = 0; i < hdev->sdw->num_slaves; i++)
1757+
dev_info(sdev->dev, "link %d mfg_id 0x%04x part_id 0x%04x version %#x\n",
1758+
ids[i].link_id, ids[i].id.mfg_id, ids[i].id.part_id, ids[i].id.sdw_version);
17441759

17451760
return NULL;
17461761
}

0 commit comments

Comments
 (0)