ASoC: SOF: pm: handle resume on legacy Intel platforms
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Tue, 26 May 2020 20:36:34 +0000 (15:36 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 27 May 2020 13:06:54 +0000 (14:06 +0100)
Add new case when set_power_state() is not supported, e.g. for Intel
Baytrail/Cherrytrail legacy platforms.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200526203640.25980-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pm.c

index 5e804a7..92e5f9b 100644 (file)
@@ -114,8 +114,12 @@ static int sof_resume(struct device *dev, bool runtime_resume)
                return ret;
        }
 
-       /* Nothing further to do if resuming from a low-power D0 substate */
-       if (!runtime_resume && old_state == SOF_DSP_PM_D0)
+       /*
+        * Nothing further to be done for platforms that support the low power
+        * D0 substate.
+        */
+       if (!runtime_resume && sof_ops(sdev)->set_power_state &&
+           old_state == SOF_DSP_PM_D0)
                return 0;
 
        sdev->fw_state = SOF_FW_BOOT_PREPARE;