Skip to content

Commit

Permalink
ASOC: SOF: Intel: hda-stream: report DMA position if FW load fails
Browse files Browse the repository at this point in the history
To help debugging FW load failures, print out the last position
of the DMA used to load the firmware image. This allows to see whether
DMA transfer has started and whether it completed.

Signed-off-by: Kai Vehmanen <[email protected]>
  • Loading branch information
kv2019i committed Aug 7, 2024
1 parent ddbb29b commit 67550c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sound/soc/sof/intel/hda-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,11 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream
*/

if (status < 0) {
struct hdac_stream *hstream = &hext_stream->hstream;
snd_pcm_uframes_t pos = hda_dsp_stream_get_position(hstream, SNDRV_PCM_STREAM_PLAYBACK, 0);
dev_err(sdev->dev,
"%s: timeout with rom_status_reg (%#x) read\n",
__func__, chip->rom_status_reg);
"%s: timeout with rom_status_reg (%#x) read, DMA pos %lu/%lu\n",
__func__, chip->rom_status_reg, pos, hstream->bufsize);
} else {
dev_dbg(sdev->dev, "Code loader FW_ENTERED status\n");
}
Expand Down

0 comments on commit 67550c8

Please sign in to comment.