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

Go to the source code of this file.

Data Structures

struct  ipc_comp_dev

Macros

#define ipc_to_pipe_new(x)
#define ipc_to_pipe_connect(x)
#define ipc_to_comp_new(x)
#define COMP_TYPE_ANY   0
#define COMP_TYPE_COMPONENT   1
#define COMP_TYPE_BUFFER   2
#define COMP_TYPE_PIPELINE   3
#define IPC_COMP_ALL   0
#define IPC_COMP_IGNORE_REMOTE   1
#define ipc_get_comp_by_id(ipc, comp_id)
#define ipc_get_pipeline_by_id(ipc, ppln_id)
#define ipc_get_buffer_by_id(ipc, buf_id)

Typedefs

typedef uint32_t ipc_pipe_new
typedef uint32_t ipc_pipe_comp_connect
typedef uint32_t ipc_comp

Functions

int ipc_comp_new (struct ipc *ipc, ipc_comp *new)
 Create a new IPC component.
int ipc_comp_free (struct ipc *ipc, uint32_t comp_id)
 Free an IPC component.
int ipc_buffer_new (struct ipc *ipc, const struct sof_ipc_buffer *buffer)
 Create a new IPC buffer.
int ipc_buffer_free (struct ipc *ipc, uint32_t buffer_id)
 Free an IPC buffer.
int ipc_pipeline_new (struct ipc *ipc, ipc_pipe_new *pipeline)
 Create a new IPC pipeline.
int ipc_pipeline_free (struct ipc *ipc, uint32_t comp_id)
 Free an IPC pipeline.
int ipc_pipeline_complete (struct ipc *ipc, uint32_t comp_id)
 Complete an IPC pipeline.
int ipc_comp_connect (struct ipc *ipc, ipc_pipe_comp_connect *connect)
 Connect components together on a pipeline.
int ipc_comp_disconnect (struct ipc *ipc, ipc_pipe_comp_connect *connect)
 Disconnect components in a pipeline.
struct ipc_comp_dev * ipc_get_comp_dev (struct ipc *ipc, uint16_t type, uint32_t id)
 Get component device from component type and ID.
struct ipc_comp_dev * ipc_get_comp_by_ppl_id (struct ipc *ipc, uint16_t type, uint32_t ppl_id, uint32_t ignore_remote)
 Get component device from pipeline ID and type.
struct ipc_comp_dev * ipc_get_ppl_comp (struct ipc *ipc, uint32_t pipeline_id, int dir)
 Get buffer device from pipeline ID.
int32_t ipc_comp_pipe_id (const struct ipc_comp_dev *icd)
 Get pipeline ID from component.
int ipc_comp_dai_config (struct ipc *ipc, struct ipc_config_dai *common_config, void *spec_config)
 Configure all DAI components attached to DAI.
int comp_verify_params (struct comp_dev *dev, uint32_t flag, struct sof_ipc_stream_params *params)
int comp_buffer_connect (struct comp_dev *comp, uint32_t comp_core, struct comp_buffer *buffer, uint32_t dir)
 connect component and buffer

Macro Definition Documentation

◆ COMP_TYPE_ANY

#define COMP_TYPE_ANY   0

◆ COMP_TYPE_BUFFER

#define COMP_TYPE_BUFFER   2

◆ COMP_TYPE_COMPONENT

#define COMP_TYPE_COMPONENT   1

◆ COMP_TYPE_PIPELINE

#define COMP_TYPE_PIPELINE   3

◆ IPC_COMP_ALL

#define IPC_COMP_ALL   0

◆ IPC_COMP_IGNORE_REMOTE

#define IPC_COMP_IGNORE_REMOTE   1

◆ ipc_get_buffer_by_id

#define ipc_get_buffer_by_id ( ipc,
buf_id )
Value:
#define COMP_TYPE_BUFFER
Definition topology.h:86
struct ipc_comp_dev * ipc_get_comp_dev(struct ipc *ipc, uint16_t type, uint32_t id)
Get component device from component type and ID.
Definition common.h:90

◆ ipc_get_comp_by_id

#define ipc_get_comp_by_id ( ipc,
comp_id )
Value:
#define COMP_TYPE_COMPONENT
Definition topology.h:85

◆ ipc_get_pipeline_by_id

#define ipc_get_pipeline_by_id ( ipc,
ppln_id )
Value:
#define COMP_TYPE_PIPELINE
Definition topology.h:87

◆ ipc_to_comp_new

#define ipc_to_comp_new ( x)
Value:
((ipc_comp *)x)
uint32_t ipc_comp
Definition topology.h:30

◆ ipc_to_pipe_connect

#define ipc_to_pipe_connect ( x)
Value:
uint32_t ipc_pipe_comp_connect
Definition topology.h:29

◆ ipc_to_pipe_new

#define ipc_to_pipe_new ( x)
Value:
uint32_t ipc_pipe_new
Definition topology.h:28

Typedef Documentation

◆ ipc_comp

