1
0
Fork 0

MLK-23560-2: ASoC: SOF: Enable PM support

We need to provide PM macros in order for the SOF core
to suspend/resume the DSP.

PM support on the DSP side is quite limited and we are mostly
doing PM for ARM core.

Without this patch DSP won't be restarted after a resume causing
SOF driver calls to time out.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Daniel Baluta 2020-03-12 13:05:07 +02:00
parent 8a7fd2a7a6
commit e5e991a741
1 changed files with 24 additions and 0 deletions

View File

@ -378,6 +378,18 @@ static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev,
return 0;
}
int imx8_dsp_resume(struct snd_sof_dev *sdev)
{
/* nothing to do for now */
return 0;
}
int imx8_dsp_suspend(struct snd_sof_dev *sdev)
{
/* nothing to do for now */
return 0;
}
static struct snd_soc_dai_driver imx8_dai[] = {
{
.name = "esai-port",
@ -414,6 +426,12 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
/* DAI drivers */
.drv = imx8_dai,
.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
/* PM */
.suspend = imx8_dsp_suspend,
.resume = imx8_dsp_resume,
.runtime_suspend = imx8_dsp_suspend,
.runtime_resume = imx8_dsp_resume,
};
EXPORT_SYMBOL(sof_imx8_ops);
@ -447,6 +465,12 @@ struct snd_sof_dsp_ops sof_imx8x_ops = {
/* DAI drivers */
.drv = imx8_dai,
.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
/* PM */
.suspend = imx8_dsp_suspend,
.resume = imx8_dsp_resume,
.runtime_suspend = imx8_dsp_suspend,
.runtime_resume = imx8_dsp_resume,
};
EXPORT_SYMBOL(sof_imx8x_ops);