wsa-macro.h 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  3. */
  4. #ifndef WSA_MACRO_H
  5. #define WSA_MACRO_H
  6. /*
  7. * Selects compander and smart boost settings
  8. * for a given speaker mode
  9. */
  10. enum {
  11. WSA_MACRO_SPKR_MODE_DEFAULT,
  12. WSA_MACRO_SPKR_MODE_1, /* COMP Gain = 12dB, Smartboost Max = 5.5V */
  13. };
  14. /* Rx path gain offsets */
  15. enum {
  16. WSA_MACRO_GAIN_OFFSET_M1P5_DB,
  17. WSA_MACRO_GAIN_OFFSET_0_DB,
  18. };
  19. #if IS_ENABLED(CONFIG_WSA_MACRO)
  20. extern int wsa_macro_set_spkr_mode(struct snd_soc_component *component,
  21. int mode);
  22. extern int wsa_macro_set_spkr_gain_offset(struct snd_soc_component *component,
  23. int offset);
  24. #else /* CONFIG_WSA_MACRO */
  25. static inline int wsa_macro_set_spkr_mode(struct snd_soc_component *component,
  26. int mode)
  27. {
  28. return 0;
  29. }
  30. static inline int wsa_macro_set_spkr_gain_offset(
  31. struct snd_soc_component *component,
  32. int offset)
  33. {
  34. return 0;
  35. }
  36. #endif /* CONFIG_WSA_MACRO */
  37. #endif