diff options
author | Venkata Prasad Potturu <venkataprasad.potturu@amd.com> | 2023-06-14 16:07:05 +0530 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-06-14 12:27:00 +0100 |
commit | fd01a15164a15328fd96f9ce820f0fc9f700f00b (patch) | |
tree | 82313833ecc52f3c6b81f9d6cd40baf4d55c043c /sound/soc/sof | |
parent | a3f6df1bf514516d276e90d38ca11581701f2e8e (diff) |
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: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://lore.kernel.org/r/20230614103707.2246296-1-venkataprasad.potturu@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r-- | sound/soc/sof/amd/acp-ipc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/amd/acp-ipc.c b/sound/soc/sof/amd/acp-ipc.c index 749e856dc601..8a0fc635a997 100644 --- a/sound/soc/sof/amd/acp-ipc.c +++ b/sound/soc/sof/amd/acp-ipc.c @@ -130,6 +130,13 @@ static void acp_dsp_ipc_get_reply(struct snd_sof_dev *sdev) memcpy(msg->reply_data, &reply, sizeof(reply)); ret = reply.error; } else { + /* + * To support an IPC tx_message with a + * reply_size set to zero. + */ + if (!msg->reply_size) + goto out; + /* reply correct size ? */ if (reply.hdr.size != msg->reply_size && !(reply.hdr.cmd & SOF_IPC_GLB_PROBE)) { |