summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-04-04 10:07:34 +0200
committerMark Brown <broonie@kernel.org>2019-04-04 10:07:34 +0200
commit072cb68a43663eacae7fe84dcbfd1a81dc692185 (patch)
tree95107e9ba2b85f6aabee0c830603a2cc48d32d07 /sound/soc/codecs/wm_adsp.c
parentASoC: rockchip: pdm: optimize clear logic (diff)
parentASoC: rockchip: pdm: change dma burst to 8 (diff)
downloadlinux-072cb68a43663eacae7fe84dcbfd1a81dc692185.tar.xz
linux-072cb68a43663eacae7fe84dcbfd1a81dc692185.zip
Merge branch 'asoc-5.1' into asoc-5.2
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 4662a20cfb92..c8c49d5b8ac9 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -3951,7 +3951,8 @@ int wm_adsp_compr_trigger(struct snd_compr_stream *stream, int cmd)
}
break;
case SNDRV_PCM_TRIGGER_STOP:
- wm_adsp_buffer_clear(compr->buf);
+ if (wm_adsp_compr_attached(compr))
+ wm_adsp_buffer_clear(compr->buf);
break;
default:
ret = -EINVAL;