Sound Open Firmware
Loading...
Searching...
No Matches
msg.h File Reference
Include dependency graph for msg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ipc_msg
 

Functions

struct ipc_msg * ipc_msg_w_ext_init (struct k_heap *heap, uint32_t header, uint32_t extension, uint32_t size)
 Initialize a new IPC message using a specific heap.
 
static struct ipc_msg * ipc_msg_init (struct k_heap *heap, uint32_t header, uint32_t size)
 Initialize a new IPC message using a specific heap.
 
void ipc_msg_list_remove (struct ipc_msg *msg)
 Remove an IPC message from the send queue.
 
static void ipc_msg_free (struct ipc_msg *msg)
 Frees IPC message header and data.
 
void ipc_send_queued_msg (void)
 Sends the next message in the IPC message queue.
 
void ipc_msg_send (struct ipc_msg *msg, void *data, bool high_priority)
 Queues an IPC message for transmission.
 
void ipc_msg_send_direct (struct ipc_msg *msg, void *data)
 Send an IPC message directly for emergency.
 
void ipc_build_stream_posn (struct sof_ipc_stream_posn *posn, uint32_t type, uint32_t id)
 Build stream position IPC message.
 
void ipc_build_comp_event (struct sof_ipc_comp_event *event, uint32_t type, uint32_t id)
 Build component event IPC message.
 
bool ipc_trigger_trace_xfer (uint32_t avail)
 Check if trace buffer is ready for transmission.
 
void ipc_build_trace_posn (struct sof_ipc_dma_trace_posn *posn)
 Build trace position IPC message.
 

Function Documentation

◆ ipc_build_comp_event()

void ipc_build_comp_event ( struct sof_ipc_comp_event *  event,
uint32_t  type,
uint32_t  id 
)

Build component event IPC message.

Parameters
[in,out]eventComponent event message
[in]typeComponent event type
[in]idComponent ID.

◆ ipc_build_stream_posn()

void ipc_build_stream_posn ( struct sof_ipc_stream_posn *  posn,
uint32_t  type,
uint32_t  id 
)

Build stream position IPC message.

Parameters
[in,out]posnStream position message
[in]typeStream message type
[in]idStream ID.

◆ ipc_build_trace_posn()

void ipc_build_trace_posn ( struct sof_ipc_dma_trace_posn *  posn)

Build trace position IPC message.

Parameters
[in,out]posnTrace position message

◆ ipc_msg_free()

static void ipc_msg_free ( struct ipc_msg *  msg)
inlinestatic

Frees IPC message header and data.

Parameters
msgThe IPC message to be freed.

◆ ipc_msg_init()

static struct ipc_msg * ipc_msg_init ( struct k_heap *  heap,
uint32_t  header,
uint32_t  size 
)
inlinestatic

Initialize a new IPC message using a specific heap.

Parameters
heapHeap to allocate from (NULL = default kernel heap)
headerMessage header metadata
sizeMessage data size in bytes.
Returns
New IPC message.

◆ ipc_msg_list_remove()

void ipc_msg_list_remove ( struct ipc_msg *  msg)

Remove an IPC message from the send queue.

Acquires the IPC lock and removes the message from its list. Safe to call from userspace.

Parameters
msgThe IPC message to remove from the queue.

◆ ipc_msg_send()

void ipc_msg_send ( struct ipc_msg *  msg,
void *  data,
bool  high_priority 
)

Queues an IPC message for transmission.

Parameters
msgThe IPC message.
dataThe message data.
high_priorityTrue if a high priority message.

◆ ipc_msg_send_direct()

void ipc_msg_send_direct ( struct ipc_msg *  msg,
void *  data 
)

Send an IPC message directly for emergency.

Parameters
msgThe IPC message to be freed.
dataThe message data.

◆ ipc_msg_w_ext_init()

struct ipc_msg * ipc_msg_w_ext_init ( struct k_heap *  heap,
uint32_t  header,
uint32_t  extension,
uint32_t  size 
)

Initialize a new IPC message using a specific heap.

Parameters
heapHeap to allocate from (NULL = default kernel heap)
headerMessage header metadata
extensionMessage header extension metadata
sizeMessage data size in bytes.
Returns
New IPC message.

◆ ipc_send_queued_msg()

void ipc_send_queued_msg ( void  )

Sends the next message in the IPC message queue.

◆ ipc_trigger_trace_xfer()

bool ipc_trigger_trace_xfer ( uint32_t  avail)

Check if trace buffer is ready for transmission.

Parameters
[in,out]availData available in trace buffer