ASoC: rsnd: no more SSI restart when unusual situation
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 19 Mar 2015 04:13:47 +0000 (04:13 +0000)
committerMark Brown <broonie@kernel.org>
Sun, 22 Mar 2015 18:12:15 +0000 (18:12 +0000)
It will be SSI interrupt endless loop f unusual situation happen.
This patch adds restart limit for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/ssi.c

index fea4aa53918ab83a8b34eb650cab6c63fa9a1d90..060d3d2052506b3dba489364a11ac3965be807e0 100644 (file)
@@ -416,11 +416,14 @@ static irqreturn_t rsnd_ssi_interrupt(int irq, void *data)
                /*
                 * restart SSI
                 */
-               rsnd_ssi_stop(mod, priv);
-               rsnd_ssi_start(mod, priv);
-
                dev_dbg(dev, "%s[%d] restart\n",
                        rsnd_mod_name(mod), rsnd_mod_id(mod));
+
+               rsnd_ssi_stop(mod, priv);
+               if (ssi->err < 1024)
+                       rsnd_ssi_start(mod, priv);
+               else
+                       dev_warn(dev, "no more SSI restart\n");
        }
 
        rsnd_ssi_record_error(ssi, status);