Skip to content
Open
Show file tree
Hide file tree
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
33 changes: 27 additions & 6 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
CONFIG_PROBE=y
CONFIG_PROBE_DMA_MAX=2
CONFIG_SOF_TELEMETRY=y
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=y
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=y
CONFIG_COLD_STORE_EXECUTE_DRAM=y
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=n
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n
CONFIG_COLD_STORE_EXECUTE_DRAM=n

# SOF / loadable modules
CONFIG_INTEL_MODULES=y
Expand All @@ -40,10 +40,10 @@ CONFIG_SOF_LOG_LEVEL_INF=y
CONFIG_COUNTER=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_LLEXT_STORAGE_WRITABLE=n
CONFIG_LLEXT_EXPERIMENTAL=n
CONFIG_LLEXT_EDK=n
CONFIG_MODULES=y
CONFIG_MODULES=n

# Zephyr / device drivers
CONFIG_DAI_INIT_PRIORITY=70
Expand Down Expand Up @@ -78,3 +78,24 @@ CONFIG_SOF_USERSPACE_PROXY=y
CONFIG_MAX_THREAD_BYTES=3

CONFIG_MAX_DOMAIN_PARTITIONS=32

# Userspace LL (was app/overlays/ptl/ll_userspace_overlay.conf)
# Run Low-Latency audio pipelines in user-space threads by default.
CONFIG_SOF_USERSPACE_LL=y
CONFIG_SOF_USERSPACE_INTERFACE_DMA=y
CONFIG_DAI_USERSPACE=y

# Settings currently required to enable user-space LL. The cold-store,
# telemetry, loadable-module and misc feature disables above/here are not
# yet user-space compatible (see the former overlay for rationale).
CONFIG_COLD_STORE_EXECUTE_DEBUG=n
CONFIG_SOF_BOOT_TEST_ALLOWED=n
CONFIG_CROSS_CORE_STREAM=n
CONFIG_INTEL_ADSP_MIC_PRIVACY=n
CONFIG_XRUN_NOTIFICATIONS_ENABLE=n
CONFIG_ZEPHYR_DP_SCHEDULER=n
# Extend the shared LL user-space heap to 0.5MB. This
# is current maximum for PTL builds with virtual heap
# enabled and uses the vmh allocation intended for KBP.
# TODO: needs some better solution to allocate
CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x80000
46 changes: 40 additions & 6 deletions app/boards/intel_adsp_ace30_wcl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ CONFIG_KCPS_DYNAMIC_CLOCK_CONTROL=n
CONFIG_PROBE=y
CONFIG_PROBE_DMA_MAX=2
CONFIG_SOF_TELEMETRY=y
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=y
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=y
CONFIG_COLD_STORE_EXECUTE_DRAM=y
CONFIG_SOF_TELEMETRY_IO_PERFORMANCE_MEASUREMENTS=n
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n
CONFIG_COLD_STORE_EXECUTE_DRAM=n

# SOF / loadable modules
CONFIG_INTEL_MODULES=y
Expand All @@ -39,10 +39,10 @@ CONFIG_SOF_LOG_LEVEL_INF=y
# Zephyr / OS features
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_LLEXT=y
CONFIG_LLEXT_STORAGE_WRITABLE=y
CONFIG_LLEXT_EXPERIMENTAL=y
CONFIG_LLEXT_STORAGE_WRITABLE=n
CONFIG_LLEXT_EXPERIMENTAL=n
CONFIG_LLEXT_EDK=n
CONFIG_MODULES=y
CONFIG_MODULES=n

# Zephyr / device drivers
CONFIG_DAI_INIT_PRIORITY=70
Expand All @@ -64,3 +64,37 @@ CONFIG_PM_DEVICE_RUNTIME_ASYNC=n
CONFIG_LOG_BACKEND_ADSP=n
CONFIG_LOG_FLUSH_SLEEP_US=5000
CONFIG_WINSTREAM_CONSOLE=n

