Skip to content

Commit 1c91e92

Browse files
RanderWangbroonie
authored andcommitted
ASoC: SOF: ipc4: Wake up dsp core before sending ipc msg
The driver shall update the power state to D0i0 before sending a generic IPC. Power-related IPCs are the exception to the rule, they may be sent even when the power-state is D0i3 Signed-off-by: Rander Wang <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3c16883 commit 1c91e92

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sound/soc/sof/ipc4.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,17 @@ static int sof_ipc4_tx_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_
370370
if (!msg_data)
371371
return -EINVAL;
372372

373+
if (!no_pm) {
374+
const struct sof_dsp_power_state target_state = {
375+
.state = SOF_DSP_PM_D0,
376+
};
377+
378+
/* ensure the DSP is in D0i0 before sending a new IPC */
379+
ret = snd_sof_dsp_set_power_state(sdev, &target_state);
380+
if (ret < 0)
381+
return ret;
382+
}
383+
373384
/* Serialise IPC TX */
374385
mutex_lock(&ipc->tx_mutex);
375386

0 commit comments

Comments
 (0)