]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: rsnd: fixup forever loop bug on SSI
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 18 Feb 2016 08:16:04 +0000 (08:16 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 19 Feb 2016 15:53:02 +0000 (00:53 +0900)
commit b5b442abd9 ("ASoC: rsnd: add .irq callback")
added .irq support, and it cares both parent SSI and normal SSI.
But it should care only normal SSI. Otherwise SSI might be
forever loop if SSI is used as both parent SSI and normal SSI
(= 2 users), and if under/over run error happen. Because irq disable
do nothing in such case. This patch solve this issue.

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 c5c4510afb2d11cf66d1805dd2e0c4996a4db39b..90c3f58821dbdb5c742487ee627b4e07c94a6738 100644 (file)
@@ -149,13 +149,12 @@ static int rsnd_ssi_irq(struct rsnd_mod *mod,
                        struct rsnd_priv *priv,
                        int enable)
 {
-       struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
        u32 val = 0;
 
        if (rsnd_is_gen1(priv))
                return 0;
 
-       if (ssi->usrcnt != 1)
+       if (rsnd_ssi_is_parent(mod, io))
                return 0;
 
        if (enable)