Skip to content

Commit 2f23594

Browse files
committed
ASoC: SOF: topology: Use acpi mach from the machine driver
The parameters may be changed by the machine driver based on the actual hardware configuration. We need to use the acpi mach from the machine driver. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 2124ec2 commit 2f23594

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sound/soc/sof/topology.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2516,6 +2516,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
25162516
/* Try to use function topologies if possible */
25172517
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
25182518
sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
2519+
struct snd_soc_acpi_mach *card_mach = dev_get_platdata(scomp->card->dev);
25192520
/*
25202521
* When the topology name contains 'dummy' word, it means that
25212522
* there is no fallback option to monolithic topology in case
@@ -2530,8 +2531,12 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
25302531
*/
25312532
bool no_fallback = strstr(file, "dummy");
25322533

2534+
/*
2535+
* Use the acpi mach from the machine driver because the machine driver may
2536+
* change the parameters based on the actual hardware configuration.
2537+
*/
25332538
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
2534-
sof_pdata->machine,
2539+
card_mach,
25352540
tplg_filename_prefix,
25362541
&tplg_files,
25372542
no_fallback);

0 commit comments

Comments
 (0)