From 2b62786951ca38cc9fd0bd9273de0aae1b45134d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 13 Feb 2018 02:08:53 +0000 Subject: 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 Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown --- sound/soc/sh/rcar/rsnd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sound/soc/sh/rcar/rsnd.h') diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index ad6523595b0a..5241ea7cf153 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -788,4 +788,14 @@ void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type); #define rsnd_mod_confirm_dvc(mdvc) #endif +/* + * If you don't need interrupt status debug message, + * define RSND_DEBUG_NO_IRQ_STATUS as 1 on top of src.c/ssi.c + * + * #define RSND_DEBUG_NO_IRQ_STATUS 1 + */ +#define rsnd_dbg_irq_status(dev, param...) \ + if (!IS_BUILTIN(RSND_DEBUG_NO_IRQ_STATUS)) \ + dev_dbg(dev, param) + #endif -- cgit v1.2.3-58-ga151 From 1f6e920faae065fa8e6985b99ec86899bc3308de Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 13 Feb 2018 02:09:14 +0000 Subject: ASoC: rsnd: suppress rsnd_dai_call() debug message rsnd_dai_call() is using dev_dbg(), but its message is sometimes blocks nessesary other messages. If RSND_DEBUG_NO_DAI_CALL was defined it will be suppressed by this patch. Reported-by: Hiroyuki Yokoyama Signed-off-by: Kuninori Morimoto Tested-by: Hiroyuki Yokoyama Signed-off-by: Mark Brown --- sound/soc/sh/rcar/core.c | 11 ++++++++++- sound/soc/sh/rcar/rsnd.h | 10 ++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'sound/soc/sh/rcar/rsnd.h') diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 64d5ecb86528..5aafc37f5119 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -93,6 +93,15 @@ * [mod]->fn() -> [mod]->fn() -> [mod]->fn()... * */ + +/* + * you can enable below define if you don't need + * DAI status debug message when debugging + * see rsnd_dbg_dai_call() + * + * #define RSND_DEBUG_NO_DAI_CALL 1 + */ + #include #include "rsnd.h" @@ -468,7 +477,7 @@ static int rsnd_status_update(u32 *status, __rsnd_mod_shift_##fn, \ __rsnd_mod_add_##fn, \ __rsnd_mod_call_##fn); \ - dev_dbg(dev, "%s[%d]\t0x%08x %s\n", \ + rsnd_dbg_dai_call(dev, "%s[%d]\t0x%08x %s\n", \ rsnd_mod_name(mod), rsnd_mod_id(mod), *status, \ (func_call && (mod)->ops->fn) ? #fn : ""); \ if (func_call && (mod)->ops->fn) \ diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 5241ea7cf153..172c8d612890 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h @@ -798,4 +798,14 @@ void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type); if (!IS_BUILTIN(RSND_DEBUG_NO_IRQ_STATUS)) \ dev_dbg(dev, param) +/* + * If you don't need rsnd_dai_call debug message, + * define RSND_DEBUG_NO_DAI_CALL as 1 on top of core.c + * + * #define RSND_DEBUG_NO_DAI_CALL 1 + */ +#define rsnd_dbg_dai_call(dev, param...) \ + if (!IS_BUILTIN(RSND_DEBUG_NO_DAI_CALL)) \ + dev_dbg(dev, param) + #endif -- cgit v1.2.3-58-ga151