The DAI IRQ hanlder was always writing back full period size even when less data was copied. Only writeback the amount of data copied.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/audio/dai.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/audio/dai.c b/src/audio/dai.c index ebec519..cf8de72 100644 --- a/src/audio/dai.c +++ b/src/audio/dai.c @@ -103,7 +103,7 @@ static void dai_dma_cb(void *data, uint32_t type, struct dma_sg_elem *next) comp_update_buffer_consume(dma_buffer, copied_size);
/* writeback buffer contents from cache */ - dcache_writeback_region(dma_buffer->r_ptr, dd->period_bytes); + dcache_writeback_region(dma_buffer->r_ptr, copied_size);
/* update host position(in bytes offset) for drivers */ dev->position += copied_size; @@ -498,6 +498,7 @@ static int dai_position(struct comp_dev *dev, struct sof_ipc_stream_posn *posn)
/* set stream start wallclock */ posn->wallclock = dd->wallclock; + return 0; }