6363#define DAI_NUM_SLOT_MAPS 8
6464
6565/* DAI flags */
66- #define DAI_FLAGS_IRQ_CB (1 << 0) /* irq used for copy() timer */
6766
67+ /** \brief IRQ used for copy() timer */
68+ #define DAI_FLAGS_IRQ_CB BIT(0)
69+
70+ /* DAI get() flags */
71+
72+ /** \brief If the device does not exist it will be created */
73+ #define DAI_CREAT BIT(0)
6874
6975struct dai ;
7076
@@ -77,6 +83,7 @@ struct dai_ops {
7783 int (* pm_context_restore )(struct dai * dai );
7884 int (* pm_context_store )(struct dai * dai );
7985 int (* probe )(struct dai * dai );
86+ int (* remove )(struct dai * dai );
8087 int (* set_loopback_mode )(struct dai * dai , uint32_t lbm );
8188};
8289
@@ -140,8 +147,16 @@ void dai_install(struct dai_type_info *dai_type_array, size_t num_dai_types);
140147 *
141148 * \param[in] type Type of requested DAI.
142149 * \param[in] index Index of requested DAI.
150+ * \param[in] flags Flags (CREATE)
151+ */
152+ struct dai * dai_get (uint32_t type , uint32_t index , uint32_t flags );
153+
154+ /**
155+ * \brief API to release a platform DAI.
156+ *
157+ * @param[in] dai DAI to relese.
143158 */
144- struct dai * dai_get ( uint32_t type , uint32_t index );
159+ void dai_put ( struct dai * dai );
145160
146161#define dai_set_drvdata (dai , data ) \
147162 dai->private = data;
@@ -203,6 +218,14 @@ static inline int dai_probe(struct dai *dai)
203218 return dai -> ops -> probe (dai );
204219}
205220
221+ /**
222+ * \brief Digital Audio interface Remove
223+ */
224+ static inline int dai_remove (struct dai * dai )
225+ {
226+ return dai -> ops -> remove (dai );
227+ }
228+
206229/** @}*/
207230
208231#endif
0 commit comments