Commit b0fab9c6 authored by Dharageswari R's avatar Dharageswari R Committed by Mark Brown

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: default avatarDharageswari R <dharageswari.r@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0b6d76bb
...@@ -523,6 +523,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe) ...@@ -523,6 +523,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
struct skl_pipe *pipe) struct skl_pipe *pipe)
{ {
int ret;
struct skl_pipe_module *w_module = NULL; struct skl_pipe_module *w_module = NULL;
struct skl_module_cfg *mconfig = NULL; struct skl_module_cfg *mconfig = NULL;
...@@ -530,9 +531,12 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, ...@@ -530,9 +531,12 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
mconfig = w_module->w->priv; mconfig = w_module->w->priv;
if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod && if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod &&
mconfig->m_state > SKL_MODULE_UNINIT) mconfig->m_state > SKL_MODULE_UNINIT) {
return ctx->dsp->fw_ops.unload_mod(ctx->dsp, ret = ctx->dsp->fw_ops.unload_mod(ctx->dsp,
mconfig->id.module_id); mconfig->id.module_id);
if (ret < 0)
return -EIO;
}
} }
/* no modules to unload in this path, so return */ /* no modules to unload in this path, so return */
......
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