diff options
author | James Morris <jmorris@namei.org> | 2010-05-06 10:56:07 +1000 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2010-05-06 10:56:07 +1000 |
commit | 0ffbe2699cda6afbe08501098dff8a8c2fe6ae09 (patch) | |
tree | 81b1a2305d16c873371b65c5a863c0268036cefe /include/sound/soc-dai.h | |
parent | 4e5d6f7ec3833c0da9cf34fa5c53c6058c5908b6 (diff) | |
parent | 7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'include/sound/soc-dai.h')
-rw-r--r-- | include/sound/soc-dai.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 061f16d4c878..0a0b019d41ad 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -219,7 +219,6 @@ struct snd_soc_dai { struct snd_soc_codec *codec; unsigned int active; unsigned char pop_wait:1; - void *dma_data; /* DAI private data */ void *private_data; @@ -230,4 +229,21 @@ struct snd_soc_dai { struct list_head list; }; +static inline void *snd_soc_dai_get_dma_data(const struct snd_soc_dai *dai, + const struct snd_pcm_substream *ss) +{ + return (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) ? + dai->playback.dma_data : dai->capture.dma_data; +} + +static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai, + const struct snd_pcm_substream *ss, + void *data) +{ + if (ss->stream == SNDRV_PCM_STREAM_PLAYBACK) + dai->playback.dma_data = data; + else + dai->capture.dma_data = data; +} + #endif |