ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 11 Dec 2020 10:07:43 +0000 (12:07 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 11 Dec 2020 13:22:58 +0000 (13:22 +0000)
commit8f7ef6fca0317fb217d1eef8f30010d7a9c6ae0e
treea9afd0ba90e45787f438297a64191c703bae6cfe
parentfbfa22ec4b2b8a1bb1a52c56c376295c7b7e7849
ASoC: SOF: Intel: hda: fix the condition passed to sof_dev_dbg_or_err

The condition boot_iteration == HDA_FW_BOOT_ATTEMPTS to determine
the log level for the DSP status dump would only work in the case of DSP
init failure after maximum number of attempts to initialize the DSP. If
DSP init succeeds in less than HDA_FW_BOOT_ATTEMPTS attempts and FW
loading fails, the ROM status dump would end up getting logged as debug
instead of an error.

So, add a new flag, SOF_DBG_DUMP_LOG_ERROR, to explicitly specify
the log level for DSP status dump.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20201211100743.3188821-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-loader.c
sound/soc/sof/intel/hda.c
sound/soc/sof/loader.c
sound/soc/sof/sof-priv.h