msm-dai-q6-v2.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef __MSM_DAI_Q6_PDATA_H__
  5. #define __MSM_DAI_Q6_PDATA_H__
  6. #define MSM_MI2S_SD0 (1 << 0)
  7. #define MSM_MI2S_SD1 (1 << 1)
  8. #define MSM_MI2S_SD2 (1 << 2)
  9. #define MSM_MI2S_SD3 (1 << 3)
  10. #define MSM_MI2S_SD4 (1 << 4)
  11. #define MSM_MI2S_SD5 (1 << 5)
  12. #define MSM_MI2S_SD6 (1 << 6)
  13. #define MSM_MI2S_SD7 (1 << 7)
  14. #define MSM_MI2S_CAP_RX 0
  15. #define MSM_MI2S_CAP_TX 1
  16. #define MSM_PRIM_MI2S 0
  17. #define MSM_SEC_MI2S 1
  18. #define MSM_TERT_MI2S 2
  19. #define MSM_QUAT_MI2S 3
  20. #define MSM_QUIN_MI2S 4
  21. #define MSM_SENARY_MI2S 5
  22. #define MSM_SEC_MI2S_SD1 6
  23. #define MSM_INT0_MI2S 7
  24. #define MSM_INT1_MI2S 8
  25. #define MSM_INT2_MI2S 9
  26. #define MSM_INT3_MI2S 10
  27. #define MSM_INT4_MI2S 11
  28. #define MSM_INT5_MI2S 12
  29. #define MSM_INT6_MI2S 13
  30. #define MSM_MI2S_MIN MSM_PRIM_MI2S
  31. #define MSM_MI2S_MAX MSM_INT6_MI2S
  32. #define MSM_DISPLAY_PORT 0
  33. #define MSM_DISPLAY_PORT1 1
  34. #define MSM_PRIM_META_MI2S 0
  35. #define MSM_SEC_META_MI2S 1
  36. #define MSM_META_MI2S_MIN MSM_PRIM_META_MI2S
  37. #define MSM_META_MI2S_MAX MSM_SEC_META_MI2S
  38. struct msm_dai_auxpcm_config {
  39. u16 mode;
  40. u16 sync;
  41. u16 frame;
  42. u16 quant;
  43. u16 num_slots;
  44. u16 *slot_mapping;
  45. u16 data;
  46. u32 pcm_clk_rate;
  47. };
  48. struct msm_dai_auxpcm_pdata {
  49. struct msm_dai_auxpcm_config mode_8k;
  50. struct msm_dai_auxpcm_config mode_16k;
  51. };
  52. struct msm_mi2s_pdata {
  53. u16 rx_sd_lines;
  54. u16 tx_sd_lines;
  55. u16 intf_id;
  56. };
  57. struct msm_meta_mi2s_pdata {
  58. u32 num_member_ports;
  59. u32 member_port[MAX_NUM_I2S_META_PORT_MEMBER_PORTS];
  60. u32 sd_lines[MAX_NUM_I2S_META_PORT_MEMBER_PORTS];
  61. u16 intf_id;
  62. };
  63. struct msm_i2s_data {
  64. u32 capability; /* RX or TX */
  65. u16 sd_lines;
  66. };
  67. struct msm_dai_tdm_group_config {
  68. u16 group_id;
  69. u16 num_ports;
  70. u16 *port_id;
  71. u32 clk_rate;
  72. };
  73. struct msm_dai_tdm_config {
  74. u16 sync_mode;
  75. u16 sync_src;
  76. u16 data_out;
  77. u16 invert_sync;
  78. u16 data_delay;
  79. u32 data_align;
  80. u16 header_start_offset;
  81. u16 header_width;
  82. u16 header_num_frame_repeat;
  83. };
  84. struct msm_dai_tdm_pdata {
  85. struct msm_dai_tdm_group_config group_config;
  86. struct msm_dai_tdm_config config;
  87. };
  88. #endif