]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: SOF: Intel: hda: use machine_check() for SoundWire
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 16 Oct 2024 10:23:33 +0000 (18:23 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 17 Oct 2024 17:42:18 +0000 (18:42 +0100)
Use the new machine_check() callback to select an alternate topology
for RT712-VB devices.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-12-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda.c

index 9abc4c071ae52ec7795c8eb25a72a29669b77f08..38921c0db84eed4b776c97b6f6323516676bdf79 100644 (file)
@@ -1124,7 +1124,8 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev
                }
                /* Found if all Slaves are checked */
                if (i == hdev->info.count || !link->num_adr)
-                       break;
+                       if (!mach->machine_check || mach->machine_check(hdev->sdw))
+                               break;
        }
        if (mach && mach->link_mask) {
                mach->mach_params.links = mach->links;