]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: utils: Add generic function to get the reply for a tx message
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Tue, 16 Nov 2021 15:21:34 +0000 (17:21 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 17 Nov 2021 13:04:48 +0000 (13:04 +0000)
commit5597ead2fc482a6e9f1fed06e2bdee3526708fbe
tree1944102f218b8e919dadf1a7540fc4a938bb4434
parent718672e2099b842e160c108cae4443cedb7a67a2
ASoC: SOF: utils: Add generic function to get the reply for a tx message

The code to get the reply for a tx is identical in all but one place:
imx8_get_reply(), imx8m_get_reply(), atom_get_reply(), bdw_get_reply().

hda_dsp_ipc_get_reply() have additional check in place for PROBES and
special handling of PM messages.

Add a generic implementation to the core which can be used as drop in
replacement.

The reply size check is changed to be able to handle cases when the reply
size is not know beforehand (this is the case for PROBES and
DEBUG_MEM_USAGE for example).

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-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc.c
sound/soc/sof/sof-priv.h