wsa-macro.h 916 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2018, 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_codec *codec, int mode);
  21. extern int wsa_macro_set_spkr_gain_offset(struct snd_soc_codec *codec,
  22. int offset);
  23. #else /* CONFIG_WSA_MACRO */
  24. static inline int wsa_macro_set_spkr_mode(struct snd_soc_codec *codec, int mode)
  25. {
  26. return 0;
  27. }
  28. static inline int wsa_macro_set_spkr_gain_offset(struct snd_soc_codec *codec,
  29. int offset);
  30. {
  31. return 0;
  32. }
  33. #endif /* CONFIG_WSA_MACRO */
  34. #endif