Skip to content

Commit 093a507

Browse files
committed
audio: host-zephyr: ensure host data heap is set
Force to use user-space LL heap in host_common_new() if CONFIG_SOF_USERSPACE_LL is set. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 160153c commit 093a507

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/audio/host-zephyr.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,15 @@ __cold int host_common_new(struct host_data *hd, struct comp_dev *dev,
736736
hd->chan_index = -1;
737737
hd->copy_type = COMP_COPY_NORMAL;
738738

739+
#ifdef CONFIG_SOF_USERSPACE_LL
740+
/*
741+
* copier_host_create() uses mod_zalloc() to allocate
742+
* the 'hd' host data object and does not set hd->heap.
743+
* If LL is run in user-space, assign the 'heap' here.
744+
*/
745+
hd->heap = zephyr_ll_user_heap();
746+
#endif
747+
739748
return 0;
740749
}
741750

0 commit comments

Comments
 (0)