[PATCH] ASoC: SOF: amd: honor machine_check in SoundWire machine select

From: Vijendar Mukunda

Date: Tue Jun 09 2026 - 11:07:04 EST


Only accept an ACPI machine table entry when machine_check is absent
or returns true, matching other AMD SoundWire machine select paths.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@xxxxxxx>
---
sound/soc/sof/amd/acp-common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sof/amd/acp-common.c b/sound/soc/sof/amd/acp-common.c
index 0c3a92f5f942..df656cdc1527 100644
--- a/sound/soc/sof/amd/acp-common.c
+++ b/sound/soc/sof/amd/acp-common.c
@@ -149,7 +149,8 @@ static struct snd_soc_acpi_mach *amd_sof_sdw_machine_select(struct snd_sof_dev *
break;
}
if (i == acp_data->info.count || !link->num_adr)
- break;
+ if (!mach->machine_check || mach->machine_check(acp_data->sdw))
+ break;
}
if (mach && mach->link_mask) {
mach->mach_params.subsystem_rev = acp_data->pci_rev;
--
2.48.1