diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-06-16 15:18:16 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-24 16:21:50 +0100 |
commit | a933084558c61cac8c902d2474b39444d87fba46 (patch) | |
tree | 98aa90419ee7ed03c46f0586731655faa7d59fe0 /sound | |
parent | ca7ab1dcf58dfce5bc851bf7e50fd94822c24665 (diff) | |
download | linux-a933084558c61cac8c902d2474b39444d87fba46.tar.bz2 |
ASoC: SOF: pm: add explicit behavior for ACPI S1 and S2
The existing code only deals with S0 and S3, let's start adding S1 and S2.
No functional change.
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-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/sof/pm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index 18eb327a57f0..239f39a5166a 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -335,8 +335,18 @@ int snd_sof_prepare(struct device *dev) return 0; #if defined(CONFIG_ACPI) - if (acpi_target_system_state() == ACPI_STATE_S0) + switch (acpi_target_system_state()) { + case ACPI_STATE_S0: sdev->system_suspend_target = SOF_SUSPEND_S0IX; + break; + case ACPI_STATE_S1: + case ACPI_STATE_S2: + case ACPI_STATE_S3: + sdev->system_suspend_target = SOF_SUSPEND_S3; + break; + default: + break; + } #endif return 0; |