diff options
author | Dharageswari R <dharageswari.r@intel.com> | 2016-08-24 08:33:16 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-09-01 16:27:41 -0400 |
commit | b0fab9c6f636733161b723d1c223f2ce17637ff0 (patch) | |
tree | f7daa088092b4207e31153bcf80ce3b3f3410dbb | |
parent | 0b6d76bbd5e223d33ccdd73f3a717692d500d221 (diff) |
ASoC: Intel: Skylake: Unload all the loadable modules
There could be more than one loadable module in a pipeline.
So unload all modules whilst parsing the list.
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>
-rw-r--r-- | sound/soc/intel/skylake/skl-topology.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c index 6bceab8f0bac..2d475b720963 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c | |||
@@ -523,6 +523,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe) | |||
523 | static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, | 523 | static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, |
524 | struct skl_pipe *pipe) | 524 | struct skl_pipe *pipe) |
525 | { | 525 | { |
526 | int ret; | ||
526 | struct skl_pipe_module *w_module = NULL; | 527 | struct skl_pipe_module *w_module = NULL; |
527 | struct skl_module_cfg *mconfig = NULL; | 528 | struct skl_module_cfg *mconfig = NULL; |
528 | 529 | ||
@@ -530,9 +531,12 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, | |||
530 | mconfig = w_module->w->priv; | 531 | mconfig = w_module->w->priv; |
531 | 532 | ||
532 | if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod && | 533 | if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod && |
533 | mconfig->m_state > SKL_MODULE_UNINIT) | 534 | mconfig->m_state > SKL_MODULE_UNINIT) { |
534 | return ctx->dsp->fw_ops.unload_mod(ctx->dsp, | 535 | ret = ctx->dsp->fw_ops.unload_mod(ctx->dsp, |
535 | mconfig->id.module_id); | 536 | mconfig->id.module_id); |
537 | if (ret < 0) | ||
538 | return -EIO; | ||
539 | } | ||
536 | } | 540 | } |
537 | 541 | ||
538 | /* no modules to unload in this path, so return */ | 542 | /* no modules to unload in this path, so return */ |