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
1 change: 1 addition & 0 deletions Kconfig.sof
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ config COLD_STORE_EXECUTE_DRAM

config COLD_STORE_EXECUTE_DEBUG
bool "Enable checks for cold code on hot paths"
depends on !SOF_USERSPACE_LL
help
This enables an assert_can_be_cold() check, which causes an exception
if called in the LL task context and assert() evaluation is enabled.
Expand Down
2 changes: 2 additions & 0 deletions app/boards/intel_adsp_ace30_ptl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ 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
2 changes: 1 addition & 1 deletion src/audio/drc/drc.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int drc_init_pre_delay_buffers(struct processing_module *mod,
int i;

/* Allocate pre-delay (lookahead) buffers */
state->pre_delay_buffers[0] = mod_balloc(mod, bytes_total);
state->pre_delay_buffers[0] = mod_alloc(mod, bytes_total);
if (!state->pre_delay_buffers[0])
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion src/audio/eq_fir/eq_fir.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int eq_fir_setup(struct processing_module *mod, int nch)
return 0;

/* Allocate all FIR channels data in a big chunk and clear it */
cd->fir_delay = mod_balloc(mod, delay_size);
cd->fir_delay = mod_alloc(mod, delay_size);
if (!cd->fir_delay) {
comp_err(dev, "delay allocation failed for size %d", delay_size);
return -ENOMEM;
Expand Down
9 changes: 5 additions & 4 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LOG_MODULE_REGISTER(module_adapter, CONFIG_SOF_LOG_LEVEL);
struct comp_dev *module_adapter_new(const struct comp_driver *drv,
const struct comp_ipc_config *config, const void *spec)
{
return module_adapter_new_ext(drv, config, spec, NULL, NULL);
return module_adapter_new_ext(drv, config, spec, NULL, NULL, NULL);
}

#if CONFIG_MM_DRV
Expand Down Expand Up @@ -207,11 +207,12 @@ static void module_adapter_mem_free(struct processing_module *mod)
struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
const struct comp_ipc_config *config,
const void *const_spec, void *mod_priv,
struct userspace_context *user_ctx)
struct userspace_context *user_ctx,
const struct module_interface *ops)
{
int ret;
struct module_config *dst;
const struct module_interface *const interface = drv->adapter_ops;
const struct module_interface *const interface = ops ? : drv->adapter_ops;
struct ipc_config_process spec =
*((const struct ipc_config_process *) const_spec);
#if CONFIG_IPC_MAJOR_4
Expand Down Expand Up @@ -398,7 +399,7 @@ int module_adapter_prepare(struct comp_dev *dev)

ret = module_adapter_params(dev, &params);
if (ret) {
comp_err(dev, "module_adapter_new() %d: module params failed", ret);
comp_err(dev, "module params failed: %d", ret);
return ret;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/include/sof/audio/component.h
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,10 @@ static inline void comp_init(const struct comp_driver *drv,
#ifdef CONFIG_SOF_USERSPACE_LL
sys_mutex_init(&dev->list_mutex);
#endif
#ifndef __ZEPHYR__
memcpy_s(&dev->tctx, sizeof(dev->tctx),
trace_comp_drv_get_tr_ctx(dev->drv), sizeof(struct tr_ctx));
#endif
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/include/sof/audio/module_adapter/module/generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ struct comp_dev *module_adapter_new(const struct comp_driver *drv,
struct userspace_context;
struct comp_dev *module_adapter_new_ext(const struct comp_driver *drv,
const struct comp_ipc_config *config, const void *spec,
void *mod_priv, struct userspace_context *user_ctx);
void *mod_priv, struct userspace_context *user_ctx,
const struct module_interface *ops);
int module_adapter_prepare(struct comp_dev *dev);
int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *params);
int module_adapter_copy(struct comp_dev *dev);
Expand Down
6 changes: 0 additions & 6 deletions src/ipc/ipc4/handler-kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <sof/audio/buffer.h>
#include <sof/audio/component_ext.h>
#include <sof/audio/pipeline.h>
#include <sof/boot_test.h>
#include <sof/common.h>
#include <sof/ipc/topology.h>
#include <sof/ipc/common.h>
Expand All @@ -41,11 +40,6 @@
#include <rtos/string.h>
#include <sof/lib_manager.h>

#if CONFIG_SOF_BOOT_TEST
/* CONFIG_SOF_BOOT_TEST depends on Zephyr */
#include <zephyr/ztest.h>
#endif

#include <errno.h>
#include <stdbool.h>
#include <stddef.h>
Expand Down
2 changes: 1 addition & 1 deletion src/library_manager/lib_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ static struct comp_dev *lib_manager_module_create(const struct comp_driver *drv,
if (comp_set_adapter_ops(drv, ops) < 0)
goto err;

dev = module_adapter_new_ext(drv, config, spec, adapter_priv, userspace);
dev = module_adapter_new_ext(drv, config, spec, adapter_priv, userspace, NULL);
if (!dev)
goto err;

Expand Down
9 changes: 5 additions & 4 deletions src/schedule/zephyr_dp_schedule_application.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid,
stack_size, dp_thread_fn, ptask, NULL, NULL,
CONFIG_DP_THREAD_PRIORITY, ptask->flags, K_FOREVER);

unsigned int pidx;
size_t size;
uintptr_t start;
bool on_pool = false;

#ifdef CONFIG_SCHED_CPU_MASK
/* pin the thread to specific core */
ret = k_thread_cpu_pin(pdata->thread_id, core);
Expand All @@ -506,10 +511,6 @@ int scheduler_dp_task_init(struct task **task, const struct sof_uuid_entry *uid,
k_thread_access_grant(pdata->thread_id, pdata->event, &dp_sync[core]);
scheduler_dp_grant(pdata->thread_id, core);

unsigned int pidx;
size_t size;
uintptr_t start;
bool on_pool = false;
struct k_mem_domain *mdom = objpool_alloc(&dp_mdom_head, sizeof(*mdom),
SOF_MEM_FLAG_COHERENT);

Expand Down
9 changes: 6 additions & 3 deletions zephyr/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
if(CONFIG_SOF_BOOT_TEST)
zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP
vmh.c
)
if(NOT CONFIG_SOF_USERSPACE_LL)
zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP
vmh.c
)
endif()

zephyr_library_sources_ifdef(CONFIG_SOF_VREGIONS
vpage.c vregion.c
)
Expand Down