-
Notifications
You must be signed in to change notification settings - Fork 140
ASoC: SOF: topology: Use acpi mach from the machine driver #5665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: topic/sof-dev
Are you sure you want to change the base?
Conversation
| @@ -2530,8 +2531,12 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file) | |||
| */ | |||
| bool no_fallback = strstr(file, "dummy"); | |||
|
|
|||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the dmic_num override still going to be working?
But in other words we have two places whit dmic_num and they are used in a 'random' way around the code?
ujfalusi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want it to be backported to stable kernels? Fixes tag?
sound/soc/sof/topology.c
Outdated
| /* 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never going to be NULL, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question @ujfalusi I don't think it will be NULL, but it is not guarantee that it is with the snd_soc_acpi_mach struct. I will move the change to sof_sdw_get_tplg_files() which is specific to Intel SDW machines.
| @@ -2530,8 +2531,12 @@ int snd_sof_load_topology(struct snd_soc_component *scomp, const char *file) | |||
| */ | |||
| bool no_fallback = strstr(file, "dummy"); | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the dmic_num override still going to be working?
But in other words we have two places whit dmic_num and they are used in a 'random' way around the code?
Yes, I will add it. |
2f23594 to
3589a5e
Compare
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>
3589a5e to
64f86c1
Compare
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.