ASoC: SOF: loader: Print the DSP dump if boot fails
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 6 Oct 2021 11:06:31 +0000 (14:06 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 7 Oct 2021 14:45:26 +0000 (15:45 +0100)
It can be useful to print the DSP dump from the core in case the DSP boot
failed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20211006110645.26679-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/loader.c

index c18b2b5c52ca9c3a964cfdfa0ca4f4053ebe5bc6..babb96d685aec2645ad2ba9484a4e6ab81bc9d7b 100644 (file)
@@ -819,7 +819,9 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev)
        /* boot the firmware on the DSP */
        ret = snd_sof_dsp_run(sdev);
        if (ret < 0) {
-               dev_err(sdev->dev, "error: failed to reset DSP\n");
+               dev_err(sdev->dev, "error: failed to start DSP\n");
+               snd_sof_dsp_dbg_dump(sdev, SOF_DBG_DUMP_REGS | SOF_DBG_DUMP_MBOX |
+                                    SOF_DBG_DUMP_PCI | SOF_DBG_DUMP_FORCE_ERR_LEVEL);
                return ret;
        }