]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: Intel: Skylake: Fix module state after unbind and delete
authorJeeja KP <jeeja.kp@intel.com>
Fri, 24 Mar 2017 17:40:33 +0000 (23:10 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 29 Mar 2017 11:53:43 +0000 (12:53 +0100)
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>
sound/soc/intel/skylake/skl-messages.c
sound/soc/intel/skylake/skl-topology.c

index ba1ec973ded7f71cbfafc0979768ac4bb2b8218c..09730dd8e6a3b8490a0c0535a52d5278f37a4ef4 100644 (file)
@@ -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;
 }
 
index 8bd5ded98cec2af4f66fef104a3d9897aa71f9d6..e960d9f761b9354edf9af39f7d14b667e3c1d8b5 100644 (file)
@@ -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);
 }