From 10abba22b3160e8816edb82b655ce04082a7fe82 Mon Sep 17 00:00:00 2001 From: Zhang Peng Date: Wed, 11 Mar 2020 13:58:48 +0800 Subject: MLK-23570i fsl: fsl_dsp: Fix dsp suspend issue on imx.mp board 1. Add check pm runtime state to decide send suspend msg to dsp when call fsl_dsp_suspend. 2. Set proxy->dsp_mu_init be zero in fsl_dsp_suspend for imx.mp. Signed-off-by: Zhang Peng --- sound/soc/fsl/fsl_dsp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sound/soc/fsl/fsl_dsp.c') diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c index 64e9b4f7b3e6..4cf051449f21 100644 --- a/sound/soc/fsl/fsl_dsp.c +++ b/sound/soc/fsl/fsl_dsp.c @@ -1258,13 +1258,17 @@ static int fsl_dsp_suspend(struct device *dev) struct xf_proxy *proxy = &dsp_priv->proxy; int ret = 0; - if (proxy->is_ready) { + if (proxy->is_ready & pm_runtime_active(dev)) { ret = xf_cmd_send_suspend(proxy); if (ret) { dev_err(dev, "dsp suspend fail\n"); return ret; } } + if (dsp_priv->dsp_board_type == DSP_IMX8MP_TYPE) { + dsp_priv->dsp_mu_init = 0; + proxy->is_ready = 0; + } ret = pm_runtime_force_suspend(dev); -- cgit v1.2.3