Skip to content

Commit 5e4a27f

Browse files
xiulipanbroonie
authored andcommitted
ASoC: SOF: IPC: add ipc dump function
Dump IPC status when IPC timed out. IPC status is platform specific and need bind to plaform. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent ed3baac commit 5e4a27f

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎sound/soc/sof/ipc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ static int tx_wait_done(struct snd_sof_ipc *ipc, struct snd_sof_ipc_msg *msg,
207207
dev_err(sdev->dev, "error: ipc timed out for 0x%x size %d\n",
208208
hdr->cmd, hdr->size);
209209
snd_sof_dsp_dbg_dump(ipc->sdev, SOF_DBG_REGS | SOF_DBG_MBOX);
210+
snd_sof_ipc_dump(ipc->sdev);
210211
snd_sof_trace_notify_for_error(ipc->sdev);
211212
ret = -ETIMEDOUT;
212213
} else {

‎sound/soc/sof/ops.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,12 @@ static inline void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, u32 flags)
155155
return sof_ops(sdev)->dbg_dump(sdev, flags);
156156
}
157157

158+
static inline void snd_sof_ipc_dump(struct snd_sof_dev *sdev)
159+
{
160+
if (sof_ops(sdev)->ipc_dump)
161+
return sof_ops(sdev)->ipc_dump(sdev);
162+
}
163+
158164
/* register IO */
159165
static inline void snd_sof_dsp_write(struct snd_sof_dev *sdev, u32 bar,
160166
u32 offset, u32 value)

‎sound/soc/sof/sof-priv.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ struct snd_sof_dsp_ops {
176176
int debug_map_count; /* optional */
177177
void (*dbg_dump)(struct snd_sof_dev *sof_dev,
178178
u32 flags); /* optional */
179+
void (*ipc_dump)(struct snd_sof_dev *sof_dev); /* optional */
179180

180181
/* host DMA trace initialization */
181182
int (*trace_init)(struct snd_sof_dev *sdev,

0 commit comments

Comments
 (0)