Skip to content

Commit c61115b

Browse files
ujfalusibroonie
authored andcommitted
ASoC: SOF: Intel: hda-dsp: Skip IMR boot on ACE platforms in case of S3 suspend
SoCs with ACE architecture are tailored to use s2idle instead deep (S3) suspend state and the IMR content is lost when the system is forced to enter even to S3. When waking up from S3 state the IMR boot will fail as the content is lost. Set the skip_imr_boot flag to make sure that we don't try IMR in this case. Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Rander Wang <[email protected]> Reviewed-by: Liam Girdwood <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 4cece76 commit c61115b

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

sound/soc/sof/intel/hda-dsp.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -681,17 +681,27 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
681681
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
682682
const struct sof_intel_dsp_desc *chip = hda->desc;
683683
struct hdac_bus *bus = sof_to_bus(sdev);
684+
bool imr_lost = false;
684685
int ret, j;
685686

686687
/*
687-
* The memory used for IMR boot loses its content in deeper than S3 state
688-
* We must not try IMR boot on next power up (as it will fail).
689-
*
688+
* The memory used for IMR boot loses its content in deeper than S3
689+
* state on CAVS platforms.
690+
* On ACE platforms due to the system architecture the IMR content is
691+
* lost at S3 state already, they are tailored for s2idle use.
692+
* We must not try IMR boot on next power up in these cases as it will
693+
* fail.
694+
*/
695+
if (sdev->system_suspend_target > SOF_SUSPEND_S3 ||
696+
(chip->hw_ip_version >= SOF_INTEL_ACE_1_0 &&
697+
sdev->system_suspend_target == SOF_SUSPEND_S3))
698+
imr_lost = true;
699+
700+
/*
690701
* In case of firmware crash or boot failure set the skip_imr_boot to true
691702
* as well in order to try to re-load the firmware to do a 'cold' boot.
692703
*/
693-
if (sdev->system_suspend_target > SOF_SUSPEND_S3 ||
694-
sdev->fw_state == SOF_FW_CRASHED ||
704+
if (imr_lost || sdev->fw_state == SOF_FW_CRASHED ||
695705
sdev->fw_state == SOF_FW_BOOT_FAILED)
696706
hda->skip_imr_boot = true;
697707

0 commit comments

Comments
 (0)