Skip to content

Commit e5b4b43

Browse files
author
Jyri Sarha
committed
ipc4: Add payload structs definitions to ipc4_pipeline_create msg
Adds structs and definitions for adding a payload to struct ipc4_pipeline_create message. The structure of the payload is very similar to struct ipc4_module_init_ext_init payload for struct ipc4_module_init_instance. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
1 parent a850601 commit e5b4b43

1 file changed

Lines changed: 37 additions & 1 deletion

File tree

src/include/ipc4/pipeline.h

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,41 @@ enum ipc4_pipeline_state {
6969
SOF_IPC4_PIPELINE_STATE_SAVED
7070
};
7171

72+
/* IDs for all pipeline ext data types in struct ipc4_pipeline_init_ext_object */
73+
enum ipc4_pipeline_ext_obj_id {
74+
IPC4_GLB_PIPE_EXT_OBJ_ID_INVALID = 0,
75+
IPC4_GLB_PIPE_EXT_OBJ_ID_MEM_DATA = 1,
76+
IPC4_GLB_PIPE_EXT_OBJ_ID_MAX = IPC4_GLB_PIPE_EXT_OBJ_ID_MEM_DATA,
77+
};
78+
79+
/* data object for vendor bespoke data with ABI growth and backwards compat */
80+
struct ipc4_pipeline_ext_object {
81+
uint32_t last_object : 1; /* object is last in array if 1 else object follows. */
82+
uint32_t object_id : 15; /* unique ID for this object or globally */
83+
uint32_t object_words : 16; /* size in dwords (excluding this structure) */
84+
} __packed __aligned(4);
85+
/* the object data will be placed in memory here and will have size "object_words" */
86+
87+
/* Ext array data object for pipeline instance's memory requirements */
88+
struct ipc4_pipeline_ext_obj_mem_data {
89+
uint32_t domain_id; /* userspace domain ID */
90+
uint32_t stack_bytes; /* required stack size in bytes */
91+
uint32_t heap_bytes; /* required heap size in bytes */
92+
uint32_t lifetime_bytes;/* required memory for init in bytes */
93+
uint32_t shared_bytes; /* required shared memory in bytes */
94+
} __packed __aligned(4);
95+
96+
/*
97+
* Host Driver sends this message to create a new pipeline instance.
98+
*/
99+
struct ipc4_pipeline_ext_payload {
100+
uint32_t payload_words : 24; /* size in dwords (excluding this structure) */
101+
uint32_t data_obj_array : 1; /* struct ipc4_pipeline_ext_object data */
102+
uint32_t rsvd0 : 7;
103+
uint32_t rsvd1;
104+
uint32_t rsvd2;
105+
} __packed __aligned(4);
106+
72107
/*!
73108
* lp - indicates whether the pipeline should be kept on running in low power
74109
* mode. On BXT the driver should set this flag to 1 for WoV pipeline.
@@ -106,7 +141,8 @@ struct ipc4_pipeline_create {
106141
uint32_t rsvd1 : 3;
107142
uint32_t attributes : 16;
108143
uint32_t core_id : 4;
109-
uint32_t rsvd2 : 6;
144+
uint32_t rsvd2 : 5;
145+
uint32_t payload : 1;
110146
uint32_t _reserved_2 : 2;
111147
} r;
112148
} extension;

0 commit comments

Comments
 (0)