All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org,
	pierre-louis.bossart@linux.intel.com
Cc: alsa-devel@alsa-project.org, daniel.baluta@nxp.com,
	ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com
Subject: [PATCH 1/6] ASoC: SOF: ipc: Add probe message logging to ipc_log_header()
Date: Thu, 16 Sep 2021 13:32:06 +0300	[thread overview]
Message-ID: <20210916103211.1573-2-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20210916103211.1573-1-peter.ujfalusi@linux.intel.com>

Probe related messages are missing from the logging, for example the
PROBE_INIT would show up as:

ipc tx: 0xc0010000: unknown GLB command
ipc tx succeeded: 0xc0010000: unknown GLB command

Add code to handle  the probe messages to have human readable output

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/ipc.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index a4fe007a0e4d..32c139631f11 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -192,6 +192,29 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd)
 			str2 = "unknown type"; break;
 		}
 		break;
+	case SOF_IPC_GLB_PROBE:
+		str = "GLB_PROBE";
+		switch (type) {
+		case SOF_IPC_PROBE_INIT:
+			str2 = "INIT"; break;
+		case SOF_IPC_PROBE_DEINIT:
+			str2 = "DEINIT"; break;
+		case SOF_IPC_PROBE_DMA_ADD:
+			str2 = "DMA_ADD"; break;
+		case SOF_IPC_PROBE_DMA_INFO:
+			str2 = "DMA_INFO"; break;
+		case SOF_IPC_PROBE_DMA_REMOVE:
+			str2 = "DMA_REMOVE"; break;
+		case SOF_IPC_PROBE_POINT_ADD:
+			str2 = "POINT_ADD"; break;
+		case SOF_IPC_PROBE_POINT_INFO:
+			str2 = "POINT_INFO"; break;
+		case SOF_IPC_PROBE_POINT_REMOVE:
+			str2 = "POINT_REMOVE"; break;
+		default:
+			str2 = "unknown type"; break;
+		}
+		break;
 	default:
 		str = "unknown GLB command"; break;
 	}
-- 
2.33.0


  reply	other threads:[~2021-09-16 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16 10:32 [PATCH 0/6] ASoC: SOF: Clean up the probe support Peter Ujfalusi
2021-09-16 10:32 ` Peter Ujfalusi [this message]
2021-09-16 10:32 ` [PATCH 2/6] ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference Peter Ujfalusi
2021-09-16 10:32 ` [PATCH 3/6] ASoC: SOF: compress: move and export sof_probe_compr_ops Peter Ujfalusi
2021-09-16 10:32 ` [PATCH 4/6] ASoC: SOF: probe: Merge and clean up the probe and compress files Peter Ujfalusi
2021-09-16 10:32 ` [PATCH 5/6] ASoC: SOF: Intel: Rename hda-compress.c to hda-probes.c Peter Ujfalusi
2021-09-16 10:32 ` [PATCH 6/6] ASoC: SOF: sof-probes: Correct the function names used for snd_soc_cdai_ops Peter Ujfalusi
2021-09-16 15:14 ` [PATCH 0/6] ASoC: SOF: Clean up the probe support Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210916103211.1573-2-peter.ujfalusi@linux.intel.com \
    --to=peter.ujfalusi@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.