ASoC: SOF: Add PM support
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Fri, 12 Apr 2019 16:05:16 +0000 (11:05 -0500)
committerMark Brown <broonie@kernel.org>
Sat, 27 Apr 2019 17:49:22 +0000 (02:49 +0900)
commit8920153c6461da69e49014a35275dc80cbf6ba14
tree85bac998688cac0b88933ba6d39febea4ea6574e
parent4483151e765b5a7ffb823fe9bb11128101410427
ASoC: SOF: Add PM support

Add support for saving and restoring DSP context in D3 to host DDR.

The suspend callback includes: suspend all pcm's stream that are running,
send CTX_SAVE ipc, drop all ipc's, release trace dma and then
power off the DSP.

And the resume callback performs the following steps: load FW, run FW,
re-initialize trace, restore pipeline, restore the kcontrol values
and finally send the ctx restore ipc to the dsp.

The streams that are suspended are resumed by the ALSA resume trigger.
If the streams are paused during system suspend, they are marked
explicitly so they can be restored during PAUSE_RELEASE.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pm.c [new file with mode: 0644]