Skip to content

Commit

Permalink
ASoC: SOF: intel: ipc: don't read mailbox for CTX_SAVE
Browse files Browse the repository at this point in the history
If the reply from the DSP is for a CTX_SAVE ipc, don't
read the mailbox, just return after setting the reply attributes.

Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
ranj063 committed Apr 3, 2019
1 parent bf3d5cf commit b591066
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sound/soc/sof/intel/hda-ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
reply.error = 0;
reply.hdr.cmd = SOF_IPC_GLB_REPLY;
reply.hdr.size = sizeof(reply);
} else {
/* get IPC reply from DSP in the mailbox */
sof_mailbox_read(sdev, sdev->host_box.offset, &reply,
sizeof(reply));
goto out;
}

/* get IPC reply from DSP in the mailbox */
sof_mailbox_read(sdev, sdev->host_box.offset, &reply,
sizeof(reply));

if (reply.error < 0) {
memcpy(msg->reply_data, &reply, sizeof(reply));
ret = reply.error;
Expand All @@ -109,6 +110,7 @@ void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev)
msg->reply_data, msg->reply_size);
}

out:
msg->reply_error = ret;

spin_unlock_irqrestore(&sdev->ipc_lock, flags);
Expand Down

0 comments on commit b591066

Please sign in to comment.