]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: SOF: pm: add definitions for S4 and S5 states
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 16 Jun 2022 20:18:17 +0000 (15:18 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jun 2022 15:21:50 +0000 (16:21 +0100)
We currently don't have a means to differentiate between S3, S4 and
S5. Add definitions so that we have select different code paths
depending on the target state in follow-up patches.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220616201818.130802-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pm.c
sound/soc/sof/sof-priv.h

index 239f39a5166a45fa745157b2b9d68facdfa0dc3c..df740be645e844f143e754d351b4561f7d2d57f3 100644 (file)
@@ -23,6 +23,9 @@ static u32 snd_sof_dsp_power_target(struct snd_sof_dev *sdev)
        u32 target_dsp_state;
 
        switch (sdev->system_suspend_target) {
+       case SOF_SUSPEND_S5:
+       case SOF_SUSPEND_S4:
+               /* DSP should be in D3 if the system is suspending to S3+ */
        case SOF_SUSPEND_S3:
                /* DSP should be in D3 if the system is suspending to S3 */
                target_dsp_state = SOF_DSP_PM_D3;
@@ -344,6 +347,12 @@ int snd_sof_prepare(struct device *dev)
        case ACPI_STATE_S3:
                sdev->system_suspend_target = SOF_SUSPEND_S3;
                break;
+       case ACPI_STATE_S4:
+               sdev->system_suspend_target = SOF_SUSPEND_S4;
+               break;
+       case ACPI_STATE_S5:
+               sdev->system_suspend_target = SOF_SUSPEND_S5;
+               break;
        default:
                break;
        }
index 9d7f53ff9c70ef2f6990f8138f34461ec41acc3c..f0f3d72c0da73bec5e4f2378fea42ad769e51619 100644 (file)
@@ -85,6 +85,8 @@ enum sof_system_suspend_state {
        SOF_SUSPEND_NONE = 0,
        SOF_SUSPEND_S0IX,
        SOF_SUSPEND_S3,
+       SOF_SUSPEND_S4,
+       SOF_SUSPEND_S5,
 };
 
 enum sof_dfsentry_type {