Skip to content
Unverified Commit 5db8eb5b authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

ASoC: SOF: ipc: Use msg->reply_data directly in snd_sof_ipc_get_reply()



Instead of using a local reply to first read out the header from the
mailbox then memcpy it or read it again to msg->reply_data, read it
directly to it's final place from the start.

If we received an error we do not need to do a memcpy anymore.
If the reply is reporting a success then we don not need to read the reply
again from the mailbox if the reply_size equals to the already read header
size.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220330201926.1330402-9-ranjani.sridharan@linux.intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 249ee180
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment