DAI Drivers API¶
-
group
sof_dai_drivers DAI Drivers API specification.
Defines
-
DAI_CLOCK_IN¶
-
DAI_CLOCK_OUT¶
-
DAI_DIR_PLAYBACK¶
-
DAI_DIR_CAPTURE¶
-
DAI_NUM_SLOT_MAPS¶
-
DAI_INFO_TYPE¶
-
DAI_INFO_DMA_CAPS¶
-
DAI_INFO_DMA_DEV¶
-
DAI_FLAGS_IRQ_CB¶ IRQ used for copy() timer.
-
DAI_CREAT¶ If the device does not exist it will be created.
-
trace_dai_drv_get_tr_ctx(drv_p)¶
-
trace_dai_drv_get_id(drv_p)¶
-
trace_dai_drv_get_subid(drv_p)¶
-
trace_dai_get_tr_ctx(dai_p)¶
-
trace_dai_get_id(dai_p)¶
-
trace_dai_get_subid(dai_p)¶
-
dai_cl_err(drv_p, __e, ...)¶
-
dai_cl_warn(drv_p, __e, ...)¶
-
dai_cl_info(drv_p, __e, ...)¶
-
dai_cl_dbg(drv_p, __e, ...)¶
-
dai_err(dai_p, __e, ...)¶
-
dai_warn(dai_p, __e, ...)¶
-
dai_info(dai_p, __e, ...)¶
-
dai_dbg(dai_p, __e, ...)¶
-
dai_set_drvdata(dai, data)¶
-
dai_get_drvdata(dai)¶
-
dai_base(dai)¶
-
dai_irq(dai)¶
-
dai_fifo(dai, direction)¶
Functions
-
struct dai_group *
dai_group_get(uint32_t group_id, uint32_t flags)¶ API to request DAI group.
Returns a DAI group for the given ID and increments the counter of DAIs in the group.
If a group for the given ID doesn’t exist, it will either return NULL or allocate a new group structure if the CREATE flag is supplied.
- Parameters
[in] group_id: Group ID[in] flags: Flags (CREATE)
-
void
dai_group_put(struct dai_group *group)¶ API to release DAI group.
Decrements the DAI counter inside the group.
- Parameters
[in] group: Group
-
int
dai_init(struct sof *sof)¶ API to initialize a platform DAI.
- Parameters
[in] sof: Pointer to firmware main context.
-
struct dai *
dai_get(uint32_t type, uint32_t index, uint32_t flags)¶ API to request a platform DAI.
- Parameters
[in] type: Type of requested DAI.[in] index: Index of requested DAI.[in] flags: Flags (CREATE)
-
static int
dai_set_config(struct dai *dai, struct sof_ipc_dai_config *config)¶ Digital Audio interface formatting.
-
static int
dai_get_hw_params(struct dai *dai, struct sof_ipc_stream_params *params, int dir)¶ Get Digital Audio interface stream parameters.
-
static int
dai_get_handshake(struct dai *dai, int direction, int stream_id)¶ Get Digital Audio interface DMA Handshake.
-
struct
dai_ops¶ - #include <dai.h>
DAI operations - all optional.
DAI drivers may allocate private data, which can be set with ‘dai_set_drvdata’ and retrieved with ‘dai_get_drvdata’. If a single DAI instance can have multiple DMA links and/or there is some other possibility of the same instance being used in multiple contexts at the same time, the private data should be allocated in the SOF_MEM_ZONE_SHARED.
Public Members
-
struct
timestamp_cfg¶ - #include <dai.h>
-
struct
timestamp_data¶ - #include <dai.h>
-
struct
timestamp_ops¶ - #include <dai.h>
Public Members
-
int (*
ts_config)(struct dai *dai, struct timestamp_cfg *cfg)¶
-
int (*
ts_start)(struct dai *dai, struct timestamp_cfg *cfg)¶
-
int (*
ts_stop)(struct dai *dai, struct timestamp_cfg *cfg)¶
-
int (*
ts_get)(struct dai *dai, struct timestamp_cfg *cfg, struct timestamp_data *tsd)¶
-
int (*
-
struct
dai_driver¶ - #include <dai.h>
Public Members
-
uint32_t
type¶ type, one of SOF_DAI_…
-
const struct sof_uuid_entry *
uid¶
-
struct tr_ctx *
tctx¶
-
uint32_t
dma_caps¶
-
uint32_t
dma_dev¶
-
struct timestamp_ops
ts_ops¶
-
uint32_t
-
struct
dai_slot_map¶ - #include <dai.h>
DAI slot map to audio channel.
-
struct
dai_plat_fifo_data¶ - #include <dai.h>
-
struct
dai_plat_data¶ - #include <dai.h>
DAI platform data.
-
struct
dai¶ - #include <dai.h>
Public Members
-
uint32_t
index¶ index
-
spinlock_t
lock¶ locking mechanism
-
int
sref¶ simple ref counter, guarded by lock
-
struct dai_plat_data
plat_data¶
-
const struct dai_driver *
drv¶
-
void *
priv_data¶
-
uint32_t
-
struct
dai_type_info¶ - #include <dai.h>
Array of DAIs grouped by type.
-
struct
dai_group¶ - #include <dai.h>
DAI group information.
-
struct
dai_info¶ - #include <dai.h>
Holds information about array of DAIs grouped by type.
-