aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-08-10 00:10:49 -0400
committerMark Brown <broonie@kernel.org>2016-08-10 13:54:05 -0400
commit64cb1d0ad0eada322c2011e15710d2a1c12ce8b6 (patch)
tree2d6e2d7bf7c5b324f706523667e14f74dd1e8fcf
parent0556ba463b2419e4f4833563aa3d75aafd9b9c01 (diff)
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: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 140249269cdb..eb1f00b28df1 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -1138,6 +1138,32 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd)
1138 return retval; 1138 return retval;
1139} 1139}
1140 1140
1141static int skl_populate_modules(struct skl *skl)
1142{
1143 struct skl_pipeline *p;
1144 struct skl_pipe_module *m;
1145 struct snd_soc_dapm_widget *w;
1146 struct skl_module_cfg *mconfig;
1147 int ret;
1148
1149 list_for_each_entry(p, &skl->ppl_list, node) {
1150 list_for_each_entry(m, &p->pipe->w_list, node) {
1151
1152 w = m->w;
1153 mconfig = w->priv;
1154
1155 ret = snd_skl_get_module_info(skl->skl_sst, mconfig);
1156 if (ret < 0) {
1157 dev_err(skl->skl_sst->dev,
1158 "query module info failed:%d\n", ret);
1159 goto err;
1160 }
1161 }
1162 }
1163err:
1164 return ret;
1165}
1166
1141static int skl_platform_soc_probe(struct snd_soc_platform *platform) 1167static int skl_platform_soc_probe(struct snd_soc_platform *platform)
1142{ 1168{
1143 struct hdac_ext_bus *ebus = dev_get_drvdata(platform->dev); 1169 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 dev_err(platform->dev, "Failed to boot first fw: %d\n", ret); 1195 dev_err(platform->dev, "Failed to boot first fw: %d\n", ret);
1170 return ret; 1196 return ret;
1171 } 1197 }
1198 skl_populate_modules(skl);
1172 } 1199 }
1173 pm_runtime_mark_last_busy(platform->dev); 1200 pm_runtime_mark_last_busy(platform->dev);
1174 pm_runtime_put_autosuspend(platform->dev); 1201 pm_runtime_put_autosuspend(platform->dev);