summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl-sst-cldma.c
diff options
context:
space:
mode:
authorJeeja KP2015-11-13 14:52:08 +0100
committerMark Brown2015-11-18 19:46:36 +0100
commitae395937ab95b8c62806af6a17a6cdfe6086401e (patch)
tree6e61f77c63ae2311953475fbe1b3c3c5553f41e6 /sound/soc/intel/skylake/skl-sst-cldma.c
parentASoC: Intel: Skylake: Remove redundant init in resume (diff)
downloadkernel-qcow2-linux-ae395937ab95b8c62806af6a17a6cdfe6086401e.tar.gz
kernel-qcow2-linux-ae395937ab95b8c62806af6a17a6cdfe6086401e.tar.xz
kernel-qcow2-linux-ae395937ab95b8c62806af6a17a6cdfe6086401e.zip
ASoC: Intel: Skylake: Fix cleanup of dma buffer
During firmware download, dma buffers are allocated in prepare and never freed on clean up. This patch frees the allocated dma buffer in cldma controller clean up. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/skylake/skl-sst-cldma.c')
-rw-r--r--sound/soc/intel/skylake/skl-sst-cldma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl-sst-cldma.c b/sound/soc/intel/skylake/skl-sst-cldma.c
index 44748ba98da2..4ddabe30b62a 100644
--- a/sound/soc/intel/skylake/skl-sst-cldma.c
+++ b/sound/soc/intel/skylake/skl-sst-cldma.c
@@ -137,6 +137,11 @@ static void skl_cldma_cleanup(struct sst_dsp *ctx)
sst_dsp_shim_write(ctx, SKL_ADSP_REG_CL_SD_CBL, 0);
sst_dsp_shim_write(ctx, SKL_ADSP_REG_CL_SD_LVI, 0);
+
+ if (&ctx->cl_dev.dmab_data)
+ ctx->dsp_ops.free_dma_buf(ctx->dev, &ctx->cl_dev.dmab_data);
+ if (&ctx->cl_dev.dmab_bdl)
+ ctx->dsp_ops.free_dma_buf(ctx->dev, &ctx->cl_dev.dmab_bdl);
}
static int skl_cldma_wait_interruptible(struct sst_dsp *ctx)