aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dai.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/soc-dai.h')
-rw-r--r--include/sound/soc-dai.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 061f16d4c87..0a0b019d41a 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -219,7 +219,6 @@ struct snd_soc_dai {
219 struct snd_soc_codec *codec; 219 struct snd_soc_codec *codec;
220 unsigned int active; 220 unsigned int active;
221 unsigned char pop_wait:1; 221 unsigned char pop_wait:1;
222 void *dma_data;
223 222
224 /* DAI private data */ 223 /* DAI private data */
225 void *private_data; 224 void *private_data;
@@ -230,4 +229,21 @@ struct snd_soc_dai {
230 struct list_head list; 229 struct list_head list;
231}; 230};
232 231
232static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
233 const struct snd_pcm_substream *ss)
234{
235 return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
236 dai->playback.dma_data : dai->capture.dma_data;
237}
238
239static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai,
240 const struct snd_pcm_substream *ss,
241 void *data)
242{
243 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)
244 dai->playback.dma_data = data;
245 else
246 dai->capture.dma_data = data;
247}
248
233#endif 249#endif