diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-03-19 00:14:04 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-22 14:12:16 -0400 |
commit | 639b231f866c6cc6dcefc33bcaf31e7554697186 (patch) | |
tree | 7bde26303d1d051264cbe90df5d9f1ff456bb04e /sound | |
parent | 044930b4a69a6c0645b6199bec4f870e0b6e77f4 (diff) |
ASoC: rsnd: no more SRC restart when unusual situation
It will be SRC 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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sh/rcar/src.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c index 6ce8985757c1..cc93f32b0de0 100644 --- a/sound/soc/sh/rcar/src.c +++ b/sound/soc/sh/rcar/src.c | |||
@@ -620,13 +620,17 @@ static irqreturn_t rsnd_src_interrupt_gen2(int irq, void *data) | |||
620 | 620 | ||
621 | if (rsnd_src_error_record_gen2(mod)) { | 621 | if (rsnd_src_error_record_gen2(mod)) { |
622 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); | 622 | struct rsnd_priv *priv = rsnd_mod_to_priv(mod); |
623 | struct rsnd_src *src = rsnd_mod_to_src(mod); | ||
623 | struct device *dev = rsnd_priv_to_dev(priv); | 624 | struct device *dev = rsnd_priv_to_dev(priv); |
624 | 625 | ||
625 | _rsnd_src_stop_gen2(mod); | ||
626 | _rsnd_src_start_gen2(mod); | ||
627 | |||
628 | dev_dbg(dev, "%s[%d] restart\n", | 626 | dev_dbg(dev, "%s[%d] restart\n", |
629 | rsnd_mod_name(mod), rsnd_mod_id(mod)); | 627 | rsnd_mod_name(mod), rsnd_mod_id(mod)); |
628 | |||
629 | _rsnd_src_stop_gen2(mod); | ||
630 | if (src->err < 1024) | ||
631 | _rsnd_src_start_gen2(mod); | ||
632 | else | ||
633 | dev_warn(dev, "no more SRC restart\n"); | ||
630 | } | 634 | } |
631 | 635 | ||
632 | return IRQ_HANDLED; | 636 | return IRQ_HANDLED; |