diff mbox series

ASoC: SOF: core: allow module parameter to override dma trace Kconfig

Message ID 20210907184648.33306-1-pierre-louis.bossart@linux.intel.com (mailing list archive)
State Accepted
Commit 6ade849e30b470d11d591528d7cebb3174298336
Headers show
Series ASoC: SOF: core: allow module parameter to override dma trace Kconfig | expand

Commit Message

Pierre-Louis Bossart Sept. 7, 2021, 6:46 p.m. UTC
Most distributions do not enable the SOF developer options and
specifically the DMA trace. This is problematic for end-user/community
support since the sof-logger tool cannot extract valuable information.

Conversely in rare cases the DMA trace can lead to Heisenbugs by
creating more traffic to system memory and more interrupts.

This patch changes the logic so that the Kconfig value is used as a
default value for a module parameter, but this value can be changed as
needed. Users can override the distro DMA trace selection.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/core.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Mark Brown Sept. 13, 2021, 10:53 a.m. UTC | #1
On Tue, 7 Sep 2021 13:46:47 -0500, Pierre-Louis Bossart wrote:
> Most distributions do not enable the SOF developer options and
> specifically the DMA trace. This is problematic for end-user/community
> support since the sof-logger tool cannot extract valuable information.
> 
> Conversely in rare cases the DMA trace can lead to Heisenbugs by
> creating more traffic to system memory and more interrupts.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: SOF: core: allow module parameter to override dma trace Kconfig
      commit: 6ade849e30b470d11d591528d7cebb3174298336

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
diff mbox series

Patch

diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c
index 3e4dd4a86363..6be4f159ee35 100644
--- a/sound/soc/sof/core.c
+++ b/sound/soc/sof/core.c
@@ -19,7 +19,7 @@ 
 #endif
 
 /* see SOF_DBG_ flags */
-int sof_core_debug;
+int sof_core_debug =  IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE);
 module_param_named(sof_debug, sof_core_debug, int, 0444);
 MODULE_PARM_DESC(sof_debug, "SOF core debug options (0x0 all off)");
 
@@ -202,8 +202,7 @@  static int sof_probe_continue(struct snd_sof_dev *sdev)
 		goto fw_run_err;
 	}
 
-	if (IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_ENABLE_FIRMWARE_TRACE) ||
-	    (sof_core_debug & SOF_DBG_ENABLE_TRACE)) {
+	if (sof_core_debug & SOF_DBG_ENABLE_TRACE) {
 		sdev->dtrace_is_supported = true;
 
 		/* init DMA trace */