diff options
Diffstat (limited to 'include/sound/soc-dai.h')
| -rw-r--r-- | include/sound/soc-dai.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index ae9a227d35d3..800c101bb096 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
| @@ -105,6 +105,8 @@ int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai, | |||
| 105 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, | 105 | int snd_soc_dai_set_pll(struct snd_soc_dai *dai, |
| 106 | int pll_id, int source, unsigned int freq_in, unsigned int freq_out); | 106 | int pll_id, int source, unsigned int freq_in, unsigned int freq_out); |
| 107 | 107 | ||
| 108 | int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio); | ||
| 109 | |||
| 108 | /* Digital Audio interface formatting */ | 110 | /* Digital Audio interface formatting */ |
| 109 | int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); | 111 | int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt); |
| 110 | 112 | ||
| @@ -131,6 +133,7 @@ struct snd_soc_dai_ops { | |||
| 131 | int (*set_pll)(struct snd_soc_dai *dai, int pll_id, int source, | 133 | int (*set_pll)(struct snd_soc_dai *dai, int pll_id, int source, |
| 132 | unsigned int freq_in, unsigned int freq_out); | 134 | unsigned int freq_in, unsigned int freq_out); |
| 133 | int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); | 135 | int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div); |
| 136 | int (*set_bclk_ratio)(struct snd_soc_dai *dai, unsigned int ratio); | ||
| 134 | 137 | ||
| 135 | /* | 138 | /* |
| 136 | * DAI format configuration | 139 | * DAI format configuration |
| @@ -166,6 +169,13 @@ struct snd_soc_dai_ops { | |||
| 166 | struct snd_soc_dai *); | 169 | struct snd_soc_dai *); |
| 167 | int (*prepare)(struct snd_pcm_substream *, | 170 | int (*prepare)(struct snd_pcm_substream *, |
| 168 | struct snd_soc_dai *); | 171 | struct snd_soc_dai *); |
| 172 | /* | ||
| 173 | * NOTE: Commands passed to the trigger function are not necessarily | ||
| 174 | * compatible with the current state of the dai. For example this | ||
| 175 | * sequence of commands is possible: START STOP STOP. | ||
| 176 | * So do not unconditionally use refcounting functions in the trigger | ||
| 177 | * function, e.g. clk_enable/disable. | ||
| 178 | */ | ||
| 169 | int (*trigger)(struct snd_pcm_substream *, int, | 179 | int (*trigger)(struct snd_pcm_substream *, int, |
| 170 | struct snd_soc_dai *); | 180 | struct snd_soc_dai *); |
| 171 | int (*bespoke_trigger)(struct snd_pcm_substream *, int, | 181 | int (*bespoke_trigger)(struct snd_pcm_substream *, int, |
| @@ -276,6 +286,13 @@ static inline void snd_soc_dai_set_dma_data(struct snd_soc_dai *dai, | |||
| 276 | dai->capture_dma_data = data; | 286 | dai->capture_dma_data = data; |
| 277 | } | 287 | } |
| 278 | 288 | ||
| 289 | static inline void snd_soc_dai_init_dma_data(struct snd_soc_dai *dai, | ||
| 290 | void *playback, void *capture) | ||
| 291 | { | ||
| 292 | dai->playback_dma_data = playback; | ||
| 293 | dai->capture_dma_data = capture; | ||
| 294 | } | ||
| 295 | |||
| 279 | static inline void snd_soc_dai_set_drvdata(struct snd_soc_dai *dai, | 296 | static inline void snd_soc_dai_set_drvdata(struct snd_soc_dai *dai, |
| 280 | void *data) | 297 | void *data) |
| 281 | { | 298 | { |
