From 43b6d3ebc63375885b0c04b30687c5618bb63165 Mon Sep 17 00:00:00 2001 From: Ranjani Sridharan Date: Thu, 11 Oct 2018 22:26:22 -0700 Subject: [PATCH] ASoC: SOF: stop trace dma during suspend and re-init upon resume Previously, during pm suspend, trace dma was not stopped and this led to failures with the system entering S3. This patch fixes the issue. Signed-off-by: Ranjani Sridharan --- sound/soc/sof/pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index bff8d60cfeb6e0..345ef79e784fa2 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -287,7 +287,7 @@ static int sof_resume(struct device *dev, int runtime_resume) } /* init DMA trace */ - ret = snd_sof_init_trace_ipc(sdev); + ret = snd_sof_init_trace(sdev); if (ret < 0) { /* non fatal */ dev_warn(sdev->dev, @@ -324,6 +324,9 @@ static int sof_suspend(struct device *dev, int runtime_suspend) if (!sdev->ops->suspend) return 0; + /* release trace */ + snd_sof_release_trace(sdev); + /* * Suspend running pcm streams. * They will be restarted by ALSA resume trigger call. @@ -342,9 +345,6 @@ static int sof_suspend(struct device *dev, int runtime_suspend) /* drop all ipc */ sof_ipc_drop_all(sdev->ipc); - /* release trace */ - snd_sof_dma_trace_release(sdev); - /* power down DSP */ if (runtime_suspend) ret = snd_sof_dsp_runtime_suspend(sdev, 0);