Skip to contentSkip to conversation

ASoC: Reduce audio related kernel spew.

PATCH Superseded [email protected] 4 participants 27 messages Apr 12, 2016 – Jul 1, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Reduce audio related kernel spew.

From: Vedang Patel <[email protected]>

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(-)
Signature · 1 line
2.1.2
#1 lore raw

PATCH 1/3 ASoC: hdac_hdmi: Increase loglevel of hex dump printed

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/codecs/hdac_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/codecs/hdac_hdmi.c +2 -0
index aaa038f..653fd9e 100644
@@ -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;
Signature · 1 line
2.1.2
#2 lore raw

Re: [PATCH 1/3] ASoC: hdac_hdmi: Increase loglevel of hex dump printed

Hi,

Quoted 5 lines · On Apr 13 2016 07:08, [email protected] wrote:

From: Vedang Patel <[email protected]>

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.

Quoted 14 lines

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.

---
  sound/soc/codecs/hdac_hdmi.c | 2 ++
  1 file changed, 2 insertions(+)
sound/soc/codecs/hdac_hdmi.c +0 -0
index aaa038f..653fd9e 100644

sound/soc/codecs/hdac_hdmi.c static void hdac_hdmi_present_sense(struct hdac_hdmi_pin *pin, int repoll) · line 1075

Quoted 10 lines
sound/soc/codecs/hdac_hdmi.c +2 -0
@@ -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

#3 lore raw

Re: [PATCH 1/3] ASoC: hdac_hdmi: Increase loglevel of hex dump printed

Quoted 15 lines · Takashi Sakamoto

Hi,

Quoted 7 lines · On Apr 13 2016 07:08, [email protected] wrote:

From: Vedang Patel <[email protected]>

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.

Quoted 8 lines

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

Quoted 34 lines
Quoted 19 lines

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.

---
  sound/soc/codecs/hdac_hdmi.c | 2 ++
  1 file changed, 2 insertions(+)
sound/soc/codecs/hdac_hdmi.c +0 -0
index aaa038f..653fd9e 100644
@@ -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);
  			}

sound/soc/codecs/hdac_hdmi.c static void hdac_hdmi_present_sense(struct · line 1075

Quoted 10 lines
sound/soc/codecs/hdac_hdmi.c +2 -1
 
+#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

#4 lore raw

Re: [PATCH 1/3] ASoC: hdac_hdmi: Increase loglevel of hex dump printed

Quoted 25 lines · Vedang Patel
Quoted 24 lines · Takashi Sakamoto

Hi,

Quoted 9 lines · On Apr 13 2016 07:08, [email protected] wrote:

From: Vedang Patel <[email protected]>

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.

Quoted 8 lines
Quoted 2 lines

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

Quoted 1 line

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

Quoted 40 lines
Quoted 35 lines
Quoted 21 lines

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.

---
  sound/soc/codecs/hdac_hdmi.c | 2 ++
  1 file changed, 2 insertions(+)
sound/soc/codecs/hdac_hdmi.c +0 -0
index aaa038f..653fd9e 100644
@@ -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);
  > > > 	> > > 	> > > 	> > > }

sound/soc/codecs/hdac_hdmi.c static void hdac_hdmi_present_sense(struct

Quoted 10 lines
sound/soc/codecs/hdac_hdmi.c +2 -1
 
+#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

Quoted 1 line

Takashi Sakamoto

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#5 lore raw

PATCH 2/3 ASoC: Intel: common: increase the loglevel of "FW Poll Status".

In reply to [email protected]

From: Vedang Patel <[email protected]>

For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.

---
 sound/soc/intel/common/sst-dsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/sst-dsp.c +1 -1
index b5bbdf4..ff2196e 100644
@@ -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;
 
Signature · 1 line
2.1.2
maintainer
#6 lore raw

Applied "ASoC: Intel: common: increase the loglevel of "FW Poll Status"." to the asoc tree

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

Quoted 1 line

From ef06b6f3912f4438f9275922dae17c11360ceefc Mon Sep 17 00:00:00 2001

From: Vedang Patel <[email protected]>
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.

---
 sound/soc/intel/common/sst-dsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/sst-dsp.c +1 -1
index b5bbdf4fe93a..ff2196ef359f 100644
@@ -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;
 
Signature · 1 line
2.8.1
#7 lore raw

PATCH 3/3 ASoC: Intel: Skylake: Increase loglevel of debug messages.

In reply to [email protected]

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/intel/skylake/skl-messages.c | 2 ++
 sound/soc/intel/skylake/skl-sst-ipc.c  | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/skl-messages.c +2 -0
index e3d149c..da2dbb2 100644
@@ -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;
 }
 
