]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: renesas: msiof: tidyup DMAC stop timing
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 25 Sep 2025 05:17:27 +0000 (05:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:31 +0000 (15:37 -0500)
[ Upstream commit 25aa058b5c83a3c455a2a288bb3295c0b234f093 ]

Current DMAC is stopped before HW stop, but it might be cause of
sync error. Stop HW first.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Link: https://patch.msgid.link/878qi3yuu0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/renesas/rcar/msiof.c

index 3a1a6496637dde124187a17df56357238e688e16..555fdd4fb25133a4e7534b03d14fa2fa0cfabfe6 100644 (file)
@@ -222,9 +222,6 @@ static int msiof_hw_stop(struct snd_soc_component *component,
                val = SIIER_RDREQE | SIIER_RDMAE | SISTR_ERR_RX;
        msiof_update(priv, SIIER, val, 0);
 
-       /* Stop DMAC */
-       snd_dmaengine_pcm_trigger(substream, cmd);
-
        /* SICTR */
        if (is_play)
                val = SICTR_TXE;
@@ -232,6 +229,9 @@ static int msiof_hw_stop(struct snd_soc_component *component,
                val = SICTR_RXE;
        msiof_update_and_wait(priv, SICTR, val, 0, 0);
 
+       /* Stop DMAC */
+       snd_dmaengine_pcm_trigger(substream, cmd);
+
        /* indicate error status if exist */
        if (priv->err_syc[substream->stream] ||
            priv->err_ovf[substream->stream] ||