aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeyon Jie <[email protected]>2019-11-11 16:33:43 -0600
committerMark Brown <[email protected]>2019-11-12 12:10:59 +0000
commit5e35d5f4224adb24c2bfa814b9fb562050aba3ea (patch)
tree59e4b6ee000af8db6dcbef185d97a9b2a01c236d
parenta77e5d573f847d2f984c38eb711351326bc55258 (diff)
ASoC: SOF: PM: only suspend to D0I3 when needed
We should suspend audio to D3 by default, for the sake of power saving, change the condition of D0I3 suspending here to that when there is stream with suspend_ignored specified. Signed-off-by: Keyon Jie <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/sof/pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c
index b89810bf3230..0fd5567237a8 100644
--- a/sound/soc/sof/pm.c
+++ b/sound/soc/sof/pm.c
@@ -468,7 +468,7 @@ int snd_sof_resume(struct device *dev)
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
int ret;
- if (sdev->s0_suspend) {
+ if (snd_sof_dsp_d0i3_on_suspend(sdev)) {
/* resume from D0I3 */
dev_dbg(sdev->dev, "DSP will exit from D0i3...\n");
ret = snd_sof_set_d0_substate(sdev, SOF_DSP_D0I0);
@@ -497,7 +497,7 @@ int snd_sof_suspend(struct device *dev)
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
int ret;
- if (sdev->s0_suspend) {
+ if (snd_sof_dsp_d0i3_on_suspend(sdev)) {
/* suspend to D0i3 */
dev_dbg(sdev->dev, "DSP is trying to enter D0i3...\n");
ret = snd_sof_set_d0_substate(sdev, SOF_DSP_D0I3);