sound/soc/intel/skylake/skl-sst-ipc.c +5 -2
index 5434602..5ee1420 100644
@@ -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);
Signature · 1 line
2.1.2
#8 lore raw

v2 cover ASoC: Reduce audio related kernel spew.

From: Vedang Patel <[email protected]>

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(-)
Signature · 1 line
2.1.2
#9 lore raw

PATCH v2 1/3 ASoC: hdac_hdmi: Increase loglevel of hex dump printed

From: Vedang Patel <[email protected]>

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
---
 sound/soc/codecs/hdac_hdmi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/hdac_hdmi.c +3 -2
index aaa038f..def565d 100644
@@ -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;
Signature · 1 line
2.1.2
#10 lore raw

PATCH v2 2/3 ASoC: Intel: common: increase the loglevel of "FW Poll Status".

In reply to [email protected]

From: Vedang Patel <[email protected]>

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
---
 sound/soc/intel/common/sst-dsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/sst-dsp.c +1 -1
index b5bbdf4..ff2196e 100644
@@ -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;
 
Signature · 1 line
2.1.2
#11 lore raw

PATCH v2 3/3 ASoC: Intel: Skylake: Increase loglevel of debug messages.

In reply to [email protected]

From: Vedang Patel <[email protected]>

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
---
 sound/soc/intel/skylake/skl-messages.c | 2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-messages.c +1 -1
index e3d149c..b208f56 100644
@@ -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;
 }
sound/soc/intel/skylake/skl-sst-ipc.c +2 -2
index 5434602..c141f24 100644
@@ -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);
Signature · 1 line
2.1.2
#12 lore raw

v3 cover ASoC: Reduce audio related kernel spew.

From: Vedang Patel <[email protected]>

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(-)
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH v3 1/3 ASoC: hdac_hdmi: Increase loglevel of hex dump printed

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/codecs/hdac_hdmi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/hdac_hdmi.c +4 -2
index 181cd3b..62d2181 100644
@@ -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;
Signature · 1 line
1.7.9.5
maintainer
#14 lore raw

Applied "ASoC: hdac_hdmi: Increase loglevel of hex dump printed" to the asoc tree

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

Quoted 1 line

From 3cb7cec14415ff8544ae702f396f913cd9008e7e Mon Sep 17 00:00:00 2001

From: Vedang Patel <[email protected]>
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.

---
 sound/soc/codecs/hdac_hdmi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/hdac_hdmi.c +4 -2
index 181cd3bf0b92..62d21812b9b8 100644
@@ -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;
Signature · 1 line
2.8.1
#15 lore raw

PATCH v3 2/3 ASoC: Intel: common: increase the loglevel of "FW Poll Status".

In reply to [email protected]

From: Vedang Patel <[email protected]>

For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.

---
 sound/soc/intel/common/sst-dsp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/sst-dsp.c +1 -1
index b5bbdf4..ff2196e 100644
@@ -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;
 
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v3 3/3 ASoC: Intel: Skylake: Increase loglevel of debug messages.

In reply to [email protected]

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/intel/skylake/skl-messages.c |    2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-messages.c +1 -1
index 226db84..81224de 100644
@@ -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;
 }
