summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-topology.c
diff options
context:
space:
mode:
authorJeeja KP2016-12-08 09:11:14 +0100
committerMark Brown2016-12-15 13:15:59 +0100
commitbb704a737cecc1c4c9f1b0251aa79d8276308ccc (patch)
tree6647e33f49e1c4bf51f64f28a3f21ccde9f02d64 /sound/soc/intel/skylake/skl-topology.c
parentASoC: Intel: Skylake: Update link_index and format in pipe params (diff)
downloadkernel-qcow2-linux-bb704a737cecc1c4c9f1b0251aa79d8276308ccc.tar.gz
kernel-qcow2-linux-bb704a737cecc1c4c9f1b0251aa79d8276308ccc.tar.xz
kernel-qcow2-linux-bb704a737cecc1c4c9f1b0251aa79d8276308ccc.zip
ASoC: Intel: Skylake: Configure DMA in PRE_PMD handler of Mixer
If system is suspended when PCM was paused/stopped, restart doesn't configure DMA as it is we are in Pause state and results in IO error eventually. Configure host/link DMA before initializing DSP Gateway copier module instead of DAI prepare(). So moved DMA configuration to mixer PRE_PMD widget handler instead of DAI prepare. This uses previously added new API to do the configuration and removes old DAI prepare code. Signed-off-by: Jeeja KP <jeeja.kp@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.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 8f608c45e445..422a9dee9270 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -496,6 +496,20 @@ static int skl_tplg_set_module_init_data(struct snd_soc_dapm_widget *w)
return 0;
}
+static int skl_tplg_module_prepare(struct skl_sst *ctx, struct skl_pipe *pipe,
+ struct snd_soc_dapm_widget *w, struct skl_module_cfg *mcfg)
+{
+ switch (mcfg->dev_type) {
+ case SKL_DEVICE_HDAHOST:
+ return skl_pcm_host_dma_prepare(ctx->dev, pipe->p_params);
+
+ case SKL_DEVICE_HDALINK:
+ return skl_pcm_link_dma_prepare(ctx->dev, pipe->p_params);
+ }
+
+ return 0;
+}
+
/*
* Inside a pipe instance, we can have various modules. These modules need
* to instantiated in DSP by invoking INIT_MODULE IPC, which is achieved by
@@ -535,6 +549,11 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
mconfig->m_state = SKL_MODULE_LOADED;
}
+ /* prepare the DMA if the module is gateway cpr */
+ ret = skl_tplg_module_prepare(ctx, pipe, w, mconfig);
+ if (ret < 0)
+ return ret;
+
/* update blob if blob is null for be with default value */
skl_tplg_update_be_blob(w, ctx);