msm-dai-q6-v2.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2012-2017, 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. struct msm_dai_auxpcm_config {
  33. u16 mode;
  34. u16 sync;
  35. u16 frame;
  36. u16 quant;
  37. u16 num_slots;
  38. u16 *slot_mapping;
  39. u16 data;
  40. u32 pcm_clk_rate;
  41. };
  42. struct msm_dai_auxpcm_pdata {
  43. struct msm_dai_auxpcm_config mode_8k;
  44. struct msm_dai_auxpcm_config mode_16k;
  45. };
  46. struct msm_mi2s_pdata {
  47. u16 rx_sd_lines;
  48. u16 tx_sd_lines;
  49. u16 intf_id;
  50. };
  51. struct msm_i2s_data {
  52. u32 capability; /* RX or TX */
  53. u16 sd_lines;
  54. };
  55. struct msm_dai_tdm_group_config {
  56. u16 group_id;
  57. u16 num_ports;
  58. u16 *port_id;
  59. u32 clk_rate;
  60. };
  61. struct msm_dai_tdm_config {
  62. u16 sync_mode;
  63. u16 sync_src;
  64. u16 data_out;
  65. u16 invert_sync;
  66. u16 data_delay;
  67. u32 data_align;
  68. u16 header_start_offset;
  69. u16 header_width;
  70. u16 header_num_frame_repeat;
  71. };
  72. struct msm_dai_tdm_pdata {
  73. struct msm_dai_tdm_group_config group_config;
  74. struct msm_dai_tdm_config config;
  75. };
  76. #endif