sound/soc/intel/skylake/skl-sst-ipc.c +2 -2
index 5434602..c141f24 100644
@@ -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);
Signature · 1 line
1.7.9.5
Acked-by on the v3 series
#17 lore raw
In reply to [email protected]
Quoted 7 lines · On Tue, May 31, 2016 at 06:14:58PM -0700, [email protected] wrote:

From: Vedang Patel <[email protected]>

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

Signature · 1 line
~Vinod
#18 lore raw

v3 cover ASoC: Reduce audio related kernel spew.

In reply to [email protected]

From: Vedang Patel <[email protected]>

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(-)
Signature · 1 line
1.7.9.5
#19 lore raw

PATCH v3 1/3 ASoC: hdac_hdmi: Increase loglevel of hex dump printed

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/codecs/hdac_hdmi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
sound/soc/codecs/hdac_hdmi.c +4 -2
index 181cd3b..62d2181 100644
@@ -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;
Signature · 1 line
1.7.9.5
#20 lore raw

PATCH v3 2/3 ASoC: Intel: common: increase the loglevel of "FW Poll Status".

In reply to [email protected]

From: Vedang Patel <[email protected]>

For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver.

---
 sound/soc/intel/common/sst-dsp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/common/sst-dsp.c +1 -1
index b5bbdf4..ff2196e 100644
@@ -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;
 
Signature · 1 line
1.7.9.5
#21 lore raw

PATCH v3 3/3 ASoC: Intel: Skylake: Increase loglevel of debug messages.

In reply to [email protected]

From: Vedang Patel <[email protected]>

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.

---
 sound/soc/intel/skylake/skl-messages.c |    2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-messages.c +1 -1
index 226db84..81224de 100644
@@ -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;
 }
sound/soc/intel/skylake/skl-sst-ipc.c +2 -2
index 5434602..c141f24 100644
@@ -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);
Signature · 1 line
1.7.9.5
maintainer
#22 lore raw
In reply to [email protected]
Quoted 4 lines · On Fri, Jun 24, 2016 at 05:37:08PM -0700, [email protected] wrote:

From: Vedang Patel <[email protected]>

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...

#23 lore raw

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

Quoted 8 lines · Mark Brown
Quoted 6 lines · On Fri, Jun 24, 2016 at 05:37:08PM -0700, [email protected] wrote:

From: Vedang Patel <[email protected]>

There have been complaints regarding audio related kernel messages flooding
dmesg. This series tries to address those complaints.

Quoted 7 lines

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...

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#24 lore raw
Quoted 2 lines · Vedang

Thanks Mark for merging the patches. I apologize for any unwanted noise in your inbox.

Please never *top post*

Quoted 6 lines

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!

Quoted 20 lines

Thanks,
Vedang

Quoted 15 lines · Mark Brown
Quoted 6 lines · On Fri, Jun 24, 2016 at 05:37:08PM -0700, [email protected] wrote:

From: Vedang Patel <[email protected]>

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...

Signature · 1 line
~Vinod
maintainer
#25 lore raw
Quoted 8 lines · Vinod Koul
Quoted 5 lines · Vedang

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?

Quoted 4 lines

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

maintainer
#26 lore raw

Applied "ASoC: Intel: Skylake: Increase loglevel of debug messages." to the asoc tree

In reply to [email protected]

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

Quoted 1 line

From 91c1832579700891747820862633f9a8d0d81fa4 Mon Sep 17 00:00:00 2001

From: Vedang Patel <[email protected]>
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.

---
 sound/soc/intel/skylake/skl-messages.c | 2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/intel/skylake/skl-messages.c +1 -1
index 804091aa6e64..6902020df946 100644
@@ -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;
 }
sound/soc/intel/skylake/skl-sst-ipc.c +2 -2
index 543460293b00..c141f24cae05 100644
@@ -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);
Signature · 1 line
2.8.1