mirror of https://github.com/thesofproject/sof.git
IPC4: add processing domain - LL or DP to component context
A component need to keep an information about how it need to be scheduled - as LowLatency or DataProcessing. The information comes from IPC4 init instance message Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
This commit is contained in:
parent
3ee1d78738
commit
343b0ab47e
|
@ -535,6 +535,9 @@ struct comp_driver_info {
|
|||
struct list_item list; /**< list of component drivers */
|
||||
};
|
||||
|
||||
#define COMP_PROCESSING_DOMAIN_LL 0
|
||||
#define COMP_PROCESSING_DOMAIN_DP 1
|
||||
|
||||
/**
|
||||
* Audio component base configuration from IPC at creation.
|
||||
*/
|
||||
|
@ -542,6 +545,7 @@ struct comp_ipc_config {
|
|||
uint32_t core; /**< core we run on */
|
||||
uint32_t id; /**< component id */
|
||||
uint32_t pipeline_id; /**< component pipeline id */
|
||||
uint32_t proc_domain; /**< processing domain - LL or DP */
|
||||
enum sof_comp_type type; /**< component type */
|
||||
uint32_t periods_sink; /**< 0 means variable */
|
||||
uint32_t periods_source;/**< 0 means variable */
|
||||
|
@ -569,9 +573,10 @@ struct comp_dev {
|
|||
* to run component's processing
|
||||
*/
|
||||
|
||||
struct task *task; /**< component's processing task used only
|
||||
* for components running on different core
|
||||
struct task *task; /**< component's processing task used
|
||||
* 1) for components running on different core
|
||||
* than the rest of the pipeline
|
||||
* 2) for all DP tasks
|
||||
*/
|
||||
uint32_t size; /**< component's allocated size */
|
||||
uint32_t period; /**< component's processing period */
|
||||
|
|
|
@ -163,6 +163,7 @@ static void comp_common_builder(struct sof_ipc_comp *comp,
|
|||
config->core = comp->core;
|
||||
config->id = comp->id;
|
||||
config->pipeline_id = comp->pipeline_id;
|
||||
config->proc_domain = COMP_PROCESSING_DOMAIN_LL;
|
||||
config->type = comp->type;
|
||||
|
||||
/* buffers dont have the following data */
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <sof/lib/mailbox.h>
|
||||
#include <sof/list.h>
|
||||
#include <sof/platform.h>
|
||||
#include <sof/schedule/ll_schedule_domain.h>
|
||||
#include <rtos/wait.h>
|
||||
#ifdef __ZEPHYR__
|
||||
#include <adsp_memory.h> /* for IMR_BOOT_LDR_MANIFEST_BASE */
|
||||
|
@ -97,6 +98,11 @@ struct comp_dev *comp_new_ipc4(struct ipc4_module_init_instance *module_init)
|
|||
ipc_config.pipeline_id = module_init->extension.r.ppl_instance_id;
|
||||
ipc_config.core = module_init->extension.r.core_id;
|
||||
|
||||
if (module_init->extension.r.proc_domain)
|
||||
ipc_config.proc_domain = COMP_PROCESSING_DOMAIN_DP;
|
||||
else
|
||||
ipc_config.proc_domain = COMP_PROCESSING_DOMAIN_LL;
|
||||
|
||||
dcache_invalidate_region((__sparse_force void __sparse_cache *)MAILBOX_HOSTBOX_BASE,
|
||||
MAILBOX_HOSTBOX_SIZE);
|
||||
|
||||
|
@ -170,11 +176,7 @@ static int ipc4_create_pipeline(struct ipc4_pipeline_create *pipe_desc)
|
|||
}
|
||||
|
||||
pipe->time_domain = SOF_TIME_DOMAIN_TIMER;
|
||||
/* 1ms
|
||||
* TODO: add DP scheduler support. Now only the
|
||||
* LL scheduler tasks is supported.
|
||||
*/
|
||||
pipe->period = 1000;
|
||||
pipe->period = LL_TIMER_PERIOD_US;
|
||||
|
||||
/* sched_id is set in FW so initialize it to a invalid value */
|
||||
pipe->sched_id = 0xFFFFFFFF;
|
||||
|
|
Loading…
Reference in New Issue