diff options
author | Daniel Baluta <daniel.baluta@nxp.com> | 2020-03-12 13:05:07 +0200 |
---|---|---|
committer | Daniel Baluta <daniel.baluta@nxp.com> | 2020-03-13 15:34:16 +0200 |
commit | e5e991a741a9554bf1c57eb9a1981a3d990e5132 (patch) | |
tree | 63e8740cf32a31daf91ed4daffb0a9c5fd56d501 /sound/soc/sof | |
parent | 8a7fd2a7a6d3c2ed8e23fa64baa0fdd04023a57e (diff) |
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>
Diffstat (limited to 'sound/soc/sof')
-rw-r--r-- | sound/soc/sof/imx/imx8.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c index d9d47972908b..8e07ee7a1f33 100644 --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@ -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); |