Skip to contentSkip to conversation

ASoC: improve core dmesg logs and verbosity

PATCH In review Pierre-Louis Bossart 2 participants 5 messages Jun 12, 2020 – Jun 15, 2020

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

cover ASoC: improve core dmesg logs and verbosity

Try to both reduce useless verbosity and keep useful error reports.

Pierre-Louis Bossart (3):
ASoC: soc-core: reduce verbosity of BE override message
ASoC: soc-pcm: improve error messages in soc_pcm_new()
ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages

 sound/soc/soc-compress.c |  4 ++--
 sound/soc/soc-core.c     |  4 ++--
 sound/soc/soc-pcm.c      | 13 +++++++------
 3 files changed, 11 insertions(+), 10 deletions(-)
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/3 ASoC: soc-core: reduce verbosity of BE override message

With dynamic debug not enabled, we still see this sort of messages:

[   47.656671] sof_sdw sof_sdw: info: override BE DAI link SDW0-Playback
[   47.656677] sof_sdw sof_sdw: info: override BE DAI link SDW0-Capture
[   47.656682] sof_sdw sof_sdw: info: override BE DAI link SDW1-Playback
[   47.656686] sof_sdw sof_sdw: info: override BE DAI link SDW3-Capture
[   47.656691] sof_sdw sof_sdw: info: override BE DAI link iDisp1
[   47.656695] sof_sdw sof_sdw: info: override BE DAI link iDisp2
[   47.656699] sof_sdw sof_sdw: info: override BE DAI link iDisp3

This is not really helpful for most users, move to dev_dbg.

---
 sound/soc/soc-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +2 -2
index 0f30f5aabaa8..e607a4927933 100644
@@ -1638,8 +1638,8 @@ static void soc_check_tplg_fes(struct snd_soc_card *card)
 				continue;
 			}
 
-			dev_info(card->dev, "info: override BE DAI link %s\n",
-				 card->dai_link[i].name);
+			dev_dbg(card->dev, "info: override BE DAI link %s\n",
+				card->dai_link[i].name);
 
 			/* override platform component */
 			if (!dai_link->platforms) {
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 ASoC: soc-pcm: improve error messages in soc_pcm_new()

In reply to Pierre-Louis Bossart

Provide an explicit dmesg trace with the PCM 'new_name', dailink name and error code to help with debug.

---
 sound/soc/soc-pcm.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/soc-pcm.c +4 -3
index 2c114b4542ce..08e3daf16384 100644
@@ -2891,8 +2891,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 			capture, &pcm);
 	}
 	if (ret < 0) {
-		dev_err(rtd->card->dev, "ASoC: can't create pcm for %s\n",
-			rtd->dai_link->name);
+		dev_err(rtd->card->dev, "ASoC: can't create pcm %s for dailink %s: %d\n",
+			new_name, rtd->dai_link->name, ret);
 		return ret;
 	}
 	dev_dbg(rtd->card->dev, "ASoC: registered pcm #%d %s\n",num, new_name);
@@ -2957,7 +2957,8 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 
 	ret = snd_soc_pcm_component_new(rtd);
 	if (ret < 0) {
-		dev_err(rtd->dev, "ASoC: pcm constructor failed: %d\n", ret);
+		dev_err(rtd->dev, "ASoC: pcm %s constructor failed for dailink %s: %d\n",
+			new_name, rtd->dai_link->name, ret);
 		return ret;
 	}
 
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/3 ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages

In reply to Pierre-Louis Bossart

With dynamic debug not enabled, we still get these messages:

[   48.133586] sof_sdw sof_sdw: rt711-aif1 <-> SDW0 Pin2 mapping ok
[   48.133595] sof_sdw sof_sdw: rt711-aif1 <-> SDW0 Pin3 mapping ok
[   48.133650] sof_sdw sof_sdw: sdw:1:25d:1308:0 <-> SDW1 Pin2 mapping ok
[   48.133658] sof_sdw sof_sdw: rt715-aif2 <-> SDW3 Pin2 mapping ok
[   48.133666] sof_sdw sof_sdw: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok
[   48.133672] sof_sdw sof_sdw: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok
[   48.133677] sof_sdw sof_sdw: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok
[   48.133712] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Headphone 0 mapping ok
[   48.133733] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Headset mic 1 mapping ok
[   48.133746] sof_sdw sof_sdw: snd-soc-dummy-dai <-> SDW1-speakers 2 mapping ok
[   48.133762] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Microphones 4 mapping ok
[   48.133774] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI1 5 mapping ok
[   48.133798] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI2 6 mapping ok
[   48.133809] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI3 7 mapping ok

This is not really useful for most users, demote to dev_dbg()

---
 sound/soc/soc-compress.c | 4 ++--
 sound/soc/soc-pcm.c      | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/soc-compress.c +2 -2
index 4984b6a2c370..415510909a82 100644
@@ -867,8 +867,8 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 	rtd->compr = compr;
 	compr->private_data = rtd;
 
-	dev_info(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n",
-		 codec_dai->name, cpu_dai->name);
+	dev_dbg(rtd->card->dev, "Compress ASoC: %s <-> %s mapping ok\n",
+		codec_dai->name, cpu_dai->name);
 
 	return 0;
 }
sound/soc/soc-pcm.c +3 -3
index 08e3daf16384..d8073fef68c9 100644
@@ -2964,9 +2964,9 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 
 	pcm->no_device_suspend = true;
 out:
-	dev_info(rtd->card->dev, "%s <-> %s mapping ok\n",
-		 (rtd->num_codecs > 1) ? "multicodec" : asoc_rtd_to_codec(rtd, 0)->name,
-		 (rtd->num_cpus > 1)   ? "multicpu"   : asoc_rtd_to_cpu(rtd, 0)->name);
+	dev_dbg(rtd->card->dev, "%s <-> %s mapping ok\n",
+		(rtd->num_codecs > 1) ? "multicodec" : asoc_rtd_to_codec(rtd, 0)->name,
+		(rtd->num_cpus > 1)   ? "multicpu"   : asoc_rtd_to_cpu(rtd, 0)->name);
 	return ret;
 }
 
Signature · 1 line
2.20.1
maintainer
#4 lore raw
In reply to Pierre-Louis Bossart
Quoted 8 lines · Pierre-Louis Bossart

Try to both reduce useless verbosity and keep useful error reports.

Pierre-Louis Bossart (3):
ASoC: soc-core: reduce verbosity of BE override message
ASoC: soc-pcm: improve error messages in soc_pcm_new()
ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: soc-core: reduce verbosity of BE override message

      commit: 1328948fea693679ab81601aa72a9ed6025f81ea
[2/3] ASoC: soc-pcm: improve error messages in soc_pcm_new()
      commit: 799827a42045e77a34bd4a90ba8bde372ed8058d
[3/3] ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages
      commit: 1d5cd5254f67bc65622f4cac04c25d6e082f21b0

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