wcd-mbhc-adc.h 953 B

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (c) 2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __WCD_MBHC_ADC_H__
  13. #define __WCD_MBHC_ADC_H__
  14. #include "wcd-mbhc-v2.h"
  15. enum wcd_mbhc_adc_mux_ctl {
  16. MUX_CTL_AUTO = 0,
  17. MUX_CTL_IN2P,
  18. MUX_CTL_IN3P,
  19. MUX_CTL_IN4P,
  20. MUX_CTL_HPH_L,
  21. MUX_CTL_HPH_R,
  22. MUX_CTL_NONE,
  23. };
  24. #if IS_ENABLED(CONFIG_SND_SOC_WCD_MBHC_ADC)
  25. void wcd_mbhc_adc_init(struct wcd_mbhc *mbhc);
  26. #else
  27. static inline void wcd_mbhc_adc_init(struct wcd_mbhc *mbhc)
  28. {
  29. }
  30. #endif
  31. #endif /* __WCD_MBHC_ADC_H__ */