Skip to content

Commit a86f371

Browse files
serhiy-katsyuba-intelkv2019i
authored andcommitted
ring_buffer: Use cached allocation for ring_buffer stream data
_data_buffer should always be allocated as cached. It became uncached (when is_shared==true) by mistake as a result of a regression introduced by this commit: d519e7e. This restores the original cached allocation behaviour for _data_buffer. Signed-off-by: Serhiy Katsyuba <[email protected]>
1 parent 03044fc commit a86f371

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/audio/buffers/ring_buffer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ struct ring_buffer *ring_buffer_create(struct comp_dev *dev, size_t min_availabl
360360
ring_buffer->data_buffer_size =
361361
ALIGN_UP(ring_buffer->data_buffer_size, PLATFORM_DCACHE_ALIGN);
362362
ring_buffer->_data_buffer = (__sparse_force __sparse_cache void *)
363-
rballoc_align(memory_flags, ring_buffer->data_buffer_size,
363+
rballoc_align(user_get_buffer_memory_region(dev->drv),
364+
ring_buffer->data_buffer_size,
364365
PLATFORM_DCACHE_ALIGN);
365366
if (!ring_buffer->_data_buffer)
366367
goto err;

0 commit comments

Comments
 (0)