mirror of https://github.com/thesofproject/sof.git
dma: dw: improve debug for buffer IO.
Trace buffer positions in verbose mode. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
2a70f114bc
commit
099a187438
|
@ -1005,6 +1005,7 @@ static int dw_dma_remove(struct dma *dma)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* capture */
|
||||
static int dw_dma_avail_data_size(struct dma_chan_data *channel)
|
||||
{
|
||||
struct dw_dma_chan_data *dw_chan = dma_chan_get_data(channel);
|
||||
|
@ -1019,9 +1020,13 @@ static int dw_dma_avail_data_size(struct dma_chan_data *channel)
|
|||
if (!size)
|
||||
tr_info(&dwdma_tr, "dw_dma_avail_data_size() size is 0!");
|
||||
|
||||
tr_dbg(&dwdma_tr, "DAR %x reader 0x%x free 0x%x avail 0x%x", write_ptr,
|
||||
read_ptr, dw_chan->ptr_data.buffer_bytes - size, size);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
/* playback */
|
||||
static int dw_dma_free_data_size(struct dma_chan_data *channel)
|
||||
{
|
||||
struct dw_dma_chan_data *dw_chan = dma_chan_get_data(channel);
|
||||
|
@ -1036,6 +1041,9 @@ static int dw_dma_free_data_size(struct dma_chan_data *channel)
|
|||
if (!size)
|
||||
tr_info(&dwdma_tr, "dw_dma_free_data_size() size is 0!");
|
||||
|
||||
tr_dbg(&dwdma_tr, "SAR %x writer 0x%x free 0x%x avail 0x%x", read_ptr,
|
||||
write_ptr, size, dw_chan->ptr_data.buffer_bytes - size);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue