]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: rsnd: Don't check SSISR::DIRQ when Capture
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 31 Oct 2017 00:40:32 +0000 (00:40 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 31 Oct 2017 11:06:52 +0000 (11:06 +0000)
When stop case, it was Playback, it need to check all data were
completely sent. But in Capture case, it might not receive data
anymore. SSISR::DIRQ check is not need for Capture case.

Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
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 61b4ce20ee2b1ac94452f71b3f82344aa97ef7f0..58e3420a1f05f193a17b784ec793b191ec0a0338 100644 (file)
@@ -598,15 +598,18 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
        if (rsnd_ssi_is_parent(mod, io))
                return 0;
 
-       /*
-        * disable all IRQ,
-        * and, wait all data was sent
-        */
        cr  =   ssi->cr_own     |
                ssi->cr_clk;
 
-       rsnd_mod_write(mod, SSICR, cr | EN);
-       rsnd_ssi_status_check(mod, DIRQ);
+       /*
+        * disable all IRQ,
+        * Playback: Wait all data was sent
+        * Capture:  It might not receave data. Do nothing
+        */
+       if (rsnd_io_is_play(io)) {
+               rsnd_mod_write(mod, SSICR, cr | EN);
+               rsnd_ssi_status_check(mod, DIRQ);
+       }
 
        /*
         * disable SSI,