ASoC: SOF: debug: Add support for IPC message injection
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 16 Nov 2021 15:21:37 +0000 (17:21 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 13:04:51 +0000 (13:04 +0000)
commit2f0b1b013bbc5d6f4c7c386e12f423d6b4ef3245
tree95e68ad04288394942978b263f9939d843e62f85
parent0bd2891bda4550774946abbfac88443a16c15d5a
ASoC: SOF: debug: Add support for IPC message injection

In order to stress test the firmware's ability to handle (mis)crafted
IPC messages this patch adds a debugfs interface where a binary file
(message) can be written and the message is sent to the firmware as it is.

Read on the same file will return the reply from the firmware if it is
available as a binary.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20211116152137.52129-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/Kconfig
sound/soc/sof/debug.c
sound/soc/sof/sof-priv.h