ab8500-codec.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) ST-Ericsson SA 2012
  3. *
  4. * Author: Ola Lilja <ola.o.lilja@stericsson.com>
  5. * for ST-Ericsson.
  6. *
  7. * License terms:
  8. *
  9. * This program is free software; you can redistribute it and/or modify it
  10. * under the terms of the GNU General Public License version 2 as published
  11. * by the Free Software Foundation.
  12. */
  13. #ifndef AB8500_CORE_CODEC_H
  14. #define AB8500_CORE_CODEC_H
  15. /* Mic-types */
  16. enum amic_type {
  17. AMIC_TYPE_SINGLE_ENDED,
  18. AMIC_TYPE_DIFFERENTIAL
  19. };
  20. /* Mic-biases */
  21. enum amic_micbias {
  22. AMIC_MICBIAS_VAMIC1,
  23. AMIC_MICBIAS_VAMIC2,
  24. AMIC_MICBIAS_UNKNOWN
  25. };
  26. /* Bias-voltage */
  27. enum ear_cm_voltage {
  28. EAR_CMV_0_95V,
  29. EAR_CMV_1_10V,
  30. EAR_CMV_1_27V,
  31. EAR_CMV_1_58V,
  32. EAR_CMV_UNKNOWN
  33. };
  34. /* Analog microphone settings */
  35. struct amic_settings {
  36. enum amic_type mic1_type;
  37. enum amic_type mic2_type;
  38. enum amic_micbias mic1a_micbias;
  39. enum amic_micbias mic1b_micbias;
  40. enum amic_micbias mic2_micbias;
  41. };
  42. /* Platform data structure for the audio-parts of the AB8500 */
  43. struct ab8500_codec_platform_data {
  44. struct amic_settings amics;
  45. enum ear_cm_voltage ear_cmv;
  46. };
  47. #endif