# Userspace base (mirrored from intel_adsp_ace30_ptl.conf)
# Required so that user-space LL (below) can actually be enabled, since
# CONFIG_SOF_USERSPACE_LL depends on CONFIG_USERSPACE.
CONFIG_USERSPACE=y
CONFIG_DYNAMIC_THREAD=y
CONFIG_DYNAMIC_THREAD_ALLOC=y
CONFIG_DYNAMIC_THREAD_PREFER_ALLOC=y
CONFIG_SOF_STACK_SIZE=8192
CONFIG_SOF_USERSPACE_PROXY=y
CONFIG_MAX_THREAD_BYTES=3
CONFIG_MAX_DOMAIN_PARTITIONS=32
CONFIG_XTENSA_MMU_NUM_L2_TABLES=128

# Userspace LL (was app/overlays/ptl/ll_userspace_overlay.conf)
# Run Low-Latency audio pipelines in user-space threads by default.
CONFIG_SOF_USERSPACE_LL=y
CONFIG_SOF_USERSPACE_INTERFACE_DMA=y
CONFIG_DAI_USERSPACE=y

# Settings currently required to enable user-space LL. The cold-store,
# telemetry, loadable-module and misc feature disables above/here are not
# yet user-space compatible (see the former overlay for rationale).
CONFIG_COLD_STORE_EXECUTE_DEBUG=n
CONFIG_SOF_BOOT_TEST_ALLOWED=n
CONFIG_CROSS_CORE_STREAM=n
CONFIG_INTEL_ADSP_MIC_PRIVACY=n
CONFIG_XRUN_NOTIFICATIONS_ENABLE=n
CONFIG_ZEPHYR_DP_SCHEDULER=n
# Extend the shared LL user-space heap to 0.5MB. This
# is current maximum for WCL builds with virtual heap
# enabled and uses the vmh allocation intended for KBP.
# TODO: needs some better solution to allocate
CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x80000
6 changes: 6 additions & 0 deletions app/overlays/ptl/ll_userspace_overlay.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ CONFIG_CROSS_CORE_STREAM=n
CONFIG_INTEL_ADSP_MIC_PRIVACY=n
CONFIG_XRUN_NOTIFICATIONS_ENABLE=n
CONFIG_ZEPHYR_DP_SCHEDULER=n

# Extend the shared LL user-space heap to 0.5MB. This
# is current maximum for PTL builds with virtual heap
# enabled and uses the vmh allocation intended for KBP.
# TODO: needs some better solution to allocate
CONFIG_SOF_ZEPHYR_SYS_USER_HEAP_SIZE=0x80000
4 changes: 2 additions & 2 deletions src/audio/buffers/comp_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <sof/audio/sink_api.h>
#include <sof/audio/source_api.h>
#include <sof/audio/sink_source_utils.h>
#include <sof/audio/module_adapter/module/generic.h>
#include <rtos/userspace_helper.h>
#include <sof/common.h>
#include <rtos/interrupt.h>
Expand Down Expand Up @@ -165,8 +166,7 @@ static void comp_buffer_free(struct sof_audio_buffer *audio_buffer)

