]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: renesas: msiof: ignore 1st FSERR
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 25 Sep 2025 05:17:47 +0000 (05:17 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 25 Sep 2025 16:43:30 +0000 (17:43 +0100)
Renesas have tried to minimize the occurrence of FSERR errors as much as
possible, but unfortunately we cannot remove them completely, because
MSIOF might setup its register during CLK/SYNC are inputed. It can be
happen because MSIOF is working as Clock/Frame Consumer.

Ignore 1st FSERR which we can do nothing

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

index 330b65b295976dd7e5a6dc5e3e258430354727c6..f2addfbac92374415a0b5b24d69c279b2e7c5819 100644 (file)
  * how Codec driver start it.
  */
 
+/*
+ * [NOTE-FSERR]
+ *
+ * We can't remove all FSERR.
+ *
+ * Renesas have tried to minimize the occurrence of FSERR errors as much as possible, but
+ * unfortunately we cannot remove them completely, because MSIOF might setup its register during
+ * CLK/SYNC are inputed. It can be happen because MSIOF is working as Clock/Frame Consumer.
+ */
+
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/of_dma.h>
@@ -186,8 +196,13 @@ static int msiof_hw_start(struct snd_soc_component *component,
 
        priv->count++;
 
-       /* reset errors */
-       priv->err_syc[substream->stream] =
+       /*
+        * Reset errors. ignore 1st FSERR
+        *
+        * see
+        *      [NOTE-FSERR]
+        */
+       priv->err_syc[substream->stream] = -1;
        priv->err_ovf[substream->stream] =
        priv->err_udf[substream->stream] = 0;
 
@@ -279,6 +294,15 @@ static int msiof_hw_stop(struct snd_soc_component *component,
        /* Stop DMAC */
        snd_dmaengine_pcm_trigger(substream, cmd);
 
+       /*
+        * Ignore 1st FSERR
+        *
+        * see
+        *      [NOTE-FSERR]
+        */
+       if (priv->err_syc[substream->stream] < 0)
+               priv->err_syc[substream->stream] = 0;
+
        /* indicate error status if exist */
        if (priv->err_syc[substream->stream] ||
            priv->err_ovf[substream->stream] ||