]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: SOF: topology: Use acpi mach from the machine driver
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 30 Jul 2026 07:17:24 +0000 (10:17 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 30 Jul 2026 22:19:52 +0000 (23:19 +0100)
The parameters may be changed by the sof_sdw machine driver is the
SOC_SDW_PCH_DMIC quirk is set. Use the mach_params from the machine
driver to ensure the sof_sdw_get_tplg_files() function select the right
function topologies.

Fixes: 2fbeff33381c ("ASoC: Intel: add sof_sdw_get_tplg_files ops")
Cc: stable@vger.kernel.org
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260730071724.22296-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/common/sof-function-topology-lib.c

index 2f2c902ef90ce9f0e4a9b64d727dec97b522c282..b6e5a40b78cc6018e712aba132e1613451977184 100644 (file)
@@ -31,7 +31,12 @@ enum tplg_device_id {
 int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
                           const char *prefix, const char ***tplg_files, bool best_effort)
 {
-       struct snd_soc_acpi_mach_params mach_params = mach->mach_params;
+       struct snd_soc_acpi_mach *card_mach = dev_get_platdata(card->dev);
+       /*
+        * Use the acpi mach from the machine driver because the machine driver
+        * may change the dmic_num based on the machine driver quirk.
+        */
+       struct snd_soc_acpi_mach_params mach_params = card_mach->mach_params;
        struct snd_soc_dai_link *dai_link;
        const struct firmware *fw;
        char platform[SOF_INTEL_PLATFORM_NAME_MAX];