if (alloc && alloc->vreg) {
vregion_free(alloc->vreg, buffer);
if (!vregion_put(alloc->vreg))
rfree(alloc);
module_adapter_vreg_free(alloc);
} else {
sof_heap_free(alloc ? alloc->heap : NULL, buffer);
}
Expand Down
2 changes: 1 addition & 1 deletion src/audio/google/google_hotword_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static struct comp_dev *ghd_create(const struct comp_driver *drv,
cd->event.event_type = SOF_CTRL_EVENT_KD;
cd->event.num_elems = 0;

cd->msg = ipc_msg_init(cd->event.rhdr.hdr.cmd, cd->event.rhdr.hdr.size);
cd->msg = ipc_msg_init(NULL, cd->event.rhdr.hdr.cmd, cd->event.rhdr.hdr.size);
if (!cd->msg) {
comp_err(dev, "ipc_msg_init failed");
goto cd_fail;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/host-legacy.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ int host_common_new(struct host_data *hd, struct comp_dev *dev,
ipc_build_stream_posn(&hd->posn, SOF_IPC_STREAM_POSITION, config_id);

#if CONFIG_HOST_DMA_IPC_POSITION_UPDATES
hd->msg = ipc_msg_init(hd->posn.rhdr.hdr.cmd, hd->posn.rhdr.hdr.size);
hd->msg = ipc_msg_init(NULL, hd->posn.rhdr.hdr.cmd, hd->posn.rhdr.hdr.size);
if (!hd->msg) {
comp_err(dev, "ipc_msg_init failed");
dma_put(hd->dma);
Expand Down
2 changes: 1 addition & 1 deletion src/audio/host-zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ __cold int host_common_new(struct host_data *hd, struct comp_dev *dev,
ipc_build_stream_posn(&hd->posn, SOF_IPC_STREAM_POSITION, config_id);

#if CONFIG_HOST_DMA_IPC_POSITION_UPDATES
hd->msg = ipc_msg_init(hd->posn.rhdr.hdr.cmd, sizeof(hd->posn));
hd->msg = ipc_msg_init(hd->heap, hd->posn.rhdr.hdr.cmd, sizeof(hd->posn));
if (!hd->msg) {
comp_err(dev, "ipc_msg_init failed");
sof_dma_put(hd->dma);
Expand Down
2 changes: 1 addition & 1 deletion src/audio/mfcc/mfcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int mfcc_free(struct processing_module *mod)
struct mfcc_comp_data *cd = module_get_private_data(mod);

comp_info(mod->dev, "entry");
ipc_msg_free(cd->msg);
mod_ipc_msg_free(mod, cd->msg);
cd->msg = NULL;
mod_data_blob_handler_free(mod, cd->model_handler);
mfcc_free_buffers(mod);
Expand Down
8 changes: 4 additions & 4 deletions src/audio/mfcc/mfcc_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ int mfcc_ipc_notification_init(struct processing_module *mod)
primary->r.type = SOF_IPC4_GLB_NOTIFICATION;
primary->r.rsp = SOF_IPC4_MESSAGE_DIR_MSG_REQUEST;
primary->r.msg_tgt = SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG;
cd->msg = ipc_msg_w_ext_init(msg_proto.header, msg_proto.extension,
sizeof(struct sof_ipc4_notify_module_data) +
sizeof(struct sof_ipc4_control_msg_payload) +
sizeof(struct sof_ipc4_ctrl_value_chan));
cd->msg = mod_ipc_msg_w_ext_init(mod, msg_proto.header, msg_proto.extension,
sizeof(struct sof_ipc4_notify_module_data) +
sizeof(struct sof_ipc4_control_msg_payload) +
sizeof(struct sof_ipc4_ctrl_value_chan));
if (!cd->msg) {
comp_err(dev, "Failed to initialize VAD notification");
return -ENOMEM;
Expand Down
6 changes: 3 additions & 3 deletions src/audio/module_adapter/module/cadence_ipc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static struct ipc_msg *cadence_codec_notification_init(struct processing_module
primary.r.type = SOF_IPC4_GLB_NOTIFICATION;
primary.r.rsp = SOF_IPC4_MESSAGE_DIR_MSG_REQUEST;
primary.r.msg_tgt = SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG;
msg = ipc_msg_w_ext_init(primary.dat, 0, sizeof(*msg_module_data));
msg = mod_ipc_msg_w_ext_init(mod, primary.dat, 0, sizeof(*msg_module_data));
if (!msg)
return NULL;

Expand Down Expand Up @@ -366,7 +366,7 @@ static int cadence_codec_init(struct processing_module *mod)
if (setup_cfg)
mod_free(mod, setup_cfg->data);
free_notification:
ipc_msg_free(cd->msg);
mod_ipc_msg_free(mod, cd->msg);
free_cd:
mod_free(mod, cd);

Expand Down Expand Up @@ -568,7 +568,7 @@ static int ipc4_cadence_codec_free(struct processing_module *mod)
{
struct cadence_codec_data *cd = module_get_private_data(mod);

ipc_msg_free(cd->msg);
mod_ipc_msg_free(mod, cd->msg);

return cadence_codec_free(mod);
}
Expand Down
Loading
Loading