Skip to content

Commit

Permalink
ASoC: Intel: Skylake: Fix module state after unbind and delete
Browse files Browse the repository at this point in the history
When DSP module is unbound, the module state needs to be in INIT_DONE
state instead of UNINT. Also the state needs to be set to UNINIT after
module is deleted from DSP pipeline.

So, set the module state to INIT_DONE after unbind and then UNINIT after
module is deleted.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Jeeja KP authored and Mark Brown committed Mar 29, 2017
1 parent fdd85a0 commit 473a4d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/intel/skylake/skl-messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ static void skl_clear_module_state(struct skl_module_pin *mpin, int max,
}

if (!found)
mcfg->m_state = SKL_MODULE_UNINIT;
mcfg->m_state = SKL_MODULE_INIT_DONE;
return;
}

Expand Down
5 changes: 5 additions & 0 deletions sound/soc/intel/skylake/skl-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,11 @@ static int skl_tplg_mixer_dapm_post_pmd_event(struct snd_soc_dapm_widget *w,

skl_delete_pipe(ctx, mconfig->pipe);

list_for_each_entry(w_module, &s_pipe->w_list, node) {
src_module = w_module->w->priv;
src_module->m_state = SKL_MODULE_UNINIT;
}

return skl_tplg_unload_pipe_modules(ctx, s_pipe);
}

Expand Down

0 comments on commit 473a4d5

Please sign in to comment.