summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2015-10-26 08:41:36 +0000
committerMark Brown <broonie@kernel.org>2015-11-16 10:09:29 +0000
commit69e32a58bde67490f57b6172da198b50c7aa6ab1 (patch)
treed677d0667a696a5ee2760e8ca45942c23e62c816 /sound/soc/sh/rcar/ssi.c
parentc2dc47d5cff62bfe21a691bef40eb30a585caa3c (diff)
ASoC: rsnd: Don't stop HW even if a large number of errors occur
Current SSI/SRC restarts HW if under/over flow happened to avoid L/R invert issue. But it will stop HW if too many error happen. But if it stops on HW, other side under/over flow happen. OTHA, it will be forever loop interrupt if something strange error happen on HW/driver without escape route of large number error. To avoid this issue, it indicates error message if large number error occur, and disables error interrupt. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sh/rcar/ssi.c')
-rw-r--r--sound/soc/sh/rcar/ssi.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index c7d943411ae5..86e51ce66b10 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -456,6 +456,7 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
{
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
+ struct device *dev = rsnd_priv_to_dev(priv);
int is_dma = rsnd_ssi_is_dma_mode(mod);
u32 status;
bool elapsed = false;
@@ -489,8 +490,6 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
/* DMA only */
if (is_dma && (status & (UIRQ | OIRQ))) {
- struct device *dev = rsnd_priv_to_dev(priv);
-
/*
* restart SSI
*/
@@ -498,14 +497,18 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
rsnd_mod_name(mod), rsnd_mod_id(mod));
rsnd_ssi_stop(mod, io, priv);
- if (ssi->err < 1024)
- rsnd_ssi_start(mod, io, priv);
- else
- dev_warn(dev, "no more SSI restart\n");
+ rsnd_ssi_start(mod, io, priv);
}
rsnd_ssi_record_error(ssi, status);
+ if (ssi->err > 1024) {
+ rsnd_ssi_irq_disable(mod);
+
+ dev_warn(dev, "no more %s[%d] restart\n",
+ rsnd_mod_name(mod), rsnd_mod_id(mod));
+ }
+
rsnd_ssi_interrupt_out:
spin_unlock(&priv->lock);