msm-dai-q6-v2.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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_SEC_MI2S_SD1 5
  22. #define MSM_SENARY_MI2S 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. struct msm_dai_auxpcm_config {
  35. u16 mode;
  36. u16 sync;
  37. u16 frame;
  38. u16 quant;
  39. u16 num_slots;
  40. u16 *slot_mapping;
  41. u16 data;
  42. u32 pcm_clk_rate;
  43. };
  44. struct msm_dai_auxpcm_pdata {
  45. struct msm_dai_auxpcm_config mode_8k;
  46. struct msm_dai_auxpcm_config mode_16k;
  47. };
  48. struct msm_mi2s_pdata {
  49. u16 rx_sd_lines;
  50. u16 tx_sd_lines;
  51. u16 intf_id;
  52. };
  53. struct msm_i2s_data {
  54. u32 capability; /* RX or TX */
  55. u16 sd_lines;
  56. };
  57. struct msm_dai_tdm_group_config {
  58. u16 group_id;
  59. u16 num_ports;
  60. u16 *port_id;
  61. u32 clk_rate;
  62. };
  63. struct msm_dai_tdm_config {
  64. u16 sync_mode;
  65. u16 sync_src;
  66. u16 data_out;
  67. u16 invert_sync;
  68. u16 data_delay;
  69. u32 data_align;
  70. u16 header_start_offset;
  71. u16 header_width;
  72. u16 header_num_frame_repeat;
  73. };
  74. struct msm_dai_tdm_pdata {
  75. struct msm_dai_tdm_group_config group_config;
  76. struct msm_dai_tdm_config config;
  77. };
  78. #endif