Sound Open Firmware
Loading...
Searching...
No Matches

IPC4 global message headers, envelope formats, and command types. More...

Include dependency graph for header.h:

Go to the source code of this file.

Data Structures

struct  ipc_cmd_hdr
 Generic message header. More...
 
struct  ipc4_message_request
 Standard 64-bit IPC4 message request envelope. More...
 
struct  ipc4_message_reply
 Standard 64-bit IPC4 message reply envelope. More...
 
struct  sof_ipc4_ctrl_value_chan
 Generic per-channel control value mapping. More...
 
struct  sof_ipc4_control_msg_payload
 IPC4 payload structure for ALSA kcontrol parameters. More...
 
struct  sof_ipc4_notify_module_data
 Asynchronous notification payload originating from a module instance. More...
 

Macros

#define ipc_from_hdr(x)   ((struct ipc4_message_request *)x)
 Cast a generic buffer or message pointer to an IPC4 message request structure.
 
#define SOF_IPC4_SWITCH_CONTROL_PARAM_ID   200
 ALSA/kcontrol switch parameter ID for IPC4 Large Config.
 
#define SOF_IPC4_ENUM_CONTROL_PARAM_ID   201
 ALSA/kcontrol enum parameter ID for IPC4 Large Config.
 
#define SOF_IPC4_BYTES_CONTROL_PARAM_ID   202
 ALSA/kcontrol binary bytes parameter ID for IPC4 Large Config.
 
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL   ((uint32_t)0xA15A << 16)
 Magic event ID prefix for ALSA kcontrol notification events (0xA15A0000).
 
#define SOF_IPC4_NOTIFY_MODULE_EVENTID_COMPR_MAGIC_VAL   ((uint32_t)0xC0C0 << 16)
 Magic event ID prefix for compressed audio stream notifications (0xC0C00000).
 

Enumerations

enum  ipc4_message_target { SOF_IPC4_MESSAGE_TARGET_FW_GEN_MSG = 0 , SOF_IPC4_MESSAGE_TARGET_MODULE_MSG = 1 }
 Message target routing selector (msg_tgt bitfield in Primary DWORD). More...
 
enum  ipc4_message_direction { SOF_IPC4_MESSAGE_DIR_MSG_REQUEST = 0 , SOF_IPC4_MESSAGE_DIR_MSG_REPLY = 1 }
 Message direction indicator (rsp bitfield in Primary DWORD). More...
 
enum  ipc4_message_type {
  SOF_IPC4_GLB_BOOT_CONFIG = 0 , SOF_IPC4_GLB_ROM_CONTROL = 1 , SOF_IPC4_GLB_IPCGATEWAY_CMD = 2 , SOF_IPC4_GLB_PERF_MEASUREMENTS_CMD = 13 ,
  SOF_IPC4_GLB_CHAIN_DMA = 14 , SOF_IPC4_GLB_LOAD_MULTIPLE_MODULES = 15 , SOF_IPC4_GLB_UNLOAD_MULTIPLE_MODULES = 16 , SOF_IPC4_GLB_CREATE_PIPELINE = 17 ,
  SOF_IPC4_GLB_DELETE_PIPELINE = 18 , SOF_IPC4_GLB_SET_PIPELINE_STATE = 19 , SOF_IPC4_GLB_GET_PIPELINE_STATE = 20 , SOF_IPC4_GLB_GET_PIPELINE_CONTEXT_SIZE = 21 ,
  SOF_IPC4_GLB_SAVE_PIPELINE = 22 , SOF_IPC4_GLB_RESTORE_PIPELINE = 23 , SOF_IPC4_GLB_LOAD_LIBRARY = 24 , SOF_IPC4_GLB_LOAD_LIBRARY_PREPARE = 25 ,
  SOF_IPC4_GLB_INTERNAL_MESSAGE = 26 , SOF_IPC4_GLB_NOTIFICATION = 27 , SOF_IPC4_GLB_ENTER_GDB = 31 , SOF_IPC4_GLB_MAX_IXC_MESSAGE_TYPE = 32
}
 Global IPC4 message types (5-bit opcode in Primary DWORD when msg_tgt == FW_GEN_MSG). More...
 

Functions

struct ipc4_message_reply __attribute ((packed, aligned(4)))
 

Variables

union { 
 
   uint32_t   dat 
 Raw 32-bit Primary register value. More...
 
   struct { 
 
      uint32_t   status: 24 
 Command processing status (one of enum ipc4_status). More...
 
      uint32_t   type: 5 
 Message type, symmetric to the incoming request. More...
 
      uint32_t   rsp: 1 
 Direction: 1 for reply (SOF_IPC4_MESSAGE_DIR_MSG_REPLY). More...
 
      uint32_t   msg_tgt: 1 
 Target: symmetric to request (FW_GEN_MSG or MODULE_MSG). More...
 
      uint32_t   _reserved_0: 1 
 Hardware control reserved bit. More...
 
   }   r 
 
} primary 
 
