tegra_asoc_utils.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * tegra_asoc_utils.h - Definitions for Tegra DAS driver
  3. *
  4. * Author: Stephen Warren <swarren@nvidia.com>
  5. * Copyright (C) 2010,2012 - NVIDIA, Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. *
  21. */
  22. #ifndef __TEGRA_ASOC_UTILS_H__
  23. #define __TEGRA_ASOC_UTILS_H__
  24. struct clk;
  25. struct device;
  26. enum tegra_asoc_utils_soc {
  27. TEGRA_ASOC_UTILS_SOC_TEGRA20,
  28. TEGRA_ASOC_UTILS_SOC_TEGRA30,
  29. TEGRA_ASOC_UTILS_SOC_TEGRA114,
  30. TEGRA_ASOC_UTILS_SOC_TEGRA124,
  31. };
  32. struct tegra_asoc_utils_data {
  33. struct device *dev;
  34. enum tegra_asoc_utils_soc soc;
  35. struct clk *clk_pll_a;
  36. struct clk *clk_pll_a_out0;
  37. struct clk *clk_cdev1;
  38. int set_baseclock;
  39. int set_mclk;
  40. };
  41. int tegra_asoc_utils_set_rate(struct tegra_asoc_utils_data *data, int srate,
  42. int mclk);
  43. int tegra_asoc_utils_set_ac97_rate(struct tegra_asoc_utils_data *data);
  44. int tegra_asoc_utils_init(struct tegra_asoc_utils_data *data,
  45. struct device *dev);
  46. void tegra_asoc_utils_fini(struct tegra_asoc_utils_data *data);
  47. #endif