ASoC: SOF: ignore suspend/resume for D0ix compatible streams
authorKeyon Jie <yang.jie@linux.intel.com>
Fri, 25 Oct 2019 22:41:18 +0000 (17:41 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 28 Oct 2019 14:45:53 +0000 (14:45 +0000)
commitac8c046f19f94ec419c60d7a073af75a71386e97
treebbe84047d476f70b9f808cf583e6fefebb226fd9
parent0b50b3b1c3bc2a2c9eeab418b3de3e60e0530cf4
ASoC: SOF: ignore suspend/resume for D0ix compatible streams

During system suspend, the PM framework will freeze all applications and
the ALSA/ASoC core will suspend all RUNNING PCM streams.

However, D0ix-compatible PCM streams should keep the related pipelines
active in the DSP when the system is entering S0ix. The TRIGGER_SUSPEND
event is trapped in such cases to prevent the pipelines from being
stopped. Likewise, the TRIGGER_RESUME/START events should not affect the
pipeline state.

The SOF driver also triggers some DSP Firmware pipelines based on the
DAPM widgets power events. In such cases, we also ignore PRE_PMU and
POST_PMD events to keep the pipelines active.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191025224122.7718-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c
sound/soc/sof/topology.c