cs35l35.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/sound/cs35l35.h -- Platform data for CS35l35
  4. *
  5. * Copyright (c) 2016 Cirrus Logic Inc.
  6. */
  7. #ifndef __CS35L35_H
  8. #define __CS35L35_H
  9. struct classh_cfg {
  10. /*
  11. * Class H Algorithm Control Variables
  12. * You can either have it done
  13. * automatically or you can adjust
  14. * these variables for tuning
  15. *
  16. * if you do not enable the internal algorithm
  17. * you will get a set of mixer controls for
  18. * Class H tuning
  19. *
  20. * Section 4.3 of the datasheet
  21. */
  22. bool classh_bst_override;
  23. bool classh_algo_enable;
  24. int classh_bst_max_limit;
  25. int classh_mem_depth;
  26. int classh_release_rate;
  27. int classh_headroom;
  28. int classh_wk_fet_disable;
  29. int classh_wk_fet_delay;
  30. int classh_wk_fet_thld;
  31. int classh_vpch_auto;
  32. int classh_vpch_rate;
  33. int classh_vpch_man;
  34. };
  35. struct monitor_cfg {
  36. /*
  37. * Signal Monitor Data
  38. * highly configurable signal monitoring
  39. * data positioning and different types of
  40. * monitoring data.
  41. *
  42. * Section 4.8.2 - 4.8.4 of the datasheet
  43. */
  44. bool is_present;
  45. bool imon_specs;
  46. bool vmon_specs;
  47. bool vpmon_specs;
  48. bool vbstmon_specs;
  49. bool vpbrstat_specs;
  50. bool zerofill_specs;
  51. u8 imon_dpth;
  52. u8 imon_loc;
  53. u8 imon_frm;
  54. u8 imon_scale;
  55. u8 vmon_dpth;
  56. u8 vmon_loc;
  57. u8 vmon_frm;
  58. u8 vpmon_dpth;
  59. u8 vpmon_loc;
  60. u8 vpmon_frm;
  61. u8 vbstmon_dpth;
  62. u8 vbstmon_loc;
  63. u8 vbstmon_frm;
  64. u8 vpbrstat_dpth;
  65. u8 vpbrstat_loc;
  66. u8 vpbrstat_frm;
  67. u8 zerofill_dpth;
  68. u8 zerofill_loc;
  69. u8 zerofill_frm;
  70. };
  71. struct cs35l35_platform_data {
  72. /* Stereo (2 Device) */
  73. bool stereo;
  74. /* serial port drive strength */
  75. int sp_drv_str;
  76. /* serial port drive in unused slots */
  77. int sp_drv_unused;
  78. /* Boost Power Down with FET */
  79. bool bst_pdn_fet_on;
  80. /* Boost Voltage : used if ClassH Algo Enabled */
  81. int bst_vctl;
  82. /* Boost Converter Peak Current CTRL */
  83. int bst_ipk;
  84. /* Amp Gain Zero Cross */
  85. bool gain_zc;
  86. /* Audio Input Location */
  87. int aud_channel;
  88. /* Advisory Input Location */
  89. int adv_channel;
  90. /* Shared Boost for stereo */
  91. bool shared_bst;
  92. /* Specifies this amp is using an external boost supply */
  93. bool ext_bst;
  94. /* Inductor Value */
  95. int boost_ind;
  96. /* ClassH Algorithm */
  97. struct classh_cfg classh_algo;
  98. /* Monitor Config */
  99. struct monitor_cfg mon_cfg;
  100. };
  101. #endif /* __CS35L35_H */