typedef uint32_t ipc_comp

◆ ipc_pipe_comp_connect

typedef uint32_t ipc_pipe_comp_connect

◆ ipc_pipe_new

typedef uint32_t ipc_pipe_new

Function Documentation

◆ comp_buffer_connect()

int comp_buffer_connect ( struct comp_dev * comp,
uint32_t comp_core,
struct comp_buffer * buffer,
uint32_t dir )

connect component and buffer

Parameters
compComponent dev
comp_corecomp core id
bufferComponent buffer
dirconnection direction
Returns
connection status

◆ comp_verify_params()

int comp_verify_params ( struct comp_dev * dev,
uint32_t flag,
struct sof_ipc_stream_params * params )

◆ ipc_buffer_free()

int ipc_buffer_free ( struct ipc * ipc,
uint32_t buffer_id )

Free an IPC buffer.

Parameters
ipcThe global IPC context.
buffer_idbuffer ID to free.
Returns
0 on success or negative error.

◆ ipc_buffer_new()

int ipc_buffer_new ( struct ipc * ipc,
const struct sof_ipc_buffer * buffer )

Create a new IPC buffer.

Parameters
ipcThe global IPC context.
bufferNew IPC buffer descriptor.
Returns
0 on success or negative error.

◆ ipc_comp_connect()

int ipc_comp_connect ( struct ipc * ipc,
ipc_pipe_comp_connect * connect )

Connect components together on a pipeline.

Parameters
ipcThe global IPC context.
connectComponents to connect together.
Returns
0 on success or negative error.

◆ ipc_comp_dai_config()

int ipc_comp_dai_config ( struct ipc * ipc,
struct ipc_config_dai * common_config,
void * spec_config )

Configure all DAI components attached to DAI.

Parameters
ipcGlobal IPC context.
common_configCommon DAI configuration.
spec_configSpecific DAI configuration.
Returns
0 on success or negative error.

◆ ipc_comp_disconnect()

int ipc_comp_disconnect ( struct ipc * ipc,
ipc_pipe_comp_connect * connect )

Disconnect components in a pipeline.

Parameters
ipcThe global IPC context.
connectComponents.
Returns
0 on success or negative error.

◆ ipc_comp_free()

int ipc_comp_free ( struct ipc * ipc,
uint32_t comp_id )

Free an IPC component.

Parameters
ipcThe global IPC context.
comp_idComponent ID to free.
Returns
0 on success or negative error.

◆ ipc_comp_new()

int ipc_comp_new ( struct ipc * ipc,
ipc_comp * new )

Create a new IPC component.

Parameters
ipcThe global IPC context.
newNew IPC component descriptor.
Returns
0 on success or negative error.

◆ ipc_comp_pipe_id()

int32_t ipc_comp_pipe_id ( const struct ipc_comp_dev * icd)

Get pipeline ID from component.

Parameters
icdThe component device.
Returns
Pipeline ID or negative error.

◆ ipc_get_comp_by_ppl_id()

struct ipc_comp_dev * ipc_get_comp_by_ppl_id ( struct ipc * ipc,
uint16_t type,
uint32_t ppl_id,
uint32_t ignore_remote )

Get component device from pipeline ID and type.

Parameters
ipcThe global IPC context.
typeThe component type.
ppl_idThe pipeline ID.
ignore_remoteOmit component from different core if set to IPC_COMP_IGNORE_REMOTE
Returns
component device or NULL.

◆ ipc_get_comp_dev()

struct ipc_comp_dev * ipc_get_comp_dev ( struct ipc * ipc,
uint16_t type,
uint32_t id )

Get component device from component type and ID.

Parameters
ipcThe global IPC context.
typeThe component type
idThe component ID.
Returns
Component device or NULL.

◆ ipc_get_ppl_comp()

struct ipc_comp_dev * ipc_get_ppl_comp ( struct ipc * ipc,
uint32_t pipeline_id,
int dir )

Get buffer device from pipeline ID.

Parameters
ipcThe global IPC context.
pipeline_idThe pipeline ID.
dirPipeline stream direction.
Returns
Pipeline device or NULL.

◆ ipc_pipeline_complete()

int ipc_pipeline_complete ( struct ipc * ipc,
uint32_t comp_id )

Complete an IPC pipeline.

Parameters
ipcThe global IPC context.
comp_idPipeline ID to complete.
Returns
0 on success or negative error.

◆ ipc_pipeline_free()

int ipc_pipeline_free ( struct ipc * ipc,
uint32_t comp_id )

Free an IPC pipeline.

Parameters
ipcThe global IPC context.
comp_idPipeline ID to free.
Returns
0 on success or negative error.

◆ ipc_pipeline_new()

int ipc_pipeline_new ( struct ipc * ipc,
ipc_pipe_new * pipeline )

Create a new IPC pipeline.

Parameters
ipcThe global IPC context.
pipelineNew IPC pipeline descriptor.
Returns
0 on success or negative error.