spk.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* Copyright (c) 2012, 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 __SPK_PM8XXX_H__
  13. #define __SPK_PM8XXX_H__
  14. #define PM8XXX_SPK_DEV_NAME "pm8xxx-spk"
  15. /**
  16. * struct pm8xxx_spk_pdata - SPK driver platform data
  17. * @spk_add_enable: variable stating SPK secondary input adding capability
  18. */
  19. struct pm8xxx_spk_platform_data {
  20. bool spk_add_enable;
  21. int cd_ng_threshold;
  22. int cd_nf_preamp_bias;
  23. int cd_ng_hold;
  24. int cd_ng_max_atten;
  25. int noise_mute;
  26. int cd_ng_decay_rate;
  27. int cd_ng_attack_rate;
  28. int cd_delay;
  29. };
  30. /*
  31. * pm8xxx_spk_mute - mute/unmute speaker pamp
  32. *
  33. * @mute: bool value for mute
  34. */
  35. int pm8xxx_spk_mute(bool mute);
  36. /*
  37. * pm8xxx_spk_gain - Set Speaker gain
  38. *
  39. * @gain: Speaker gain
  40. */
  41. int pm8xxx_spk_gain(u8 gain);
  42. /*
  43. * pm8xxx_spk_enable - Enable/Disable Speaker
  44. *
  45. * @enable: bool enable/disable Speaker
  46. */
  47. int pm8xxx_spk_enable(int enable);
  48. #endif /* __SPK_PM8XXX_H__ */