Commit 64cb1d0a authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: Intel: Skylake: Populate modules after loading

Once topology and firmware are loaded, we can parse the manifest. Use driver
pipe and widget list to get list of all modules and populate the data.
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0556ba46
...@@ -1138,6 +1138,32 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd) ...@@ -1138,6 +1138,32 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd)
return retval; return retval;
} }
static int skl_populate_modules(struct skl *skl)
{
struct skl_pipeline *p;
struct skl_pipe_module *m;
struct snd_soc_dapm_widget *w;
struct skl_module_cfg *mconfig;
int ret;
list_for_each_entry(p, &skl->ppl_list, node) {
list_for_each_entry(m, &p->pipe->w_list, node) {
w = m->w;
mconfig = w->priv;
ret = snd_skl_get_module_info(skl->skl_sst, mconfig);
if (ret < 0) {
dev_err(skl->skl_sst->dev,
"query module info failed:%d\n", ret);
goto err;
}
}
}
err:
return ret;
}
static int skl_platform_soc_probe(struct snd_soc_platform *platform) static int skl_platform_soc_probe(struct snd_soc_platform *platform)
{ {
struct hdac_ext_bus *ebus = dev_get_drvdata(platform->dev); struct hdac_ext_bus *ebus = dev_get_drvdata(platform->dev);
...@@ -1169,6 +1195,7 @@ static int skl_platform_soc_probe(struct snd_soc_platform *platform) ...@@ -1169,6 +1195,7 @@ static int skl_platform_soc_probe(struct snd_soc_platform *platform)
dev_err(platform->dev, "Failed to boot first fw: %d\n", ret); dev_err(platform->dev, "Failed to boot first fw: %d\n", ret);
return ret; return ret;
} }
skl_populate_modules(skl);
} }
pm_runtime_mark_last_busy(platform->dev); pm_runtime_mark_last_busy(platform->dev);
pm_runtime_put_autosuspend(platform->dev); pm_runtime_put_autosuspend(platform->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment