ASoC: SOF: Intel: mtl: Correct the mtl_dsp_dump output
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 3 Apr 2024 10:52:10 +0000 (13:52 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 3 Apr 2024 11:04:28 +0000 (12:04 +0100)
commit40bdf121a3ed91281196068e50789888e4b1d2d2
tree7fc68e196bf72c2d4fd527993f8a4cca575c5d9d
parent3dc2682870ea8f5a7749c069dfc4e0040e69cb5d
ASoC: SOF: Intel: mtl: Correct the mtl_dsp_dump output

The ROM/firmware state handling has changed between CAVS and ACE
architecture:
CAVS: ROM and firmware uses the SRAM window for the state and status/error
code reporting

ACE: ROM code is using two registers to report the state and error while
the firmware is using the SRAM window to report states and status/error
codes.

Use the generic hda_dsp_get_state() to decode ROM state and error codes and
print out the firmware state and status/error code only if the SRAM
window is accessible - the firmware is booted and the Status readout is
not 0xffffffff.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://msgid.link/r/20240403105210.17949-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/mtl.c