Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/audio/dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,8 @@ static int dai_prepare(struct comp_dev *dev)
return -EINVAL;
}

/* TODO: not sure what this wb is for? */
/* write back buffer contents from cache */
dcache_writeback_region(dd->dma_buffer->stream.addr,
dd->dma_buffer->stream.size);
/* clear dma buffer to avoid pop noise */
buffer_zero(dd->dma_buffer);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this also force the zeroed data to be written back?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good question. This function does it.

static inline void buffer_zero(struct comp_buffer *buffer)
{
	tracev_buffer_with_ids(buffer, "stream_zero()");

	bzero(buffer->stream.addr, buffer->stream.size);
	if (buffer->caps & SOF_MEM_CAPS_DMA)
		dcache_writeback_region(buffer->stream.addr,
					buffer->stream.size);
}


/* dma reconfig not required if XRUN handling */
if (dd->xrun) {
Expand Down