blob: e92a82d90b4a3d5fc0728fdcff546225aa39faad [file] [log] [blame]
From 2fbc61a79fb010dcc53f3f5defbe83b76311a4d0 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 15 Jun 2015 06:20:54 +0000
Subject: [PATCH 108/129] ASoC: rsnd: don't care under/over run error when PIO
PIO is used only for checking data path / codec settings. And underrun
is very normal when PIO mode. Let's don't care about under/over run
error when PIO case. Otherwise, 1) too many HW restart happens, 2) some
sounds which need much data transfer can't play since it falls into
error detection method which was created for DMA transfer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 12927a8f80264256e6cb2d3241fe9d6f4ad7face)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
sound/soc/sh/rcar/ssi.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -200,15 +200,17 @@ static void rsnd_ssi_hw_start(struct rsn
}
}
- cr_mode = rsnd_ssi_is_dma_mode(&ssi->mod) ?
- DMEN : /* DMA : enable DMA */
- DIEN; /* PIO : enable Data interrupt */
-
+ if (rsnd_ssi_is_dma_mode(&ssi->mod)) {
+ cr_mode = UIEN | OIEN | /* over/under run */
+ DMEN; /* DMA : enable DMA */
+ } else {
+ cr_mode = DIEN; /* PIO : enable Data interrupt */
+ }
cr = ssi->cr_own |
ssi->cr_clk |
cr_mode |
- UIEN | OIEN | EN;
+ EN;
rsnd_mod_write(&ssi->mod, SSICR, cr);
@@ -460,8 +462,8 @@ static irqreturn_t rsnd_ssi_interrupt(in
rsnd_dai_pointer_update(io, sizeof(*buf));
}
- /* PIO / DMA */
- if (status & (UIRQ | OIRQ)) {
+ /* DMA only */
+ if (is_dma && (status & (UIRQ | OIRQ))) {
struct device *dev = rsnd_priv_to_dev(priv);
/*