summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>2019-06-03 12:18:19 -0400
committerMark Brown <broonie@kernel.org>2019-06-03 13:42:27 -0400
commit53b22d25ec36cebc2f5888a0bd5fba84b05f3dee (patch)
treedc2018004ec9c1f9b70523267b891f669efdde56
parente3adc9495ab26fc4bfe29253d4e7aad47dab2307 (diff)
ASoC: SOF: ipc: Introduce SOF_IPC_GLB_TEST_MSG IPC command
Add a new class of IPC command along with the first test type, IPC_FLOOD, which will be used for flooding the DSP with IPCs. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--include/sound/sof/header.h6
-rw-r--r--sound/soc/sof/ipc.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/include/sound/sof/header.h b/include/sound/sof/header.h
index ab5862d80afe..12867bbd4372 100644
--- a/include/sound/sof/header.h
+++ b/include/sound/sof/header.h
@@ -49,6 +49,7 @@
49#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U) 49#define SOF_IPC_GLB_DAI_MSG SOF_GLB_TYPE(0x8U)
50#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U) 50#define SOF_IPC_GLB_TRACE_MSG SOF_GLB_TYPE(0x9U)
51#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU) 51#define SOF_IPC_GLB_GDB_DEBUG SOF_GLB_TYPE(0xAU)
52#define SOF_IPC_GLB_TEST_MSG SOF_GLB_TYPE(0xBU)
52 53
53/* 54/*
54 * DSP Command Message Types 55 * DSP Command Message Types
@@ -99,11 +100,14 @@
99#define SOF_IPC_STREAM_VORBIS_PARAMS SOF_CMD_TYPE(0x010) 100#define SOF_IPC_STREAM_VORBIS_PARAMS SOF_CMD_TYPE(0x010)
100#define SOF_IPC_STREAM_VORBIS_FREE SOF_CMD_TYPE(0x011) 101#define SOF_IPC_STREAM_VORBIS_FREE SOF_CMD_TYPE(0x011)
101 102
102/* trace and debug */ 103/* trace */
103#define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001) 104#define SOF_IPC_TRACE_DMA_PARAMS SOF_CMD_TYPE(0x001)
104#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002) 105#define SOF_IPC_TRACE_DMA_POSITION SOF_CMD_TYPE(0x002)
105#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003) 106#define SOF_IPC_TRACE_DMA_PARAMS_EXT SOF_CMD_TYPE(0x003)
106 107
108/* debug */
109#define SOF_IPC_TEST_IPC_FLOOD SOF_CMD_TYPE(0x001)
110
107/* Get message component id */ 111/* Get message component id */
108#define SOF_IPC_MESSAGE_ID(x) ((x) & 0xffff) 112#define SOF_IPC_MESSAGE_ID(x) ((x) & 0xffff)
109 113
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c
index 2414640a32d1..558b596e2133 100644
--- a/sound/soc/sof/ipc.c
+++ b/sound/soc/sof/ipc.c
@@ -175,6 +175,15 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd)
175 break; 175 break;
176 case SOF_IPC_GLB_TRACE_MSG: 176 case SOF_IPC_GLB_TRACE_MSG:
177 str = "GLB_TRACE_MSG"; break; 177 str = "GLB_TRACE_MSG"; break;
178 case SOF_IPC_GLB_TEST_MSG:
179 str = "GLB_TEST_MSG";
180 switch (type) {
181 case SOF_IPC_TEST_IPC_FLOOD:
182 str2 = "IPC_FLOOD"; break;
183 default:
184 str2 = "unknown type"; break;
185 }
186 break;
178 default: 187 default:
179 str = "unknown GLB command"; break; 188 str = "unknown GLB command"; break;
180 } 189 }