aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sound/soc-dai.h18
-rw-r--r--include/sound/soc.h1
2 files changed, 18 insertions, 1 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 6cf76a41501..377693a1438 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -224,7 +224,6 @@ struct snd_soc_dai {
224 struct snd_soc_codec *codec; 224 struct snd_soc_codec *codec;
225 unsigned int active; 225 unsigned int active;
226 unsigned char pop_wait:1; 226 unsigned char pop_wait:1;
227 void *dma_data;
228 227
229 /* DAI private data */ 228 /* DAI private data */
230 void *private_data; 229 void *private_data;
@@ -235,4 +234,21 @@ struct snd_soc_dai {
235 struct list_head list; 234 struct list_head list;
236}; 235};
237 236
237static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai,
238 const struct snd_pcm_substream *ss)
239{
240 return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ?
241 dai->playback.dma_data : dai->capture.dma_data;
242}
243
244static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai,
245 const struct snd_pcm_substream *ss,
246 void *data)
247{
248 if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK)
249 dai->playback.dma_data = data;
250 else
251 dai->capture.dma_data = data;
252}
253
238#endif 254#endif
diff --git a/include/sound/soc.h b/include/sound/soc.h
index dbfec16015d..b8bac6ae624 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -376,6 +376,7 @@ struct snd_soc_pcm_stream {
376 unsigned int channels_min; /* min channels */ 376 unsigned int channels_min; /* min channels */
377 unsigned int channels_max; /* max channels */ 377 unsigned int channels_max; /* max channels */
378 unsigned int active; /* num of active users of the stream */ 378 unsigned int active; /* num of active users of the stream */
379 void *dma_data; /* used by platform code */
379}; 380};
380 381
381/* SoC audio ops */ 382/* SoC audio ops */