Sound Open Firmware
Loading...
Searching...
No Matches
driver.h File Reference
Include dependency graph for driver.h:

Go to the source code of this file.

Functions

int platform_ipc_init (struct ipc *ipc)
 Provides platform specific IPC initialization.
enum task_state ipc_platform_do_cmd (struct ipc *ipc)
 Perform IPC command from host.
void ipc_platform_complete_cmd (struct ipc *ipc)
 Tell host we have completed the last IPC command.
int ipc_platform_send_msg (const struct ipc_msg *msg)
 Send IPC message to host.
void ipc_platform_send_msg_direct (const struct ipc_msg *msg)
 Send IPC message to host direct without inserting in msg_list.
struct ipc_data_host_buffer * ipc_platform_get_host_buffer (struct ipc *ipc)
 Retrieves the ipc_data_host_buffer allocated by the platform ipc.
int ipc_platform_compact_read_msg (struct ipc_cmd_hdr *hdr, int words)
 Read a compact IPC message from hardware.
int ipc_platform_compact_write_msg (struct ipc_cmd_hdr *hdr, int words)
 Write a compact IPC message to hardware.
int ipc_platform_poll_init (void)
 Initialise IPC hardware for polling mode.
void ipc_platform_poll_set_cmd_done (void)
 Tell host DSP has completed command.
int ipc_platform_poll_is_cmd_pending (void)
 Check whether there is a new IPC command from host.
int ipc_platform_poll_is_host_ready (void)
 Check whether host is ready for new IPC from DSP.
int ipc_platform_poll_tx_host_msg (struct ipc_msg *msg)
 Transmit new message to host.
void ipc_platform_wait_ack (struct ipc *ipc)
 wait for host acknowledgment to an IPC message

Function Documentation

◆ ipc_platform_compact_read_msg()

int ipc_platform_compact_read_msg ( struct ipc_cmd_hdr * hdr,
int words )

Read a compact IPC message from hardware.

Parameters
[in]hdrIPC header data
[in]wordsNumber of words to read in header.
Returns
Number of word written.

◆ ipc_platform_compact_write_msg()

int ipc_platform_compact_write_msg ( struct ipc_cmd_hdr * hdr,
int words )

Write a compact IPC message to hardware.

Parameters
[in]hdrCompact message header data.
[in]wordsNumber of words to be written from header.
Returns
Number of word written.

◆ ipc_platform_complete_cmd()

void ipc_platform_complete_cmd ( struct ipc * ipc)

Tell host we have completed the last IPC command.

◆ ipc_platform_do_cmd()

enum task_state ipc_platform_do_cmd ( struct ipc * ipc)

Perform IPC command from host.

Returns
The task state of the IPC command work.

◆ ipc_platform_get_host_buffer()

struct ipc_data_host_buffer * ipc_platform_get_host_buffer ( struct ipc * ipc)

Retrieves the ipc_data_host_buffer allocated by the platform ipc.

Returns
Pointer to the data.

This function must be implemented by platforms which use ipc...page_descriptors() while processing host page tables.

◆ ipc_platform_poll_init()

int ipc_platform_poll_init ( void )

Initialise IPC hardware for polling mode.

Returns
0 if successful error code otherwise.

◆ ipc_platform_poll_is_cmd_pending()

int ipc_platform_poll_is_cmd_pending ( void )

Check whether there is a new IPC command from host.

Returns
1 if new command is pending from host.

◆ ipc_platform_poll_is_host_ready()

int ipc_platform_poll_is_host_ready ( void )

Check whether host is ready for new IPC from DSP.

Returns
1 if host is ready for a new command from DSP.

◆ ipc_platform_poll_set_cmd_done()

void ipc_platform_poll_set_cmd_done ( void )

Tell host DSP has completed command.

◆ ipc_platform_poll_tx_host_msg()

int ipc_platform_poll_tx_host_msg ( struct ipc_msg * msg)

Transmit new message to host.

Returns
0 if successful error code otherwise.

◆ ipc_platform_send_msg()

int ipc_platform_send_msg ( const struct ipc_msg * msg)

Send IPC message to host.

Parameters
msgThe IPC message to send to host.
Returns
0 on success.

◆ ipc_platform_send_msg_direct()

void ipc_platform_send_msg_direct ( const struct ipc_msg * msg)

Send IPC message to host direct without inserting in msg_list.

Parameters
msgThe IPC message to send to host.

◆ ipc_platform_wait_ack()

void ipc_platform_wait_ack ( struct ipc * ipc)

wait for host acknowledgment to an IPC message

◆ platform_ipc_init()

int platform_ipc_init ( struct ipc * ipc)

Provides platform specific IPC initialization.

Parameters
ipcGlobal IPC context
Returns
0 if succeeded, error code otherwise.

This function must be implemented by the platform. It is called from the main IPC code, at the end of ipc_init().

If the platform requires any private data to be associated with the IPC context, it may allocate it here and attach to the global context using ipc_set_drvdata(). Other platform specific IPC functions, like ipc_platform_do_cmd(), may obtain it later from the context using ipc_get_drvdata().