ASoC: SOF: reduce default verbosity of IPC logs
Subsystems (3)
PATCH 1/1 ASoC: SOF: reduce default verbosity of IPC logs
We currently log the initiation of an IPC as well at its success.
[ 3906.106987] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x80010000: GLB_DAI_MSG: CONFIG [ 3906.107189] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x80010000: GLB_DAI_MSG: CONFIG
This is overkill in most cases, we already have a message thrown in case of errors and have tracepoints enabled to check for IPC duration. The only case where this might be useful is to check if there is an interleaved IPC RX. Add a flag and only print those logs if enabled.
In addition, the DMA_POSITION_UPDATE for traces brings limited information in most cases and pollutes the logs for no good reason.
[ 3906.322256] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.322308] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.822261] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3906.822319] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3907.822261] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3907.822319] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3908.822251] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG: DMA_POSITION [ 3908.822309] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG: DMA_POSITION
This information is only helpful when debugging the trace support, not when using the trace. Add a flag to only print DMA position update logs if enabled.
--- sound/soc/sof/ipc3.c | 5 ++++- sound/soc/sof/sof-priv.h | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
sound/soc/sof/ipc3.c +4 -1
@@ -147,6 +147,8 @@ static void ipc3_log_header(struct device *dev, u8 *text, u32 cmd)case SOF_IPC_TRACE_DMA_PARAMS : str2 ="DMA_PARAMS" ;break ;case SOF_IPC_TRACE_DMA_POSITION : +if (!sof_debug_check_flag (SOF_DBG_PRINT_DMA_POSITION_UPDATE_LOGS )) +return ; str2 ="DMA_POSITION" ;break ;case SOF_IPC_TRACE_DMA_PARAMS_EXT : str2 ="DMA_PARAMS_EXT" ;break ;
@@ -299,7 +301,8 @@ static int ipc3_wait_tx_done(struct snd_sof_ipc *ipc, void *reply_data)"ipc tx error for %#x (msg/reply size: %d/%zu): %d\n" , hdr->cmd, hdr->size, msg->reply_size, ret); }else { -ipc3_log_header (sdev->dev,"ipc tx succeeded" , hdr->cmd); +if (sof_debug_check_flag (SOF_DBG_PRINT_IPC_SUCCESS_LOGS )) +ipc3_log_header (sdev->dev,"ipc tx succeeded" , hdr->cmd);if (msg->reply_size)/* copy the data returned from DSP */ memcpy(reply_data, msg->reply_data,
sound/soc/sof/sof-priv.h +6 -0
@@ -37,6 +37,12 @@#define SOF_DBG_IGNORE_D3_PERSISTENT BIT(7)/* ignore the DSP D3 persistent capability * and always download firmware upon D3 exit */ +#define SOF_DBG_PRINT_DMA_POSITION_UPDATE_LOGS BIT(8)/* print DMA position updates +* in dmesg logs +*/ +#define SOF_DBG_PRINT_IPC_SUCCESS_LOGS BIT(9)/* print IPC success +* in dmesg logs +*/ /* Flag definitions used for controlling the DSP dump behavior */ #define SOF_DBG_DUMP_REGS BIT(0)
Signature · 1 line
2.34.1
Mark Brown
maintainerQuoted 5 lines · Pierre-Louis Bossart
We currently log the initiation of an IPC as well at its success.
[ 3906.106987] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x80010000: GLB_DAI_MSG: CONFIG [ 3906.107189] kernel: sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x80010000: GLB_DAI_MSG: CONFIG
Quoted 7 lines
This is overkill in most cases, we already have a message thrown in case of errors and have tracepoints enabled to check for IPC duration. The only case where this might be useful is to check if there is an interleaved IPC RX. Add a flag and only print those logs if enabled.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: reduce default verbosity of IPC logs
commit: f7309dbe628d5c8653d5f3649ef05a65c9b88daf
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