]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ASoC: SOF: pm: Force DSP off on suspend in BOOT_FAILED state also
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Thu, 23 Dec 2021 11:36:21 +0000 (13:36 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 23 Dec 2021 13:38:22 +0000 (13:38 +0000)
Try to force the DSP to be turned off next time if the fw_state is either
CRASHED or BOOT_FAILED when a suspend happens in order to attempt a clean
boot to recover.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211223113628.18582-14-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pm.c

index 022b19669735134db1549b4a2743f27b97460508..197a88695fef8aa15dfb31291a169adb069c53de 100644 (file)
@@ -315,10 +315,11 @@ int snd_sof_prepare(struct device *dev)
        sdev->system_suspend_target = SOF_SUSPEND_S3;
 
        /*
-        * if the firmware is crashed then we try to aim for S3 to reboot the
-        * firmware
+        * if the firmware is crashed or boot failed then we try to aim for S3
+        * to reboot the firmware
         */
-       if (sdev->fw_state == SOF_FW_CRASHED)
+       if (sdev->fw_state == SOF_FW_CRASHED ||
+           sdev->fw_state == SOF_FW_BOOT_FAILED)
                return 0;
 
        if (!desc->use_acpi_target_states)