ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC events
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 10 Feb 2022 15:05:19 +0000 (17:05 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 10 Feb 2022 15:19:03 +0000 (15:19 +0000)
commitab3a2189a3744527f54ace1be19eb13e6c3d24df
treec24db6695846154814843ee673e57b78e7ef5aa8
parent5fdc1242453e2ae88b2cdb607e4eda6b687f084c
ASoC: SOF: ipc: Read and pass the whole message to handlers for IPC events

Change the parameter list for the firmware initiated message (IPC event)
handler functions to:
handler(struct snd_sof_dev *sdev, void *full_msg);

Allocate memory and read the whole message in snd_sof_ipc_msgs_rx() then
pass the pointer to the function handling the message.
Do this only if we actually have a function which is tasked to process the
given type.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220210150525.30756-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c