Skip to content

Commit a990bd4

Browse files
author
Jyri Sarha
committed
audio: comp_buffer: use vregion_type from mod_alloc_ctx
Use vregion_type from strcut mod_alloc_ctx, when vregion is available, for buffer allocations. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent 4c33deb commit a990bd4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/audio/buffers/comp_buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ static struct comp_buffer *buffer_alloc_struct(struct mod_alloc_ctx *alloc,
217217
if (!alloc || !alloc->vreg)
218218
buffer = sof_heap_alloc(alloc ? alloc->heap : NULL, flags, sizeof(*buffer), 0);
219219
else if (is_shared)
220-
buffer = vregion_alloc_coherent(alloc->vreg, VREGION_MEM_TYPE_INTERIM, sizeof(*buffer));
220+
buffer = vregion_alloc_coherent(alloc->vreg, alloc->vregion_type, sizeof(*buffer));
221221
else
222-
buffer = vregion_alloc(alloc->vreg, VREGION_MEM_TYPE_INTERIM, sizeof(*buffer));
222+
buffer = vregion_alloc(alloc->vreg, alloc->vregion_type, sizeof(*buffer));
223223
if (!buffer) {
224224
tr_err(&buffer_tr, "could not alloc structure");
225225
return NULL;

0 commit comments

Comments
 (0)