]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc0fa61b3946fc18d299c86e285f46a16b43134a1
treec24db6695846154814843ee673e57b78e7ef5aa8
parentfb719cf5e6c4a4de40113ad9da5f0c8e3883f3ce
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