ASoC: SOF: ipc: Add probe message logging to ipc_log_header()
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 16 Sep 2021 10:32:06 +0000 (13:32 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 16 Sep 2021 13:04:09 +0000 (14:04 +0100)
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>
Link: https://lore.kernel.org/r/20210916103211.1573-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c

index 18e0bfc1d8a905ed40cafed1fe5c9fa31e5ae12c..8145b0d5564a578d9083bbd20127e71558d97b2f 100644 (file)
@@ -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;
        }