omap-mcbsp.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * omap-mcbsp.h
  3. *
  4. * Copyright (C) 2008 Nokia Corporation
  5. *
  6. * Contact: Jarkko Nikula <jhnikula@gmail.com>
  7. * Peter Ujfalusi <peter.ujfalusi@ti.com>
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * version 2 as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful, but
  14. * WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  21. * 02110-1301 USA
  22. *
  23. */
  24. #ifndef __OMAP_I2S_H__
  25. #define __OMAP_I2S_H__
  26. /* Source clocks for McBSP sample rate generator */
  27. enum omap_mcbsp_clksrg_clk {
  28. OMAP_MCBSP_SYSCLK_CLKS_FCLK, /* Internal FCLK */
  29. OMAP_MCBSP_SYSCLK_CLKS_EXT, /* External CLKS pin */
  30. OMAP_MCBSP_SYSCLK_CLK, /* Internal ICLK */
  31. OMAP_MCBSP_SYSCLK_CLKX_EXT, /* External CLKX pin */
  32. OMAP_MCBSP_SYSCLK_CLKR_EXT, /* External CLKR pin */
  33. OMAP_MCBSP_CLKR_SRC_CLKR, /* CLKR from CLKR pin */
  34. OMAP_MCBSP_CLKR_SRC_CLKX, /* CLKR from CLKX pin */
  35. OMAP_MCBSP_FSR_SRC_FSR, /* FSR from FSR pin */
  36. OMAP_MCBSP_FSR_SRC_FSX, /* FSR from FSX pin */
  37. };
  38. /* McBSP dividers */
  39. enum omap_mcbsp_div {
  40. OMAP_MCBSP_CLKGDV, /* Sample rate generator divider */
  41. };
  42. #if defined(CONFIG_SOC_OMAP2420)
  43. #define NUM_LINKS 2
  44. #endif
  45. #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX)
  46. #undef NUM_LINKS
  47. #define NUM_LINKS 3
  48. #endif
  49. #if defined(CONFIG_ARCH_OMAP4)
  50. #undef NUM_LINKS
  51. #define NUM_LINKS 4
  52. #endif
  53. #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_OMAP2430)
  54. #undef NUM_LINKS
  55. #define NUM_LINKS 5
  56. #endif
  57. int omap_mcbsp_st_add_controls(struct snd_soc_codec *codec, int mcbsp_id);
  58. #endif