Skip to content

Commit

Permalink
[NOT FOR UPSTREAM] ASoC: SOF: Don't suspend in IPC4 mode
Browse files Browse the repository at this point in the history
Currently we are not able to wake DSP up once it is suspended in IPC4
mode. This patch uses pm_runtime_get() to prevent DSP from entering
suspend. This should be revert once PM is supported in IPC4 mode.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
  • Loading branch information
bardliao authored and plbossart committed Sep 29, 2021
1 parent dc0a6f1 commit 663c0fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sound/soc/sof/ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ int sof_ipc4_init_msg_memory(struct snd_sof_dev *sdev)
if (!msg->reply_data)
return -ENOMEM;

/*
* TODO: Currently we are not able to wake DSP up once it is suspended.
* Calling pm_runtime_get_sync() here to prevent it from entering
* suspend. This should be removed once power management is implemented
*/
pm_runtime_get_sync(sdev->dev);
return 0;
}
EXPORT_SYMBOL(sof_ipc4_init_msg_memory);
Expand Down
10 changes: 10 additions & 0 deletions sound/soc/sof/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,5 +863,15 @@ void snd_sof_fw_unload(struct snd_sof_dev *sdev)
/* TODO: support module unloading at runtime */
release_firmware(sdev->pdata->fw);
sdev->pdata->fw = NULL;

/*
* TODO: Currently we are not able to wake DSP up once it is suspended.
* Therefore pm_runtime_get_sync() is called by sof_ipc4_init_msg_memory()
* to prevent DSP from entering suspend. Call pm_runtime_put_noidle()
* here to balance it.
*/
if (sof_get_abi_major(sdev) >= 4)
pm_runtime_put_noidle(sdev->dev);

}
EXPORT_SYMBOL(snd_sof_fw_unload);

0 comments on commit 663c0fc

Please sign in to comment.