[alsa-devel] [PATCH 0/3] ASoC: Reduce audio related kernel spew.
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Also, I have created 3 different patches for this because they touch different drivers. But, I can combine those to reduce the number of patches.
Vedang Patel (3): ASoC: hdac_hdmi: Increase loglevel of hex dump printed ASoC: Intel: common: increase the loglevel of debug message. ASoC: Intel: Skylake: Increase loglevel of debug message.
sound/soc/codecs/hdac_hdmi.c | 2 ++ sound/soc/intel/common/sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-messages.c | 2 ++ sound/soc/intel/skylake/skl-sst-ipc.c | 7 +++++-- 4 files changed, 10 insertions(+), 3 deletions(-)
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/codecs/hdac_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index aaa038f..653fd9e 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1066,8 +1066,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) snd_jack_report(pcm->jack, SND_JACK_AVOUT); }
+#ifdef DEBUG print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, pin->eld.eld_buffer, pin->eld.eld_size); +#endif } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
Hi,
On Apr 13 2016 07:08, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
For this purpose, I think it better to use Linux tracing framework, instead of such an ancient fashion. The type of '__dynamic_array' is suitable for your aim.
As a quick glance of ASOC, there're several usage of the framework (see include/trace/events/asoc.h). So overall, I believe it's OK to use the framework.
I also have the same advice for your patch 3/3.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com
sound/soc/codecs/hdac_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index aaa038f..653fd9e 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1066,8 +1066,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) snd_jack_report(pcm->jack, SND_JACK_AVOUT); }
+#ifdef DEBUG print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, pin->eld.eld_buffer, pin->eld.eld_size); +#endif } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
Regards
Takashi Sakamoto
On Wed, 2016-04-13 at 10:09 +0900, Takashi Sakamoto wrote:
Hi,
On Apr 13 2016 07:08, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
For this purpose, I think it better to use Linux tracing framework, instead of such an ancient fashion. The type of '__dynamic_array' is suitable for your aim.
As a quick glance of ASOC, there're several usage of the framework (see include/trace/events/asoc.h). So overall, I believe it's OK to use the framework.
I also have the same advice for your patch 3/3.
Thanks Takashi for the input. I will work on it and send out the new patches soon.
-Vedang
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com
sound/soc/codecs/hdac_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index aaa038f..653fd9e 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1066,8 +1066,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) snd_jack_report(pcm->jack, SND_JACK_AVOUT); }
+#ifdef DEBUG print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, pin->eld.eld_buffer, pin ->eld.eld_size); +#endif } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
Regards
Takashi Sakamoto
On Thu, 2016-04-14 at 08:15 -0700, Vedang Patel wrote:
On Wed, 2016-04-13 at 10:09 +0900, Takashi Sakamoto wrote:
Hi,
On Apr 13 2016 07:08, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
For this purpose, I think it better to use Linux tracing framework, instead of such an ancient fashion. The type of '__dynamic_array' is suitable for your aim.
As a quick glance of ASOC, there're several usage of the framework (see include/trace/events/asoc.h). So overall, I believe it's OK to use the framework.
I also have the same advice for your patch 3/3.
Thanks Takashi for the input. I will work on it and send out the new patches soon.
-Vedang
Hi Takashi,
I modified the dynamic tracing framework for this. But, i could not find a way to present the debug messages.
Following is how it was printed using print_hex_dump:
Module params:00000000: 000186a0 000000c0 00000180 00000000 Module params:00000010: 0000bb80 00000010 ffffff10 00000001 Module params:00000020: 00000000 00001002 0000bb80 00000020 Module params:00000030: ffffff10 00000001 00000000 00002002 Module params:00000040: 00000000 00000000 00000300 00000000 Module params:00000050: 00000000
From the tracing framework, I used __dynamic_array along with
__print_hex as follows:
TP_printk("%s: %s", __get_str(prefix), __print_array(__get_dynamic_array(hex_data), __entry->length, 4))
and I got:
cras-1410 [002] ...1 640.673815: skl_adsp_module_params_dump: Module params: a0 86 01 00 80 01 00 00 80 01 00 00 00 00 00 00 80 bb 00 00 20 00 00 00 10 ff ff ff 01 00 00 00 00 00 00 00 02 18 00 00 80 bb 00 00 20 00 00 00 10 ff ff ff 01 00 00 00 00 00 00 00 02 18 00 00 00 00 00 00 02 0c 00 00 00 03 00 00 15 00 00 00 00 00 00 00 10 ff ff ff 32 ff ff ff 10 32 ff ff 10 32 ff ff 10 32 ff ff 10 32 ff ff 10 32 ff ff 10 32 ff ff 37 09 d0 81 00 00 70 c0 00 00 00 00 00 00 99 02 03 00 00 00 03 00 00 00 02 40 00 00 00 00 00 00 00 0f 07 07 20 00 00 00 01 00 00 00 ff 0f 00 00 00 00 00 00
Ignoring the endianness problem , I think that the previous format is more readable compared to the one in tracing framework. Also, I just found out that there is a print_hex_dump_debug function which can also be enabled dynamically. Do you think using print_hex_dump_debug is a good idea in this scenario?
Thanks, Vedang
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_db g used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com
sound/soc/codecs/hdac_hdmi.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index aaa038f..653fd9e 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1066,8 +1066,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll)
> > > > > > > > > > > > snd_jack_report(pcm->jack,
SND_JACK_AVOUT);
> > > > > > > > > }
+#ifdef DEBUG
> > > > > > > > > print_hex_dump_bytes("ELD: ",
DUMP_PREFIX_OFFSET,
> > > > > > > > > > > > > > > pin->eld.eld_buffer, pin
->eld.eld_size); +#endif
> > > > > > } else { > > > > > > > > > pin->eld.monitor_present = false; > > > > > > > > > pin->eld.eld_valid = false;
Regards
Takashi Sakamoto
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
From: Vedang Patel vedang.patel@intel.com
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/common/sst-dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index b5bbdf4..ff2196e 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -285,7 +285,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask, }
reg = sst_dsp_shim_read_unlocked(ctx, offset); - dev_info(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, + dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, (time < timeout) ? "successful" : "timedout"); ret = time < timeout ? 0 : -ETIME;
The patch
ASoC: Intel: common: increase the loglevel of "FW Poll Status".
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From ef06b6f3912f4438f9275922dae17c11360ceefc Mon Sep 17 00:00:00 2001
From: Vedang Patel vedang.patel@intel.com Date: Fri, 24 Jun 2016 17:37:10 -0700 Subject: [PATCH] ASoC: Intel: common: increase the loglevel of "FW Poll Status".
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/common/sst-dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index b5bbdf4fe93a..ff2196ef359f 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -285,7 +285,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask, }
reg = sst_dsp_shim_read_unlocked(ctx, offset); - dev_info(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, + dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, (time < timeout) ? "successful" : "timedout"); ret = time < timeout ? 0 : -ETIME;
From: Vedang Patel vedang.patel@intel.com
There is log spam while doing playback, record or reloading the audio firmware.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency.
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/skylake/skl-messages.c | 2 ++ sound/soc/intel/skylake/skl-sst-ipc.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index e3d149c..da2dbb2 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,8 +730,10 @@ static int skl_set_module_format(struct skl_sst *ctx,
dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); +#ifdef DEBUG print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); +#endif return 0; }
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 5434602..5ee1420 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -688,12 +688,15 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, struct skl_ipc_header header = {0}; u64 *ipc_header = (u64 *)(&header); int ret; - u32 *buffer = (u32 *)param_data; /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32);
+#ifdef DEBUG + u32 *buffer = (u32 *)param_data; + print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false); +#endif
header.primary = IPC_MSG_TARGET(IPC_MOD_MSG); header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST);
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Also, I have created 3 different patches for this because they touch different drivers. But, I can combine those to reduce the number of patches.
v2 Changes: - use print_hex_dump_debug instead of #ifdef DEBUG
Vedang Patel (3): ASoC: hdac_hdmi: Increase loglevel of hex dump printed ASoC: Intel: common: increase the loglevel of "FW Poll Status". ASoC: Intel: Skylake: Increase loglevel of debug messages.
sound/soc/codecs/hdac_hdmi.c | 5 +++-- sound/soc/intel/common/sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-)
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
print_hex_dump_bytes (which just calls print_hex_dump) uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
Change-Id: I6a7ac1d40a73369ea5dc58b7afde0288b8e86558 Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/codecs/hdac_hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index aaa038f..def565d 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1066,8 +1066,9 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) snd_jack_report(pcm->jack, SND_JACK_AVOUT); }
- print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, - pin->eld.eld_buffer, pin->eld.eld_size); + print_hex_dump_debug("ELD: ", + DUMP_PREFIX_OFFSET, 16, 1, + pin->eld.eld_buffer, pin->eld.eld_size, true); } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
From: Vedang Patel vedang.patel@intel.com
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Change-Id: I26fbd7bb66b68f4319d08b6bd4e604b519df1a9e Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/common/sst-dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index b5bbdf4..ff2196e 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -285,7 +285,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask, }
reg = sst_dsp_shim_read_unlocked(ctx, offset); - dev_info(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, + dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, (time < timeout) ? "successful" : "timedout"); ret = time < timeout ? 0 : -ETIME;
From: Vedang Patel vedang.patel@intel.com
There is log spam while doing playback, record or reloading the audio firmware.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Change-Id: Ib3f29a02e79eabbd7a4452279841514277a471c4 Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index e3d149c..b208f56 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,7 +730,7 @@ static int skl_set_module_format(struct skl_sst *ctx,
dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); - print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, + print_hex_dump_debug("Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); return 0; } diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 5434602..c141f24 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -692,7 +692,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32);
- print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, + print_hex_dump_debug(NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false);
header.primary = IPC_MSG_TARGET(IPC_MOD_MSG);
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Also, I have created 3 different patches for this because they touch different drivers. But, I can combine those to reduce the number of patches.
v2 Changes: - Use print_hex_dump_debug instead of #ifdef DEBUG
v3 Changes: - Remove Change-Id from all the patches.
Vedang Patel (3): ASoC: hdac_hdmi: Increase loglevel of hex dump printed ASoC: Intel: common: increase the loglevel of "FW Poll Status". ASoC: Intel: Skylake: Increase loglevel of debug messages.
sound/soc/codecs/hdac_hdmi.c | 6 ++++-- sound/soc/intel/common/sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-)
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
print_hex_dump_bytes (which just calls print_hex_dump) uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/codecs/hdac_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 181cd3b..62d2181 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1124,8 +1124,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) } hdac_hdmi_parse_eld(edev, pin);
- print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, - pin->eld.eld_buffer, pin->eld.eld_size); + print_hex_dump_debug("ELD: ", + DUMP_PREFIX_OFFSET, 16, 1, + pin->eld.eld_buffer, pin->eld.eld_size, + true); } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
The patch
ASoC: hdac_hdmi: Increase loglevel of hex dump printed
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 3cb7cec14415ff8544ae702f396f913cd9008e7e Mon Sep 17 00:00:00 2001
From: Vedang Patel vedang.patel@intel.com Date: Fri, 24 Jun 2016 17:37:09 -0700 Subject: [PATCH] ASoC: hdac_hdmi: Increase loglevel of hex dump printed
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
print_hex_dump_bytes (which just calls print_hex_dump) uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/hdac_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 181cd3bf0b92..62d21812b9b8 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1124,8 +1124,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) } hdac_hdmi_parse_eld(edev, pin);
- print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, - pin->eld.eld_buffer, pin->eld.eld_size); + print_hex_dump_debug("ELD: ", + DUMP_PREFIX_OFFSET, 16, 1, + pin->eld.eld_buffer, pin->eld.eld_size, + true); } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
From: Vedang Patel vedang.patel@intel.com
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/common/sst-dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index b5bbdf4..ff2196e 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -285,7 +285,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask, }
reg = sst_dsp_shim_read_unlocked(ctx, offset); - dev_info(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, + dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, (time < timeout) ? "successful" : "timedout"); ret = time < timeout ? 0 : -ETIME;
From: Vedang Patel vedang.patel@intel.com
There is log spam while doing playback, record or reloading the audio firmware.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 226db84..81224de 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,7 +730,7 @@ static int skl_set_module_format(struct skl_sst *ctx,
dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); - print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, + print_hex_dump_debug("Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); return 0; } diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 5434602..c141f24 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -692,7 +692,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32);
- print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, + print_hex_dump_debug(NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false);
header.primary = IPC_MSG_TARGET(IPC_MOD_MSG);
On Tue, May 31, 2016 at 06:14:58PM -0700, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Also, I have created 3 different patches for this because they touch different drivers. But, I can combine those to reduce the number of patches.
Split sound fine to me
Acked-by: Vinod Koul vinod.koul@intel.com
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Also, I have created 3 different patches for this because they touch different drivers. But, I can combine those to reduce the number of patches.
v2 Changes: - Use print_hex_dump_debug instead of #ifdef DEBUG
v3 Changes: - Remove Change-Id from all the patches.
Vedang Patel (3): ASoC: hdac_hdmi: Increase loglevel of hex dump printed ASoC: Intel: common: increase the loglevel of "FW Poll Status". ASoC: Intel: Skylake: Increase loglevel of debug messages.
sound/soc/codecs/hdac_hdmi.c | 6 ++++-- sound/soc/intel/common/sst-dsp.c | 2 +- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-)
From: Vedang Patel vedang.patel@intel.com
The hdac_hdmi codec driver prints the ELD information everytime an external monitor is connected. Make it so that the information is only printed when someone trying to debug the driver explicitly enables it.
print_hex_dump_bytes (which just calls print_hex_dump) uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/codecs/hdac_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 181cd3b..62d2181 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -1124,8 +1124,10 @@ static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) } hdac_hdmi_parse_eld(edev, pin);
- print_hex_dump_bytes("ELD: ", DUMP_PREFIX_OFFSET, - pin->eld.eld_buffer, pin->eld.eld_size); + print_hex_dump_debug("ELD: ", + DUMP_PREFIX_OFFSET, 16, 1, + pin->eld.eld_buffer, pin->eld.eld_size, + true); } else { pin->eld.monitor_present = false; pin->eld.eld_valid = false;
From: Vedang Patel vedang.patel@intel.com
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/common/sst-dsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/common/sst-dsp.c b/sound/soc/intel/common/sst-dsp.c index b5bbdf4..ff2196e 100644 --- a/sound/soc/intel/common/sst-dsp.c +++ b/sound/soc/intel/common/sst-dsp.c @@ -285,7 +285,7 @@ int sst_dsp_register_poll(struct sst_dsp *ctx, u32 offset, u32 mask, }
reg = sst_dsp_shim_read_unlocked(ctx, offset); - dev_info(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, + dev_dbg(ctx->dev, "FW Poll Status: reg=%#x %s %s\n", reg, operation, (time < timeout) ? "successful" : "timedout"); ret = time < timeout ? 0 : -ETIME;
From: Vedang Patel vedang.patel@intel.com
There is log spam while doing playback, record or reloading the audio firmware.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com --- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 226db84..81224de 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,7 +730,7 @@ static int skl_set_module_format(struct skl_sst *ctx,
dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); - print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, + print_hex_dump_debug("Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); return 0; } diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 5434602..c141f24 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -692,7 +692,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32);
- print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, + print_hex_dump_debug(NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false);
header.primary = IPC_MSG_TARGET(IPC_MOD_MSG);
On Fri, Jun 24, 2016 at 05:37:08PM -0700, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Please don't include noise like REPOST in the subject line, especially not at the start of the subject line where it makes it look less like a patch e-mail and so harder to spot in an inbox. I also note that this appears to be the first time you've sent me these patches...
Thanks Mark for merging the patches. I apologize for any unwanted noise in your inbox.
I did post the patches a few weeks back (http://www.spinics.net/lists/a lsa-devel/msg50782.html). The only difference this time was I cc'ed you in the patches. Moving forward, what is the preferred method for submitting patches for the first time or reposting them so that you are less likely to miss them?
Thanks, Vedang
On Mon, 2016-06-27 at 15:50 +0100, Mark Brown wrote:
On Fri, Jun 24, 2016 at 05:37:08PM -0700, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Please don't include noise like REPOST in the subject line, especially not at the start of the subject line where it makes it look less like a patch e-mail and so harder to spot in an inbox. I also note that this appears to be the first time you've sent me these patches...
On Thu, Jun 30, 2016 at 05:09:09AM +0530, Patel, Vedang wrote:
Thanks Mark for merging the patches. I apologize for any unwanted noise in your inbox.
Please never *top post*
I did post the patches a few weeks back (http://www.spinics.net/lists/a lsa-devel/msg50782.html). The only difference this time was I cc'ed you in the patches. Moving forward, what is the preferred method for submitting patches for the first time or reposting them so that you are less likely to miss them?
Ah not CCing maintainers is not correct. That is why checkpatch gives you names to cc.
Your patch got ignored for this reason then!
Thanks, Vedang
On Mon, 2016-06-27 at 15:50 +0100, Mark Brown wrote:
On Fri, Jun 24, 2016 at 05:37:08PM -0700, vedang.patel@intel.com wrote:
From: Vedang Patel vedang.patel@intel.com
There have been complaints regarding audio related kernel messages flooding dmesg. This series tries to address those complaints.
Please don't include noise like REPOST in the subject line, especially not at the start of the subject line where it makes it look less like a patch e-mail and so harder to spot in an inbox. I also note that this appears to be the first time you've sent me these patches...
On Thu, Jun 30, 2016 at 07:57:47AM +0530, Vinod Koul wrote:
On Thu, Jun 30, 2016 at 05:09:09AM +0530, Patel, Vedang wrote:
I did post the patches a few weeks back (http://www.spinics.net/lists/a lsa-devel/msg50782.html). The only difference this time was I cc'ed you in the patches. Moving forward, what is the preferred method for submitting patches for the first time or reposting them so that you are less likely to miss them?
Ah not CCing maintainers is not correct. That is why checkpatch gives you names to cc.
Your patch got ignored for this reason then!
The process for submitting patches is covered in Documentation/SubmittingPatches
The patch
ASoC: Intel: Skylake: Increase loglevel of debug messages.
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 91c1832579700891747820862633f9a8d0d81fa4 Mon Sep 17 00:00:00 2001
From: Vedang Patel vedang.patel@intel.com Date: Fri, 24 Jun 2016 17:37:11 -0700 Subject: [PATCH] ASoC: Intel: Skylake: Increase loglevel of debug messages.
There is log spam while doing playback, record or reloading the audio firmware.
print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Change it to print_hex_dump_debug for logging consistency.
For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.
Signed-off-by: Vedang Patel vedang.patel@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/skylake/skl-messages.c | 2 +- sound/soc/intel/skylake/skl-sst-ipc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index 804091aa6e64..6902020df946 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,7 +730,7 @@ static int skl_set_module_format(struct skl_sst *ctx,
dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); - print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, + print_hex_dump_debug("Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); return 0; } diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 543460293b00..c141f24cae05 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -692,7 +692,7 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32);
- print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, + print_hex_dump_debug(NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false);
header.primary = IPC_MSG_TARGET(IPC_MOD_MSG);
participants (6)
-
Mark Brown
-
Patel, Vedang
-
Takashi Sakamoto
-
Vedang Patel
-
vedang.patel@intel.com
-
Vinod Koul