Skip to content

Commit 64f86c1

Browse files
committed
ASoC: SOF: topology: Use acpi mach from the machine driver
The parameters may be changed by the of_sdw achine driver based on the machine driver quirk. We need to use the acpi mach from the machine driver. Fixes: 2fbeff3 ("ASoC: Intel: add sof_sdw_get_tplg_files ops") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 2124ec2 commit 64f86c1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sound/soc/intel/common/sof-function-topology-lib.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ enum tplg_device_id {
3030
int sof_sdw_get_tplg_files(struct snd_soc_card *card, const struct snd_soc_acpi_mach *mach,
3131
const char *prefix, const char ***tplg_files, bool best_effort)
3232
{
33-
struct snd_soc_acpi_mach_params mach_params = mach->mach_params;
33+
struct snd_soc_acpi_mach *card_mach = dev_get_platdata(card->dev);
34+
/*
35+
* Use the acpi mach from the machine driver because the machine driver
36+
* may change the dmic_num based on the machine driver quirk.
37+
*/
38+
struct snd_soc_acpi_mach_params mach_params = card_mach->mach_params;
3439
struct snd_soc_dai_link *dai_link;
3540
const struct firmware *fw;
3641
char platform[SOF_INTEL_PLATFORM_NAME_MAX];

0 commit comments

Comments
 (0)