union { 
 
   uint32_t   dat 
 Raw 32-bit Extension register value. More...
 
   struct { 
 
      uint32_t   rsvd1: 30 
 Extension reply data, transfer length, or additional status information. More...
 
      uint32_t   _reserved_2: 2 
 Hardware control reserved bits. More...
 
   }   r 
 
} extension 
 
uint32_t channel
 Logical audio channel ID (0 = Left, 1 = Right, etc.).
 
uint32_t value
 Control integer value (gain level, mute toggle, enum index).
 
uint16_t id
 Unique identifier of the control.
 
uint16_t num_elems
 Number of elements in the chanv array or number of bytes in data.
 
uint32_t reserved [4]
 Reserved for future expansion; must be set to 0.
 
union { 
 
   struct sof_ipc4_ctrl_value_chan   chanv [0] 
 Channel ID and value array. More...
 
   uint8_t   data [0] 
 Binary byte payload for raw controls. More...
 
};  
 
uint16_t instance_id
 Instance ID of the originator module of the notification.
 
uint16_t module_id
 Module ID of the originator of the notification.
 
uint32_t event_id
 Module-specific event identifier.
 
uint32_t event_data_size
 Size of the event_data payload (if any) in bytes.
 
uint8_t event_data []
 Optional notification data, module and notification dependent.
 

Detailed Description

IPC4 global message headers, envelope formats, and command types.

NOTE: This ABI uses bit fields and is non portable.

Macro Definition Documentation

◆ ipc_from_hdr

#define ipc_from_hdr (   x)    ((struct ipc4_message_request *)x)

Cast a generic buffer or message pointer to an IPC4 message request structure.

◆ SOF_IPC4_BYTES_CONTROL_PARAM_ID

#define SOF_IPC4_BYTES_CONTROL_PARAM_ID   202

ALSA/kcontrol binary bytes parameter ID for IPC4 Large Config.

◆ SOF_IPC4_ENUM_CONTROL_PARAM_ID

#define SOF_IPC4_ENUM_CONTROL_PARAM_ID   201

ALSA/kcontrol enum parameter ID for IPC4 Large Config.

◆ SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL

#define SOF_IPC4_NOTIFY_MODULE_EVENTID_ALSA_MAGIC_VAL   ((uint32_t)0xA15A << 16)

Magic event ID prefix for ALSA kcontrol notification events (0xA15A0000).

◆ SOF_IPC4_NOTIFY_MODULE_EVENTID_COMPR_MAGIC_VAL

#define SOF_IPC4_NOTIFY_MODULE_EVENTID_COMPR_MAGIC_VAL   ((uint32_t)0xC0C0 << 16)

Magic event ID prefix for compressed audio stream notifications (0xC0C00000).

◆ SOF_IPC4_SWITCH_CONTROL_PARAM_ID

#define SOF_IPC4_SWITCH_CONTROL_PARAM_ID   200

ALSA/kcontrol switch parameter ID for IPC4 Large Config.

Variable Documentation

◆ [union]

union { ... }

◆ _reserved_0

uint32_t _reserved_0

Hardware control reserved bit.

◆ _reserved_2

uint32_t _reserved_2

Hardware control reserved bits.

◆ channel

uint32_t channel

Logical audio channel ID (0 = Left, 1 = Right, etc.).

◆ chanv

struct sof_ipc4_ctrl_value_chan chanv[0]

Channel ID and value array.

◆ dat

uint32_t dat

Raw 32-bit Primary register value.

Raw 32-bit Extension register value.

◆ data

uint8_t data[0]

Binary byte payload for raw controls.

◆ event_data

uint8_t event_data[]

Optional notification data, module and notification dependent.

◆ event_data_size

uint32_t event_data_size

Size of the event_data payload (if any) in bytes.

◆ event_id

uint32_t event_id

Module-specific event identifier.

◆ [union]

union { ... } extension

◆ id

uint16_t id

Unique identifier of the control.

◆ instance_id

uint16_t instance_id

Instance ID of the originator module of the notification.

◆ module_id

uint16_t module_id

Module ID of the originator of the notification.

◆ msg_tgt

uint32_t msg_tgt

Target: symmetric to request (FW_GEN_MSG or MODULE_MSG).

◆ num_elems

uint16_t num_elems

Number of elements in the chanv array or number of bytes in data.

◆ [union]

union { ... } primary

◆ [struct]

struct { ... } r

◆ reserved

uint32_t reserved[4]

Reserved for future expansion; must be set to 0.

◆ rsp

uint32_t rsp

Direction: 1 for reply (SOF_IPC4_MESSAGE_DIR_MSG_REPLY).

◆ rsvd1

uint32_t rsvd1

Extension reply data, transfer length, or additional status information.

◆ status

uint32_t status

Command processing status (one of enum ipc4_status).

◆ type

uint32_t type

Message type, symmetric to the incoming request.

◆ value

uint32_t value

Control integer value (gain level, mute toggle, enum index).