]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: SOF: amd: honor machine_check in SoundWire machine select
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>
Tue, 9 Jun 2026 14:40:00 +0000 (20:10 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 9 Jun 2026 17:46:38 +0000 (18:46 +0100)
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@amd.com>
Link: https://patch.msgid.link/20260609144146.3311301-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/amd/acp-common.c

index 0c3a92f5f942d05167146cd8e938c226f5ca5175..df656cdc15277392f75812534c48f38af4201847 100644 (file)
@@ -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;