diff options
Diffstat (limited to 'include/sound/soc-dai.h')
| -rw-r--r-- | include/sound/soc-dai.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index ca24e7f7a3f5..377693a14385 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | 18 | ||
| 19 | #include <sound/soc.h> | ||
| 20 | |||
| 19 | struct snd_pcm_substream; | 21 | struct snd_pcm_substream; |
| 20 | 22 | ||
| 21 | /* | 23 | /* |
| @@ -180,6 +182,12 @@ struct snd_soc_dai_ops { | |||
| 180 | struct snd_soc_dai *); | 182 | struct snd_soc_dai *); |
| 181 | int (*trigger)(struct snd_pcm_substream *, int, | 183 | int (*trigger)(struct snd_pcm_substream *, int, |
| 182 | struct snd_soc_dai *); | 184 | struct snd_soc_dai *); |
| 185 | /* | ||
| 186 | * For hardware based FIFO caused delay reporting. | ||
| 187 | * Optional. | ||
| 188 | */ | ||
| 189 | snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, | ||
| 190 | struct snd_soc_dai *); | ||
| 183 | }; | 191 | }; |
| 184 | 192 | ||
| 185 | /* | 193 | /* |
| @@ -213,11 +221,9 @@ struct snd_soc_dai { | |||
| 213 | unsigned int symmetric_rates:1; | 221 | unsigned int symmetric_rates:1; |
| 214 | 222 | ||
| 215 | /* DAI runtime info */ | 223 | /* DAI runtime info */ |
| 216 | struct snd_pcm_runtime *runtime; | ||
| 217 | struct snd_soc_codec *codec; | 224 | struct snd_soc_codec *codec; |
| 218 | unsigned int active; | 225 | unsigned int active; |
| 219 | unsigned char pop_wait:1; | 226 | unsigned char pop_wait:1; |
| 220 | void *dma_data; | ||
| 221 | 227 | ||
| 222 | /* DAI private data */ | 228 | /* DAI private data */ |
| 223 | void *private_data; | 229 | void *private_data; |
| @@ -228,4 +234,21 @@ struct snd_soc_dai { | |||
| 228 | struct list_head list; | 234 | struct list_head list; |
| 229 | }; | 235 | }; |
| 230 | 236 | ||
| 237 | static 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 | |||
| 244 | static 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 | |||
| 231 | #endif | 254 | #endif |
