aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2008-05-19 06:31:55 -0400
committerJaroslav Kysela <perex@perex.cz>2008-05-19 07:19:20 -0400
commit1ef6ab75c7deef931d6308af282ed7d8e480e77f (patch)
tree9be0cbeb41f5f6346a8c5c1931e1dc462590455f /include/sound/soc.h
parentb2efbbfba24efc8456d68d5af42d082ab1c2febc (diff)
[ALSA] ASoC: Make CPU and codec DAI operations have same type
The CPU and codec DAI operations differ only in the presence of the digital mute operation for the codec so they may as well be the same type. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h30
1 files changed, 6 insertions, 24 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index d3c8c033dff8..73accbcfbd2d 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -272,9 +272,9 @@ struct snd_soc_ops {
272 int (*trigger)(struct snd_pcm_substream *, int); 272 int (*trigger)(struct snd_pcm_substream *, int);
273}; 273};
274 274
275/* ASoC codec DAI ops */ 275/* ASoC DAI ops */
276struct snd_soc_codec_ops { 276struct snd_soc_dai_ops {
277 /* codec DAI clocking configuration */ 277 /* DAI clocking configuration */
278 int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai, 278 int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai,
279 int clk_id, unsigned int freq, int dir); 279 int clk_id, unsigned int freq, int dir);
280 int (*set_pll)(struct snd_soc_codec_dai *codec_dai, 280 int (*set_pll)(struct snd_soc_codec_dai *codec_dai,
@@ -282,7 +282,7 @@ struct snd_soc_codec_ops {
282 int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai, 282 int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai,
283 int div_id, int div); 283 int div_id, int div);
284 284
285 /* CPU DAI format configuration */ 285 /* DAI format configuration */
286 int (*set_fmt)(struct snd_soc_codec_dai *codec_dai, 286 int (*set_fmt)(struct snd_soc_codec_dai *codec_dai,
287 unsigned int fmt); 287 unsigned int fmt);
288 int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai, 288 int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai,
@@ -293,24 +293,6 @@ struct snd_soc_codec_ops {
293 int (*digital_mute)(struct snd_soc_codec_dai *, int mute); 293 int (*digital_mute)(struct snd_soc_codec_dai *, int mute);
294}; 294};
295 295
296/* ASoC cpu DAI ops */
297struct snd_soc_cpu_ops {
298 /* CPU DAI clocking configuration */
299 int (*set_sysclk)(struct snd_soc_cpu_dai *cpu_dai,
300 int clk_id, unsigned int freq, int dir);
301 int (*set_clkdiv)(struct snd_soc_cpu_dai *cpu_dai,
302 int div_id, int div);
303 int (*set_pll)(struct snd_soc_cpu_dai *cpu_dai,
304 int pll_id, unsigned int freq_in, unsigned int freq_out);
305
306 /* CPU DAI format configuration */
307 int (*set_fmt)(struct snd_soc_cpu_dai *cpu_dai,
308 unsigned int fmt);
309 int (*set_tdm_slot)(struct snd_soc_cpu_dai *cpu_dai,
310 unsigned int mask, int slots);
311 int (*set_tristate)(struct snd_soc_cpu_dai *, int tristate);
312};
313
314/* SoC Codec DAI */ 296/* SoC Codec DAI */
315struct snd_soc_codec_dai { 297struct snd_soc_codec_dai {
316 char *name; 298 char *name;
@@ -328,7 +310,7 @@ struct snd_soc_codec_dai {
328 310
329 /* ops */ 311 /* ops */
330 struct snd_soc_ops ops; 312 struct snd_soc_ops ops;
331 struct snd_soc_codec_ops dai_ops; 313 struct snd_soc_dai_ops dai_ops;
332 314
333 /* DAI private data */ 315 /* DAI private data */
334 void *private_data; 316 void *private_data;
@@ -352,7 +334,7 @@ struct snd_soc_cpu_dai {
352 334
353 /* ops */ 335 /* ops */
354 struct snd_soc_ops ops; 336 struct snd_soc_ops ops;
355 struct snd_soc_cpu_ops dai_ops; 337 struct snd_soc_dai_ops dai_ops;
356 338
357 /* DAI capabilities */ 339 /* DAI capabilities */
358 struct snd_soc_pcm_stream capture; 340 struct snd_soc_pcm_stream capture;