mt6797-afe-common.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * mt6797-afe-common.h -- Mediatek 6797 audio driver definitions
  4. *
  5. * Copyright (c) 2018 MediaTek Inc.
  6. * Author: KaiChieh Chuang <[email protected]>
  7. */
  8. #ifndef _MT_6797_AFE_COMMON_H_
  9. #define _MT_6797_AFE_COMMON_H_
  10. #include <sound/soc.h>
  11. #include <linux/list.h>
  12. #include <linux/regmap.h>
  13. #include "../common/mtk-base-afe.h"
  14. enum {
  15. MT6797_MEMIF_DL1,
  16. MT6797_MEMIF_DL2,
  17. MT6797_MEMIF_DL3,
  18. MT6797_MEMIF_VUL,
  19. MT6797_MEMIF_AWB,
  20. MT6797_MEMIF_VUL12,
  21. MT6797_MEMIF_DAI,
  22. MT6797_MEMIF_MOD_DAI,
  23. MT6797_MEMIF_NUM,
  24. MT6797_DAI_ADDA = MT6797_MEMIF_NUM,
  25. MT6797_DAI_PCM_1,
  26. MT6797_DAI_PCM_2,
  27. MT6797_DAI_HOSTLESS_LPBK,
  28. MT6797_DAI_HOSTLESS_SPEECH,
  29. MT6797_DAI_NUM,
  30. };
  31. enum {
  32. MT6797_IRQ_1,
  33. MT6797_IRQ_2,
  34. MT6797_IRQ_3,
  35. MT6797_IRQ_4,
  36. MT6797_IRQ_7,
  37. MT6797_IRQ_NUM,
  38. };
  39. struct clk;
  40. struct mt6797_afe_private {
  41. struct clk **clk;
  42. };
  43. unsigned int mt6797_general_rate_transform(struct device *dev,
  44. unsigned int rate);
  45. unsigned int mt6797_rate_transform(struct device *dev,
  46. unsigned int rate, int aud_blk);
  47. /* dai register */
  48. int mt6797_dai_adda_register(struct mtk_base_afe *afe);
  49. int mt6797_dai_pcm_register(struct mtk_base_afe *afe);
  50. int mt6797_dai_hostless_register(struct mtk_base_afe *afe);
  51. #endif