Skip to content

Commit 9d2d462

Browse files
plbossartbroonie
authored andcommitted
ASoC: SOF: pm: add definitions for S4 and S5 states
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>
1 parent a933084 commit 9d2d462

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

sound/soc/sof/pm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ static u32 snd_sof_dsp_power_target(struct snd_sof_dev *sdev)
2323
u32 target_dsp_state;
2424

2525
switch (sdev->system_suspend_target) {
26+
case SOF_SUSPEND_S5:
27+
case SOF_SUSPEND_S4:
28+
/* DSP should be in D3 if the system is suspending to S3+ */
2629
case SOF_SUSPEND_S3:
2730
/* DSP should be in D3 if the system is suspending to S3 */
2831
target_dsp_state = SOF_DSP_PM_D3;
@@ -344,6 +347,12 @@ int snd_sof_prepare(struct device *dev)
344347
case ACPI_STATE_S3:
345348
sdev->system_suspend_target = SOF_SUSPEND_S3;
346349
break;
350+
case ACPI_STATE_S4:
351+
sdev->system_suspend_target = SOF_SUSPEND_S4;
352+
break;
353+
case ACPI_STATE_S5:
354+
sdev->system_suspend_target = SOF_SUSPEND_S5;
355+
break;
347356
default:
348357
break;
349358
}

sound/soc/sof/sof-priv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ enum sof_system_suspend_state {
8585
SOF_SUSPEND_NONE = 0,
8686
SOF_SUSPEND_S0IX,
8787
SOF_SUSPEND_S3,
88+
SOF_SUSPEND_S4,
89+
SOF_SUSPEND_S5,
8890
};
8991

9092
enum sof_dfsentry_type {

0 commit comments

Comments
 (0)