Sound Open Firmware
Loading...
Searching...
No Matches
userspace_proxy.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2025 Intel Corporation. All rights reserved.
4 *
5 * Author: Jaroslaw Stelter <jaroslaw.stelter@intel.com>
6 * Author: Adrian Warecki <adrian.warecki@intel.com>
7 */
8
9#ifndef __SOF_AUDIO_USERSPACE_PROXY_H__
10#define __SOF_AUDIO_USERSPACE_PROXY_H__
11
12#if CONFIG_USERSPACE
13#include <stdint.h>
14#include <stdbool.h>
15
16#include <zephyr/kernel.h>
17#include <zephyr/app_memory/app_memdomain.h>
18#include <utilities/array.h>
19
20#include <native_system_agent.h>
21#include <module/module/interface.h>
23
24struct module_interface;
25struct comp_driver;
26struct sof_man_module;
28
29/* Processing module structure fields needed for user mode */
30struct userspace_context {
31 struct k_mem_domain *comp_dom; /* Module specific memory domain */
32 const struct module_interface *interface; /* Userspace module interface */
33 struct user_work_item *work_item; /* work item for user worker thread */
34 struct k_event *dp_event; /* DP thread event */
35};
36#endif /* CONFIG_USERSPACE */
37
38#if CONFIG_SOF_USERSPACE_PROXY
54int userspace_proxy_create(struct userspace_context **user_ctx, const struct comp_driver *drv,
55 const struct sof_man_module *manifest, system_agent_start_fn start_fn,
56 const struct system_agent_params *agent_params,
57 const void **agent_interface, const struct module_interface **ops);
58
65void userspace_proxy_destroy(const struct comp_driver *drv, struct userspace_context *user_ctx);
66
67#if IS_ENABLED(CONFIG_SOF_USERSPACE_MOD_IPC_BY_DP_THREAD)
78struct k_work_user *userspace_proxy_register_ipc_handler(struct processing_module *mod,
79 struct k_event *event);
80#endif
81
82#endif /* CONFIG_SOF_USERSPACE_PROXY */
83
84#endif /* __SOF_AUDIO_USERSPACE_PROXY_H__ */
int(* system_agent_start_fn)(const struct system_agent_params *params, const void **adapter)
Definition native_system_agent.h:23
Audio component base driver "class".
Definition component.h:587
Definition native_system_agent.h:14