davinci-mcasp.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * ALSA SoC McASP Audio Layer for TI DAVINCI processor
  3. *
  4. * MCASP related definitions
  5. *
  6. * Author: Nirmal Pandey <n-pandey@ti.com>,
  7. * Suresh Rajashekara <suresh.r@ti.com>
  8. * Steve Chen <schen@.mvista.com>
  9. *
  10. * Copyright: (C) 2009 MontaVista Software, Inc., <source@mvista.com>
  11. * Copyright: (C) 2009 Texas Instruments, India
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License version 2 as
  15. * published by the Free Software Foundation.
  16. */
  17. #ifndef DAVINCI_MCASP_H
  18. #define DAVINCI_MCASP_H
  19. #include <linux/io.h>
  20. #include <mach/asp.h>
  21. #include "davinci-pcm.h"
  22. extern struct snd_soc_dai davinci_mcasp_dai[];
  23. #define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_96000
  24. #define DAVINCI_MCASP_I2S_DAI 0
  25. #define DAVINCI_MCASP_DIT_DAI 1
  26. enum {
  27. DAVINCI_AUDIO_WORD_8 = 0,
  28. DAVINCI_AUDIO_WORD_12,
  29. DAVINCI_AUDIO_WORD_16,
  30. DAVINCI_AUDIO_WORD_20,
  31. DAVINCI_AUDIO_WORD_24,
  32. DAVINCI_AUDIO_WORD_32,
  33. DAVINCI_AUDIO_WORD_28, /* This is only valid for McASP */
  34. };
  35. struct davinci_audio_dev {
  36. /*
  37. * dma_params must be first because rtd->dai->cpu_dai->private_data
  38. * is cast to a pointer of an array of struct davinci_pcm_dma_params in
  39. * davinci_pcm_open.
  40. */
  41. struct davinci_pcm_dma_params dma_params[2];
  42. void __iomem *base;
  43. int sample_rate;
  44. struct clk *clk;
  45. unsigned int codec_fmt;
  46. /* McASP specific data */
  47. int tdm_slots;
  48. u8 op_mode;
  49. u8 num_serializer;
  50. u8 *serial_dir;
  51. u8 version;
  52. /* McASP FIFO related */
  53. u8 txnumevt;
  54. u8 rxnumevt;
  55. };
  56. #endif /* DAVINCI_MCASP_H */