Sound Open Firmware
Loading...
Searching...
No Matches
pipeline.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2021 Intel Corporation. All rights reserved.
4 */
5
6/*
7 * This file contains structures that are exact copies of an existing ABI used
8 * by IOT middleware. They are Intel specific and will be used by one middleware.
9 *
10 * Some of the structures may contain programming implementations that makes them
11 * unsuitable for generic use and general usage.
12 *
13 * This code is mostly copied "as-is" from existing C++ interface files hence the use of
14 * different style in places. The intention is to keep the interface as close as possible to
15 * original so it's easier to track changes with IPC host code.
16 */
17
25#ifndef __SOF_IPC4_PIPELINE_H__
26#define __SOF_IPC4_PIPELINE_H__
27
28#include <stdint.h>
29#include <ipc4/error_status.h>
30
46
61
71
77 uint32_t last_object : 1;
78 uint32_t object_id : 15;
79 uint32_t object_words : 16;
80} __packed __aligned(4);
81
87 uint32_t domain_id;
88 uint32_t stack_bytes;
89 uint32_t heap_bytes;
90} __packed __aligned(4);
91
97 uint32_t payload_words : 24;
98 uint32_t data_obj_array : 1;
99 uint32_t rsvd0 : 7;
100 uint32_t rsvd1;
101 uint32_t rsvd2;
102} __packed __aligned(4);
103
109 union {
110 uint32_t dat;
112 struct {
113 uint32_t ppl_mem_size : 11;
114 uint32_t ppl_priority : 5;
115 uint32_t instance_id : 8;
116 uint32_t type : 5;
117 uint32_t rsp : 1;
118 uint32_t msg_tgt : 1;
119 uint32_t _reserved_0 : 1;
120 } r;
122
123 union{
124 uint32_t dat;
126 struct {
127 uint32_t lp : 1;
128 uint32_t rsvd1 : 3;
129 uint32_t attributes : 16;
130 uint32_t core_id : 4;
131 uint32_t rsvd2 : 5;
132 uint32_t payload : 1;
133 uint32_t _reserved_2 : 2;
134 } r;
136} __attribute__((packed, aligned(4)));
137
146 union {
147 uint32_t dat;
149 struct {
150 uint32_t rsvd0 : 16;
151 uint32_t instance_id : 8;
152 uint32_t type : 5;
153 uint32_t rsp : 1;
154 uint32_t msg_tgt : 1;
155 uint32_t _reserved_0 : 1;
156 } r;
158
159 union{
160 uint32_t dat;
162 struct {
163 uint32_t rsvd1 : 30;
164 uint32_t _reserved_2 : 2;
165 } r;
167} __attribute__((packed, aligned(4)));
168
199 uint32_t ppl_id[];
200} __attribute__((packed, aligned(4)));
201
211 union {
212 uint32_t dat;
214 struct {
216 uint32_t ppl_state : 16;
218 uint32_t ppl_id : 8;
220 uint32_t type : 5;
222 uint32_t rsp : 1;
224 uint32_t msg_tgt : 1;
225 uint32_t _reserved_0: 1;
226 } r;
228
229 union{
230 uint32_t dat;
232 struct {
234 uint32_t multi_ppl : 1;
236 uint32_t sync_stop_start : 1;
237 uint32_t rsvd1 : 28;
238 uint32_t _reserved_2: 2;
239 } r;
241
243} __attribute__((packed, aligned(4)));
244
250 union {
251 uint32_t dat;
253 struct {
255 uint32_t type : 5;
256 uint32_t rsp : 1;
257 uint32_t msg_tgt : 1;
258 uint32_t _reserved_0: 1;
259 } r;
261
262 union{
263 uint32_t dat;
265 struct {
267 uint32_t ppl_id : 30;
268 uint32_t _reserved_2: 2;
269 } r;
271} __attribute__((packed, aligned(4)));
272
278 union {
279 uint32_t dat;
281 struct {
282 uint32_t ppl_id : 8;
283 uint32_t rsvd : 16;
284 uint32_t type : 5;
285 uint32_t rsp : 1;
286 uint32_t msg_tgt : 1;
287 uint32_t _reserved_0: 1;
288 } r;
290
291 union{
292 uint32_t dat;
294 struct {
295 uint32_t rsvd1 : 30;
296 uint32_t _reserved_2: 2;
297 } r;
299} __attribute__((packed, aligned(4)));
300
306 union {
307 uint32_t dat;
309 struct {
311 uint32_t type : 5;
312 uint32_t rsp : 1;
313 uint32_t msg_tgt : 1;
314 uint32_t _reserved_0: 1;
315 } r;
317
318 union{
319 uint32_t dat;
321 struct {
323 uint32_t state : 5;
324 uint32_t rsvd1 : 25;
325 uint32_t _reserved_2: 2;
326 } r;
328} __attribute__((packed, aligned(4)));
329
335 union {
336 uint32_t dat;
338 struct {
339 uint32_t rsvd0 : 16;
340 uint32_t instance_id : 8;
341 uint32_t type : 5;
342 uint32_t rsp : 1;
343 uint32_t msg_tgt : 1;
344 uint32_t _reserved_0 : 1;
345 } r;
347
348 union{
349 uint32_t dat;
351 struct {
352 uint32_t rsvd1 : 30;
353 uint32_t _reserved_2 : 2;
354 } r;
356} __attribute__((packed, aligned(4)));
357
363 union {
364 uint32_t dat;
366 struct {
368 uint32_t type : 5;
369 uint32_t rsp : 1;
370 uint32_t msg_tgt : 1;
371 uint32_t _reserved_0: 1;
372 } r;
374
375 union{
376 uint32_t dat;
378 struct {
380 uint32_t ctx_size : 16;
381 uint32_t rsvd1 : 14;
382 uint32_t _reserved_2: 2;
383 } r;
385} __attribute__((packed, aligned(4)));
386
392 union {
393 uint32_t dat;
395 struct {
396 uint32_t host_dma_id : 5;
397 uint32_t rsvd4 : 3;
398 uint32_t link_dma_id : 5;
399 uint32_t rsvd3 : 3;
400 uint32_t allocate : 1;
401 uint32_t enable : 1;
402 uint32_t scs : 1;
403 uint32_t rsvd2 : 5;
404 uint32_t type : 5;
405 uint32_t rsp : 1;
406 uint32_t msg_tgt : 1;
407 uint32_t _reserved_0 : 1;
408 } r;
410
411 union {
412 uint32_t dat;
414 struct {
415 uint32_t fifo_size : 24;
416 uint32_t rsvd1 : 6;
417 uint32_t _reserved_2 : 2;
418 } r;
420} __attribute__((packed, aligned(4)));
421
422#endif
IPC4 status codes, error codes, and IXC return values.
#define IPC4_IXC_STATUS_BITS
Number of bits allocated for processing status in the Primary reply DWORD (24 bits).
Definition error_status.h:25
ipc4_pipeline_state
Pipeline operational state machine values.
Definition pipeline.h:51
ipc4_pipeline_priority
Pipeline execution scheduling priority levels.
Definition pipeline.h:35
ipc4_pipeline_ext_obj_id
Extended pipeline object type identifiers.
Definition pipeline.h:66
@ SOF_IPC4_PIPELINE_STATE_INVALID
Invalid or uninitialized pipeline state.
Definition pipeline.h:52
@ SOF_IPC4_PIPELINE_STATE_SAVED
Pipeline context serialized to host memory for D3.
Definition pipeline.h:59
@ SOF_IPC4_PIPELINE_STATE_RUNNING
Running state: audio streaming actively scheduled.
Definition pipeline.h:56
@ SOF_IPC4_PIPELINE_STATE_EOS
End Of Stream (EOS): draining final buffered audio.
Definition pipeline.h:57
@ SOF_IPC4_PIPELINE_STATE_PAUSED
Paused state: buffers pre-allocated, clocks armed.
Definition pipeline.h:55
@ SOF_IPC4_PIPELINE_STATE_UNINITIALIZED
Created but module initialization is incomplete.
Definition pipeline.h:53
@ SOF_IPC4_PIPELINE_STATE_RESET
Reset state: buffers cleared, hardware inactive.
Definition pipeline.h:54
@ SOF_IPC4_PIPELINE_STATE_ERROR_STOP
Pipeline halted due to unrecoverable DSP error.
Definition pipeline.h:58
@ SOF_IPC4_PIPELINE_PRIORITY_6
Priority level 6.
Definition pipeline.h:42
@ SOF_IPC4_PIPELINE_PRIORITY_0
Priority level 0 (highest priority, scheduled first).
Definition pipeline.h:36
@ SOF_IPC4_PIPELINE_PRIORITY_5
Priority level 5.
Definition pipeline.h:41
@ SOF_IPC4_PIPELINE_PRIORITY_2
Priority level 2.
Definition pipeline.h:38
@ SOF_IPC4_PIPELINE_PRIORITY_4
Priority level 4.
Definition pipeline.h:40
@ SOF_IPC4_PIPELINE_PRIORITY_7
Priority level 7 (lowest priority).
Definition pipeline.h:43
@ SOF_IPC4_MAX_PIPELINE_PRIORITY
Maximum valid priority level.
Definition pipeline.h:44
@ SOF_IPC4_PIPELINE_PRIORITY_1
Priority level 1.
Definition pipeline.h:37
@ SOF_IPC4_PIPELINE_PRIORITY_3
Priority level 3.
Definition pipeline.h:39
@ IPC4_GLB_PIPE_EXT_OBJ_ID_MEM_DATA
Pipeline memory stack/heap allocation parameters.
Definition pipeline.h:68
@ IPC4_GLB_PIPE_EXT_OBJ_ID_INVALID
Invalid extension object identifier.
Definition pipeline.h:67
@ IPC4_GLB_PIPE_EXT_OBJ_ID_MAX
Maximum extension object ID.
Definition pipeline.h:69
Direct DMA Chaining configuration command (SOF_IPC4_GLB_CHAIN_DMA).
Definition pipeline.h:391
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:406
union ipc4_chain_dma::@118 extension
uint32_t rsvd2
Reserved bits.
Definition pipeline.h:403
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:393
uint32_t rsvd1
Reserved bits.
Definition pipeline.h:416
uint32_t link_dma_id
Link DMA channel identifier.
Definition pipeline.h:398
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:407
uint32_t host_dma_id
Host DMA channel identifier.
Definition pipeline.h:396
uint32_t rsvd3
Reserved bits.
Definition pipeline.h:399
union ipc4_chain_dma::@117 primary
uint32_t type
Opcode: SOF_IPC4_GLB_CHAIN_DMA (14).
Definition pipeline.h:404
uint32_t scs
Select stream context (SCS) bit in gateways.
Definition pipeline.h:402
uint32_t fifo_size
Size of chaining FIFO buffer in bytes.
Definition pipeline.h:415
uint32_t rsp
0 for request.
Definition pipeline.h:405
uint32_t rsvd4
Reserved bits.
Definition pipeline.h:397
uint32_t enable
Enable DMA chaining.
Definition pipeline.h:401
struct ipc4_chain_dma::@117::@119 r
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:417
uint32_t allocate
Allocate FIFO buffer.
Definition pipeline.h:400
Pipeline creation command structure (SOF_IPC4_GLB_CREATE_PIPELINE).
Definition pipeline.h:108
uint32_t rsvd2
Reserved bits.
Definition pipeline.h:131
union ipc4_pipeline_create::@86 extension
uint32_t rsvd1
Reserved bits.
Definition pipeline.h:128
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:119
uint32_t ppl_priority
Scheduling priority (enum ipc4_pipeline_priority).
Definition pipeline.h:114
uint32_t attributes
Pipeline hardware attributes bitmask.
Definition pipeline.h:129
uint32_t msg_tgt
0 for global firmware message.
Definition pipeline.h:118
uint32_t instance_id
Pipeline instance identifier (0..max_ppl-1).
Definition pipeline.h:115
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:133
uint32_t type
Opcode: SOF_IPC4_GLB_CREATE_PIPELINE (17).
Definition pipeline.h:116
struct ipc4_pipeline_create::@85::@87 r
uint32_t lp
1 = low power pipeline (kept running during D0i3).
Definition pipeline.h:127
uint32_t rsp
0 for request.
Definition pipeline.h:117
uint32_t ppl_mem_size
Number of 4KB memory pages allocated for pipeline.
Definition pipeline.h:113
uint32_t core_id
Target DSP core ID hosting this pipeline.
Definition pipeline.h:130
union ipc4_pipeline_create::@85 primary
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:110
uint32_t payload
1 if struct ipc4_pipeline_ext_payload follows.
Definition pipeline.h:132
Pipeline deletion command structure (SOF_IPC4_GLB_DELETE_PIPELINE).
Definition pipeline.h:145
uint32_t rsvd0
Reserved padding.
Definition pipeline.h:150
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:164
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:147
uint32_t rsp
0 for request.
Definition pipeline.h:153
union ipc4_pipeline_delete::@89 primary
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:163
union ipc4_pipeline_delete::@90 extension
uint32_t type
Opcode: SOF_IPC4_GLB_DELETE_PIPELINE (18).
Definition pipeline.h:152
uint32_t msg_tgt
0 for global firmware message.
Definition pipeline.h:154
uint32_t instance_id
Pipeline instance identifier to delete.
Definition pipeline.h:151
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:155
struct ipc4_pipeline_delete::@89::@91 r
Memory allocation parameters for pipeline execution context.
Definition pipeline.h:86
uint32_t heap_bytes
Heap memory size in bytes required for pipeline graph.
Definition pipeline.h:89
uint32_t domain_id
Userspace domain identifier.
Definition pipeline.h:87
uint32_t stack_bytes
Stack size in bytes required for pipeline thread.
Definition pipeline.h:88
Header for extended pipeline initialization objects.
Definition pipeline.h:76
uint32_t last_object
1 if terminating object in array, 0 if another object follows.
Definition pipeline.h:77
uint32_t object_words
Payload size in 32-bit DWORDs following this header.
Definition pipeline.h:79
uint32_t object_id
Unique object identifier (enum ipc4_pipeline_ext_obj_id).
Definition pipeline.h:78
Container for extended pipeline creation payload.
Definition pipeline.h:96
uint32_t data_obj_array
1 if struct ipc4_pipeline_ext_object array follows.
Definition pipeline.h:98
uint32_t payload_words
Total payload size in 32-bit DWORDs.
Definition pipeline.h:97
uint32_t rsvd2
Reserved word.
Definition pipeline.h:101
uint32_t rsvd0
Reserved bits.
Definition pipeline.h:99
uint32_t rsvd1
Reserved word.
Definition pipeline.h:100
Reply structure for pipeline context size query.
Definition pipeline.h:362
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:371
uint32_t rsp
1 for reply.
Definition pipeline.h:369
uint32_t status
Status code (enum ipc4_status).
Definition pipeline.h:367
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:381
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:364
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:382
union ipc4_pipeline_get_context_size_reply::@113 primary
union ipc4_pipeline_get_context_size_reply::@114 extension
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:370
struct ipc4_pipeline_get_context_size_reply::@113::@115 r
uint32_t type
Opcode: SOF_IPC4_GLB_GET_PIPELINE_CONTEXT_SIZE.
Definition pipeline.h:368
uint32_t ctx_size
Size of pipeline serialization context in 4KB memory pages.
Definition pipeline.h:380
Query memory context size required to serialize pipeline (SOF_IPC4_GLB_GET_PIPELINE_CONTEXT_SIZE).
Definition pipeline.h:334
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:352
uint32_t rsp
0 for request.
Definition pipeline.h:342
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:353
uint32_t type
Opcode: SOF_IPC4_GLB_GET_PIPELINE_CONTEXT_SIZE (21).
Definition pipeline.h:341
struct ipc4_pipeline_get_context_size::@109::@111 r
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:336
uint32_t instance_id
Target pipeline instance ID.
Definition pipeline.h:340
uint32_t rsvd0
Reserved padding.
Definition pipeline.h:339
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:343
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:344
union ipc4_pipeline_get_context_size::@109 primary
union ipc4_pipeline_get_context_size::@110 extension
Reply structure containing pipeline current operational state.
Definition pipeline.h:305
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:307
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:325
struct ipc4_pipeline_get_state_reply::@105::@107 r
union ipc4_pipeline_get_state_reply::@106 extension
union ipc4_pipeline_get_state_reply::@105 primary
uint32_t type
Opcode: SOF_IPC4_GLB_GET_PIPELINE_STATE.
Definition pipeline.h:311
uint32_t status
Status code (enum ipc4_status).
Definition pipeline.h:310
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:314
uint32_t rsp
1 for reply.
Definition pipeline.h:312
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:324
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:313
uint32_t state
Current state (one of enum ipc4_pipeline_state).
Definition pipeline.h:323
Query pipeline current state command (SOF_IPC4_GLB_GET_PIPELINE_STATE).
Definition pipeline.h:277
uint32_t type
Opcode: SOF_IPC4_GLB_GET_PIPELINE_STATE (20).
Definition pipeline.h:284
uint32_t rsp
0 for request.
Definition pipeline.h:285
union ipc4_pipeline_get_state::@101 primary
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:296
uint32_t rsvd
Reserved padding.
Definition pipeline.h:283
union ipc4_pipeline_get_state::@102 extension
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:295
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:286
uint32_t ppl_id
Target pipeline instance identifier.
Definition pipeline.h:282
struct ipc4_pipeline_get_state::@101::@103 r
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:279
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:287
Payload array containing pipeline IDs for multi-pipeline state transitions.
Definition pipeline.h:197
uint32_t pipelines_count
Number of pipeline instance IDs in ppl_id[].
Definition pipeline.h:198
uint32_t ppl_id[]
Array of pipeline instance identifiers.
Definition pipeline.h:199
Reply structure for pipeline state transition.
Definition pipeline.h:249
struct ipc4_pipeline_set_state_reply::@97::@99 r
uint32_t status
Status code (enum ipc4_status).
Definition pipeline.h:254
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:258
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:268
uint32_t msg_tgt
0 for global message.
Definition pipeline.h:257
union ipc4_pipeline_set_state_reply::@97 primary
uint32_t ppl_id
ID of failed pipeline on error.
Definition pipeline.h:267
union ipc4_pipeline_set_state_reply::@98 extension
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:251
uint32_t type
Opcode: SOF_IPC4_GLB_SET_PIPELINE_STATE.
Definition pipeline.h:255
uint32_t rsp
1 for reply.
Definition pipeline.h:256
Pipeline state transition command structure (SOF_IPC4_GLB_SET_PIPELINE_STATE).
Definition pipeline.h:210
uint32_t msg_tgt
Target: 0 for global firmware message.
Definition pipeline.h:224
union ipc4_pipeline_set_state::@94 extension
uint32_t ppl_state
Target pipeline state (enum ipc4_pipeline_state).
Definition pipeline.h:216
uint32_t multi_ppl
1 if additional pipeline IDs are provided in s_data payload.
Definition pipeline.h:234
uint32_t rsp
Direction: 0 for request.
Definition pipeline.h:222
uint32_t _reserved_0
Reserved bit.
Definition pipeline.h:225
uint32_t sync_stop_start
1 if DSP should synchronize state transition across all pipelines.
Definition pipeline.h:236
uint32_t _reserved_2
Reserved bits.
Definition pipeline.h:238
union ipc4_pipeline_set_state::@93 primary
uint32_t ppl_id
Target pipeline ID (ignored if multi_ppl == 1).
Definition pipeline.h:218
struct ipc4_pipeline_set_state::@93::@95 r
struct ipc4_pipeline_set_state_data s_data
Optional multi-pipeline ID list.
Definition pipeline.h:242
uint32_t type
Opcode: SOF_IPC4_GLB_SET_PIPELINE_STATE (19).
Definition pipeline.h:220
uint32_t rsvd1
Reserved padding.
Definition pipeline.h:237
uint32_t dat
Raw 32-bit Primary register value.
Definition pipeline.h:212