Skip to content

Commit d7a1ed2

Browse files
ranj063broonie
authored andcommitted
ASoC: SOF: ipc: ignore DSP replies received when they are not expected
We currently ignore the reply messages from the DSP when they are not expected but call it out as an error. Change the error message to a debug message. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Link: https://lore.kernel.org/r/20200526203640.25980-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 6822437 commit d7a1ed2

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎sound/soc/sof/ipc.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,21 +335,20 @@ int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, u32 header,
335335
EXPORT_SYMBOL(sof_ipc_tx_message_no_pm);
336336

337337
/* handle reply message from DSP */
338-
int snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id)
338+
void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id)
339339
{
340340
struct snd_sof_ipc_msg *msg = &sdev->ipc->msg;
341341

342342
if (msg->ipc_complete) {
343-
dev_err(sdev->dev, "error: no reply expected, received 0x%x",
343+
dev_dbg(sdev->dev,
344+
"no reply expected, received 0x%x, will be ignored",
344345
msg_id);
345-
return -EINVAL;
346+
return;
346347
}
347348

348349
/* wake up and return the error if we have waiters on this message ? */
349350
msg->ipc_complete = true;
350351
wake_up(&msg->waitq);
351-
352-
return 0;
353352
}
354353
EXPORT_SYMBOL(snd_sof_ipc_reply);
355354

‎sound/soc/sof/sof-priv.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ int snd_sof_fw_parse_ext_data(struct snd_sof_dev *sdev, u32 bar, u32 offset);
480480
*/
481481
struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev);
482482
void snd_sof_ipc_free(struct snd_sof_dev *sdev);
483-
int snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
483+
void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id);
484484
void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev);
485485
int snd_sof_ipc_stream_pcm_params(struct snd_sof_dev *sdev,
486486
struct sof_ipc_pcm_params *params);

0 commit comments

Comments
 (0)