summaryrefslogtreecommitdiff
path: root/sound/soc/sh/rcar/ssi.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2018-02-13 05:08:53 +0300
committerMark Brown <broonie@kernel.org>2018-02-13 14:58:22 +0300
commit2b62786951ca38cc9fd0bd9273de0aae1b45134d (patch)
tree845f3acfcd900f2acd5f92fb92f23a5edc4c9e1d /sound/soc/sh/rcar/ssi.c
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff)
downloadlinux-2b62786951ca38cc9fd0bd9273de0aae1b45134d.tar.xz
ASoC: rsnd: indicate IRQ error status for debug
SSI/SRC have under/over flow error handling, and its status is useful for debuging. But sometimes it might be too much message, and it might blocks necessity other information. To avoid such situation, basically this patch indicates interrupt status debug message if DEBUG was defined, but it will be suppressed if RSND_DEBUG_NO_IRQ_STATUS was defined. Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@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.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 97a9db892a8f..333b802681ad 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -11,6 +11,15 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+
+/*
+ * you can enable below define if you don't need
+ * SSI interrupt status debug message when debugging
+ * see rsnd_dbg_irq_status()
+ *
+ * #define RSND_DEBUG_NO_IRQ_STATUS 1
+ */
+
#include <sound/simple_card_utils.h>
#include <linux/delay.h>
#include "rsnd.h"
@@ -603,6 +612,7 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
struct rsnd_dai_stream *io)
{
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;
@@ -621,8 +631,12 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
elapsed = rsnd_ssi_pio_interrupt(mod, io);
/* DMA only */
- if (is_dma && (status & (UIRQ | OIRQ)))
+ if (is_dma && (status & (UIRQ | OIRQ))) {
+ rsnd_dbg_irq_status(dev, "%s[%d] err status : 0x%08x\n",
+ rsnd_mod_name(mod), rsnd_mod_id(mod), status);
+
stop = true;
+ }
rsnd_ssi_status_clear(mod);
rsnd_ssi_interrupt_out: