soc.h (c203e45f069af47ca7623e4dcd8c00bfba2722e4) soc.h (1ef6ab75c7deef931d6308af282ed7d8e480e77f)
1/*
2 * linux/sound/soc.h -- ALSA SoC Layer
3 *
4 * Author: Liam Girdwood
5 * Created: Aug 11th 2005
6 * Copyright: Wolfson Microelectronics. PLC.
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 258 unchanged lines hidden (view full) ---

267 int (*startup)(struct snd_pcm_substream *);
268 void (*shutdown)(struct snd_pcm_substream *);
269 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
270 int (*hw_free)(struct snd_pcm_substream *);
271 int (*prepare)(struct snd_pcm_substream *);
272 int (*trigger)(struct snd_pcm_substream *, int);
273};
274
1/*
2 * linux/sound/soc.h -- ALSA SoC Layer
3 *
4 * Author: Liam Girdwood
5 * Created: Aug 11th 2005
6 * Copyright: Wolfson Microelectronics. PLC.
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 258 unchanged lines hidden (view full) ---

267 int (*startup)(struct snd_pcm_substream *);
268 void (*shutdown)(struct snd_pcm_substream *);
269 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
270 int (*hw_free)(struct snd_pcm_substream *);
271 int (*prepare)(struct snd_pcm_substream *);
272 int (*trigger)(struct snd_pcm_substream *, int);
273};
274
275/* ASoC codec DAI ops */
276struct snd_soc_codec_ops {
277 /* codec DAI clocking configuration */
275/* ASoC DAI ops */
276struct snd_soc_dai_ops {
277 /* DAI clocking configuration */
278 int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai,
279 int clk_id, unsigned int freq, int dir);
280 int (*set_pll)(struct snd_soc_codec_dai *codec_dai,
281 int pll_id, unsigned int freq_in, unsigned int freq_out);
282 int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai,
283 int div_id, int div);
284
278 int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai,
279 int clk_id, unsigned int freq, int dir);
280 int (*set_pll)(struct snd_soc_codec_dai *codec_dai,
281 int pll_id, unsigned int freq_in, unsigned int freq_out);
282 int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai,
283 int div_id, int div);
284
285 /* CPU DAI format configuration */
285 /* DAI format configuration */
286 int (*set_fmt)(struct snd_soc_codec_dai *codec_dai,
287 unsigned int fmt);
288 int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai,
289 unsigned int mask, int slots);
290 int (*set_tristate)(struct snd_soc_codec_dai *, int tristate);
291
292 /* digital mute */
293 int (*digital_mute)(struct snd_soc_codec_dai *, int mute);
294};
295
286 int (*set_fmt)(struct snd_soc_codec_dai *codec_dai,
287 unsigned int fmt);
288 int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai,
289 unsigned int mask, int slots);
290 int (*set_tristate)(struct snd_soc_codec_dai *, int tristate);
291
292 /* digital mute */
293 int (*digital_mute)(struct snd_soc_codec_dai *, int mute);
294};
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 */
315struct snd_soc_codec_dai {
316 char *name;
317 int id;
318 unsigned char type;
319
320 /* DAI capabilities */
321 struct snd_soc_pcm_stream playback;
322 struct snd_soc_pcm_stream capture;
323
324 /* DAI runtime info */
325 struct snd_soc_codec *codec;
326 unsigned int active;
327 unsigned char pop_wait:1;
328
329 /* ops */
330 struct snd_soc_ops ops;
296/* SoC Codec DAI */
297struct snd_soc_codec_dai {
298 char *name;
299 int id;
300 unsigned char type;
301
302 /* DAI capabilities */
303 struct snd_soc_pcm_stream playback;
304 struct snd_soc_pcm_stream capture;
305
306 /* DAI runtime info */
307 struct snd_soc_codec *codec;
308 unsigned int active;
309 unsigned char pop_wait:1;
310
311 /* ops */
312 struct snd_soc_ops ops;
331 struct snd_soc_codec_ops dai_ops;
313 struct snd_soc_dai_ops dai_ops;
332
333 /* DAI private data */
334 void *private_data;
335};
336
337/* SoC CPU DAI */
338struct snd_soc_cpu_dai {
339

--- 7 unchanged lines hidden (view full) ---

347 void (*remove)(struct platform_device *pdev);
348 int (*suspend)(struct platform_device *pdev,
349 struct snd_soc_cpu_dai *cpu_dai);
350 int (*resume)(struct platform_device *pdev,
351 struct snd_soc_cpu_dai *cpu_dai);
352
353 /* ops */
354 struct snd_soc_ops ops;
314
315 /* DAI private data */
316 void *private_data;
317};
318
319/* SoC CPU DAI */
320struct snd_soc_cpu_dai {
321

--- 7 unchanged lines hidden (view full) ---

329 void (*remove)(struct platform_device *pdev);
330 int (*suspend)(struct platform_device *pdev,
331 struct snd_soc_cpu_dai *cpu_dai);
332 int (*resume)(struct platform_device *pdev,
333 struct snd_soc_cpu_dai *cpu_dai);
334
335 /* ops */
336 struct snd_soc_ops ops;
355 struct snd_soc_cpu_ops dai_ops;
337 struct snd_soc_dai_ops dai_ops;
356
357 /* DAI capabilities */
358 struct snd_soc_pcm_stream capture;
359 struct snd_soc_pcm_stream playback;
360
361 /* DAI runtime info */
362 struct snd_pcm_runtime *runtime;
363 unsigned char active:1;

--- 142 unchanged lines hidden ---
338
339 /* DAI capabilities */
340 struct snd_soc_pcm_stream capture;
341 struct snd_soc_pcm_stream playback;
342
343 /* DAI runtime info */
344 struct snd_pcm_runtime *runtime;
345 unsigned char active:1;

--- 142 unchanged lines hidden ---