Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion sound/soc/sof/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,7 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
/* Try to use function topologies if possible */
if (!sof_pdata->disable_function_topology && !disable_function_topology &&
sof_pdata->machine && sof_pdata->machine->get_function_tplg_files) {
struct snd_soc_acpi_mach *card_mach = dev_get_platdata(scomp->card->dev);
/*
* When the topology name contains 'dummy' word, it means that
* there is no fallback option to monolithic topology in case
Expand All @@ -2530,8 +2531,12 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file)
*/
bool no_fallback = strstr(file, "dummy");

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what issue does this fix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use the SOC_SDW_PCH_DMIC quirk to indicate that the PCH DMIC is used. We will set mach_params->dmic_num = DMIC_DEFAULT_CHANNELS; to the mach_params from dev_get_platdata(card->dev) when the quirk is set. But the mach_params of the sof_sdw_get_tplg_files() function is from sdev->pdata. In other words, the mach_params->dmic_num of sof_pdata->machine remains 0 and it will cause the unsupported number of dmics: 0 issue.

/*
* Use the acpi mach from the machine driver because the machine driver may
* change the parameters based on the actual hardware configuration.
*/
tplg_cnt = sof_pdata->machine->get_function_tplg_files(scomp->card,
sof_pdata->machine,
card_mach,
tplg_filename_prefix,
&tplg_files,
no_fallback);
Expand Down
Loading