Commit fd01a151 authored by Venkata Prasad Potturu's avatar Venkata Prasad Potturu Committed by Mark Brown

ASoC: SOF: amd: Add support for IPC with a reply_size set to zero

Add support for IPC tx_message with a reply_size set to zero,
return zero when message reply_size is zero at acp_dsp_ipc_get_reply().
Signed-off-by: default avatarVenkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230614103707.2246296-1-venkataprasad.potturu@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a3f6df1b
...@@ -130,6 +130,13 @@ static void acp_dsp_ipc_get_reply(struct snd_sof_dev *sdev) ...@@ -130,6 +130,13 @@ static void acp_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
memcpy(msg->reply_data, &reply, sizeof(reply)); memcpy(msg->reply_data, &reply, sizeof(reply));
ret = reply.error; ret = reply.error;
} else { } else {
/*
* To support an IPC tx_message with a
* reply_size set to zero.
*/
if (!msg->reply_size)
goto out;
/* reply correct size ? */ /* reply correct size ? */
if (reply.hdr.size != msg->reply_size && if (reply.hdr.size != msg->reply_size &&
!(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) { !(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment