From 0af7b820e39e2b9583e07db85bc7f0f96d8e1d6a Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 2 Apr 2020 20:49:48 +0200 Subject: [PATCH 1/4] ASoC: SOF: Turn "firmware boot complete" message into a dbg message Using a Canon Lake machine with the SOF driver causes dmesg to fill up with a ton of these messages: [ 275.902194] sof-audio-pci 0000:00:1f.3: firmware boot complete [ 351.529358] sof-audio-pci 0000:00:1f.3: firmware boot complete [ 560.049047] sof-audio-pci 0000:00:1f.3: firmware boot complete etc. Since the DSP is powered down when not in used this happens everytime e.g. a notification plays, polluting dmesg. Turn this messages into a debug message, matching what the code already does for the ""booting DSP firmware" message. Signed-off-by: Hans de Goede Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/loader.c b/sound/soc/sof/loader.c index fac5f6f0a54a48..8be30cd5e0382c 100644 --- a/sound/soc/sof/loader.c +++ b/sound/soc/sof/loader.c @@ -791,7 +791,7 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev) } if (sdev->fw_state == SOF_FW_BOOT_COMPLETE) - dev_info(sdev->dev, "firmware boot complete\n"); + dev_dbg(sdev->dev, "firmware boot complete\n"); else return -EIO; /* FW boots but fw_ready op failed */ From ef902d1c44619f52287d77f2676bb131fd8fe0cc Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 3 Apr 2020 11:58:17 -0500 Subject: [PATCH 2/4] soundwire: bus: reduce verbosity on enumeration No need to repeat the same info log on all enumerations (essentially each power-up), keep it as debug information. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 0c563d78cef908..a6637e739b3b66 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -569,9 +569,9 @@ static int sdw_assign_device_num(struct sdw_slave *slave) } if (!new_device) - dev_info(slave->bus->dev, - "Slave already registered, reusing dev_num:%d\n", - slave->dev_num); + dev_dbg(slave->bus->dev, + "Slave already registered, reusing dev_num:%d\n", + slave->dev_num); /* Clear the slave->dev_num to transfer message on device 0 */ dev_num = slave->dev_num; From bcf28058ef97264a774ec8dc4a3a48bc0a7193da Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 3 Apr 2020 16:27:23 -0500 Subject: [PATCH 3/4] Revert "[NOT FOR UPSTREAM] ASoC: SOF: enable DEBUG by default" This reverts commit 1549754e0d76c3c3c72235131de754fe54bf94d4. if you need dynamic debug, it's easy enough to add a /etc/modprobe.d/sof-dyndgb.conf with the following content options snd_sof_intel_byt dyndbg=+p options snd_sof_intel_bdw dyndbg=+p options snd_sof_intel_ipc dyndbg=+p options snd_sof_intel_hda_common dyndbg=+p options snd_sof_intel_hda dyndbg=+p options snd_sof dyndbg=+p options snd_sof_pci dyndbg=+p options snd_sof_acpi dyndbg=+p options snd_sof_of dyndbg=+p options snd_sof_nocodec dyndbg=+p options soundwire_bus dyndbg=+p options soundwire_generic_allocation dyndbg=+p options soundwire_cadence dyndbg=+p options soundwire_intel_init dyndbg=+p options soundwire_intel dyndbg=+p Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/Makefile | 2 -- sound/soc/sof/intel/Makefile | 2 -- sound/soc/sof/xtensa/Makefile | 2 -- 3 files changed, 6 deletions(-) diff --git a/sound/soc/sof/Makefile b/sound/soc/sof/Makefile index fd169a61024d58..8eca2f85c90e39 100644 --- a/sound/soc/sof/Makefile +++ b/sound/soc/sof/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -ccflags-y += -DDEBUG - snd-sof-objs := core.o ops.o loader.o ipc.o pcm.o pm.o debug.o topology.o\ control.o trace.o utils.o sof-audio.o snd-sof-$(CONFIG_SND_SOC_SOF_DEBUG_PROBES) += probe.o compress.o diff --git a/sound/soc/sof/intel/Makefile b/sound/soc/sof/intel/Makefile index 398f2e133919fe..cee02a2e00f402 100644 --- a/sound/soc/sof/intel/Makefile +++ b/sound/soc/sof/intel/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -ccflags-y += -DDEBUG - snd-sof-intel-byt-objs := byt.o snd-sof-intel-bdw-objs := bdw.o diff --git a/sound/soc/sof/xtensa/Makefile b/sound/soc/sof/xtensa/Makefile index 34b27be0f7be07..cc89c7472a3802 100644 --- a/sound/soc/sof/xtensa/Makefile +++ b/sound/soc/sof/xtensa/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) -ccflags-y += -DDEBUG - snd-sof-xtensa-dsp-objs := core.o obj-$(CONFIG_SND_SOC_SOF_XTENSA) += snd-sof-xtensa-dsp.o From d39cbb53e75742b4d2e87ea29a59796c5f602df4 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 3 Apr 2020 16:29:53 -0500 Subject: [PATCH 4/4] ASoC: codecs: rt1308-sdw: reduce verbosity These messages are generated at each enumeration, this is overkill. Move to dev_dbg [ 86.481709] rt1308 sdw:1:25d:1308:0: rt1308_io_init m_btl_l=0xffee, m_btl_r=0xffff [ 86.481714] rt1308 sdw:1:25d:1308:0: rt1308_io_init c_btl_l=0x28c, c_btl_r=0x113 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/rt1308-sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c index a5a7e46de246a4..1502a22b0d4a07 100644 --- a/sound/soc/codecs/rt1308-sdw.c +++ b/sound/soc/codecs/rt1308-sdw.c @@ -235,9 +235,9 @@ static int rt1308_io_init(struct device *dev, struct sdw_slave *slave) efuse_c_btl_r = tmp; regmap_read(rt1308->regmap, 0xc872, &tmp); efuse_c_btl_r = efuse_c_btl_r | (tmp << 8); - dev_info(&slave->dev, "%s m_btl_l=0x%x, m_btl_r=0x%x\n", __func__, + dev_dbg(&slave->dev, "%s m_btl_l=0x%x, m_btl_r=0x%x\n", __func__, efuse_m_btl_l, efuse_m_btl_r); - dev_info(&slave->dev, "%s c_btl_l=0x%x, c_btl_r=0x%x\n", __func__, + dev_dbg(&slave->dev, "%s c_btl_l=0x%x, c_btl_r=0x%x\n", __func__, efuse_c_btl_l, efuse_c_btl_r); /* initial settings */