diff mbox series

ASoC: SOF: ipc4-topology: Add module ID print during module set up

Message ID 20231129122234.14515-1-peter.ujfalusi@linux.intel.com (mailing list archive)
State Accepted
Commit 8f464a410944650adc8d75c7711d7d56c5506da0
Headers show
Series ASoC: SOF: ipc4-topology: Add module ID print during module set up | expand

Commit Message

Peter Ujfalusi Nov. 29, 2023, 12:22 p.m. UTC
From: Baofeng Tian <baofeng.tian@intel.com>

This module ID will be used for module performance automatic analysis
for different modules, module name, module ID and module instance ID
will be combined as a new generated ID for current module, this ID
will be further used by analysis tools to identify current module.

Take below case as example:
0x030006 gain.11.1
3 is module instance ID, 6 is module ID and gain.11.1 is module name.

For pipeline widget print, keep as it is.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
---
 sound/soc/sof/ipc4-topology.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Mark Brown Nov. 29, 2023, 6:52 p.m. UTC | #1
On Wed, 29 Nov 2023 14:22:34 +0200, Peter Ujfalusi wrote:
> This module ID will be used for module performance automatic analysis
> for different modules, module name, module ID and module instance ID
> will be combined as a new generated ID for current module, this ID
> will be further used by analysis tools to identify current module.
> 
> Take below case as example:
> 0x030006 gain.11.1
> 3 is module instance ID, 6 is module ID and gain.11.1 is module name.
> 
> [...]

Applied to

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

Thanks!

[1/1] ASoC: SOF: ipc4-topology: Add module ID print during module set up
      commit: 8f464a410944650adc8d75c7711d7d56c5506da0

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/ipc4-topology.c b/sound/soc/sof/ipc4-topology.c
index b89065abb511..01f3f56495cd 100644
--- a/sound/soc/sof/ipc4-topology.c
+++ b/sound/soc/sof/ipc4-topology.c
@@ -2392,6 +2392,8 @@  static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
 	}
 
 	if (swidget->id != snd_soc_dapm_scheduler) {
+		int module_id = msg->primary & SOF_IPC4_MOD_ID_MASK;
+
 		ret = sof_ipc4_widget_assign_instance_id(sdev, swidget);
 		if (ret < 0) {
 			dev_err(sdev->dev, "failed to assign instance id for %s\n",
@@ -2407,9 +2409,15 @@  static int sof_ipc4_widget_setup(struct snd_sof_dev *sdev, struct snd_sof_widget
 
 		msg->extension &= ~SOF_IPC4_MOD_EXT_PPL_ID_MASK;
 		msg->extension |= SOF_IPC4_MOD_EXT_PPL_ID(pipe_widget->instance_id);
+
+		dev_dbg(sdev->dev, "Create widget %s (pipe %d) - ID %d, instance %d, core %d\n",
+			swidget->widget->name, swidget->pipeline_id, module_id,
+			swidget->instance_id, swidget->core);
+	} else {
+		dev_dbg(sdev->dev, "Create pipeline %s (pipe %d) - instance %d, core %d\n",
+			swidget->widget->name, swidget->pipeline_id,
+			swidget->instance_id, swidget->core);
 	}
-	dev_dbg(sdev->dev, "Create widget %s instance %d - pipe %d - core %d\n",
-		swidget->widget->name, swidget->instance_id, swidget->pipeline_id, swidget->core);
 
 	msg->data_size = ipc_size;
 	msg->data_ptr = ipc_data;