summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-topology.c
diff options
context:
space:
mode:
authorDharageswari R2016-09-22 10:30:38 +0200
committerMark Brown2016-09-24 20:26:25 +0200
commitef2a352cfb2a536ae8718065b43702a97f9fba9f (patch)
tree02112251938dfd312807148f0696b108099dc406 /sound/soc/intel/skylake/skl-topology.c
parentASoC: Intel: Skylake: Add module instance id generation APIs (diff)
downloadkernel-qcow2-linux-ef2a352cfb2a536ae8718065b43702a97f9fba9f.tar.gz
kernel-qcow2-linux-ef2a352cfb2a536ae8718065b43702a97f9fba9f.tar.xz
kernel-qcow2-linux-ef2a352cfb2a536ae8718065b43702a97f9fba9f.zip
ASoC: Intel: Skylake: Use private instance id of modules in IPC
Use private id's of module instances that are generated during init_module for the IPC messages to DSP. These id's are freed up during delete pipeline. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-topology.c')
-rw-r--r--sound/soc/intel/skylake/skl-topology.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 2d475b720963..b6fc374f38b5 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -505,12 +505,15 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
* FE/BE params
*/
skl_tplg_update_module_params(w, ctx);
-
+ mconfig->id.pvt_id = skl_get_pvt_id(ctx, mconfig);
+ if (mconfig->id.pvt_id < 0)
+ return ret;
skl_tplg_set_module_init_data(w);
ret = skl_init_module(ctx, mconfig);
- if (ret < 0)
+ if (ret < 0) {
+ skl_put_pvt_id(ctx, mconfig);
return ret;
-
+ }
skl_tplg_alloc_pipe_mcps(skl, mconfig);
ret = skl_tplg_set_module_params(w, ctx);
if (ret < 0)
@@ -537,6 +540,7 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
if (ret < 0)
return -EIO;
}
+ skl_put_pvt_id(ctx, mconfig);
}
/* no modules to unload in this path, so return */