Skip to content

Commit aa177fe

Browse files
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 <serhiy.katsyuba@intel.com>
1 parent 8d44f26 commit aa177fe

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
@@ -359,7 +359,8 @@ struct ring_buffer *ring_buffer_create(struct comp_dev *dev, size_t min_availabl
359359
ring_buffer->data_buffer_size =
360360
ALIGN_UP(ring_buffer->data_buffer_size, PLATFORM_DCACHE_ALIGN);
361361
ring_buffer->_data_buffer = (__sparse_force __sparse_cache void *)
362-
rballoc_align(memory_flags, ring_buffer->data_buffer_size,
362+
rballoc_align(user_get_buffer_memory_region(dev->drv),
363+
ring_buffer->data_buffer_size,
363364
PLATFORM_DCACHE_ALIGN);
364365
if (!ring_buffer->_data_buffer)
365366
goto err;

0 commit comments

Comments
 (0)