2929 * Keyon Jie <yang.jie@linux.intel.com>
3030 */
3131
32+ /**
33+ * \file include/sof/dai.h
34+ * \brief DAI Drivers definition
35+ * \author Liam Girdwood <liam.r.girdwood@linux.intel.com>
36+ * \author Keyon Jie <yang.jie@linux.intel.com>
37+ */
38+
3239#ifndef __INCLUDE_DAI_H__
3340#define __INCLUDE_DAI_H__
3441
3542#include <stdint.h>
3643#include <sof/audio/component.h>
3744
45+ /** \addtogroup sof_dai_drivers DAI Drivers
46+ * DAI Drivers API specification.
47+ * @{
48+ */
49+
3850#define DAI_CLOCK_IN 0
3951#define DAI_CLOCK_OUT 1
4052
5668
5769struct dai ;
5870
59- /* DAI operations - all optional */
71+ /**
72+ * \brief DAI operations - all optional
73+ */
6074struct dai_ops {
6175 int (* set_config )(struct dai * dai , struct sof_ipc_dai_config * config );
6276 int (* trigger )(struct dai * dai , int cmd , int direction );
@@ -66,16 +80,21 @@ struct dai_ops {
6680 int (* set_loopback_mode )(struct dai * dai , uint32_t lbm );
6781};
6882
69- /* DAI slot map to audio channel */
83+ /**
84+ * \brief DAI slot map to audio channel
85+ */
7086struct dai_slot_map {
71- uint32_t channel ; /* channel ID - CHAN_ID_ */
72- uint32_t slot ; /* physical slot index */
87+ uint32_t channel ; /**< channel ID - CHAN_ID_ */
88+ uint32_t slot ; /**< physical slot index */
7389};
7490
91+ /**
92+ * \brief DAI Type.
93+ */
7594enum dai_type {
76- DAI_TYPE_INTEL_SSP = 0 ,
77- DAI_TYPE_INTEL_HDA ,
78- DAI_TYPE_INTEL_DMIC ,
95+ DAI_TYPE_INTEL_SSP = 0 , /**< Intel SSP */
96+ DAI_TYPE_INTEL_HDA , /**< Intel HD/A */
97+ DAI_TYPE_INTEL_DMIC , /**< Intel DMIC */
7998};
8099
81100
@@ -87,7 +106,9 @@ struct dai_plat_fifo_data {
87106 uint32_t handshake ;
88107};
89108
90- /* DAI platform data */
109+ /**
110+ * \brief DAI platform data
111+ */
91112struct dai_plat_data {
92113 uint32_t base ;
93114 uint32_t irq ;
@@ -116,41 +137,55 @@ struct dai *dai_get(uint32_t type, uint32_t index);
116137#define dai_fifo (dai , direction ) \
117138 dai->plat_data.fifo[direction].offset
118139
119- /* Digital Audio interface formatting */
140+ /**
141+ * \brief Digital Audio interface formatting
142+ */
120143static inline int dai_set_config (struct dai * dai ,
121144 struct sof_ipc_dai_config * config )
122145{
123146 return dai -> ops -> set_config (dai , config );
124147}
125148
126- /* Digital Audio interface formatting */
149+ /**
150+ * \brief Digital Audio interface formatting
151+ */
127152static inline int dai_set_loopback_mode (struct dai * dai , uint32_t lbm )
128153{
129154 return dai -> ops -> set_loopback_mode (dai , lbm );
130155}
131156
132- /* Digital Audio interface trigger */
157+ /**
158+ * \brief Digital Audio interface trigger
159+ */
133160static inline int dai_trigger (struct dai * dai , int cmd , int direction )
134161{
135162 return dai -> ops -> trigger (dai , cmd , direction );
136163}
137164
138- /* Digital Audio interface PM context store */
165+ /**
166+ * \brief Digital Audio interface PM context store
167+ */
139168static inline int dai_pm_context_store (struct dai * dai )
140169{
141170 return dai -> ops -> pm_context_store (dai );
142171}
143172
144- /* Digital Audio interface PM context restore */
173+ /**
174+ * \brief Digital Audio interface PM context restore
175+ */
145176static inline int dai_pm_context_restore (struct dai * dai )
146177{
147178 return dai -> ops -> pm_context_restore (dai );
148179}
149180
150- /* Digital Audio interface Probe */
181+ /**
182+ * \brief Digital Audio interface Probe
183+ */
151184static inline int dai_probe (struct dai * dai )
152185{
153186 return dai -> ops -> probe (dai );
154187}
155188
189+ /** @}*/
190+
156191#endif
0 commit comments