wm8994.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * wm8994.h -- WM8994 Soc Audio driver
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #ifndef _WM8994_H
  9. #define _WM8994_H
  10. #include <sound/soc.h>
  11. /* Sources for AIF1/2 SYSCLK - use with set_dai_sysclk() */
  12. #define WM8994_SYSCLK_MCLK1 1
  13. #define WM8994_SYSCLK_MCLK2 2
  14. #define WM8994_SYSCLK_FLL1 3
  15. #define WM8994_SYSCLK_FLL2 4
  16. /* OPCLK is also configured with set_dai_sysclk, specify division*10 as rate. */
  17. #define WM8994_SYSCLK_OPCLK 5
  18. #define WM8994_FLL1 1
  19. #define WM8994_FLL2 2
  20. #define WM8994_FLL_SRC_MCLK1 1
  21. #define WM8994_FLL_SRC_MCLK2 2
  22. #define WM8994_FLL_SRC_LRCLK 3
  23. #define WM8994_FLL_SRC_BCLK 4
  24. typedef void (*wm8958_micdet_cb)(u16 status, void *data);
  25. int wm8994_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
  26. int micbias, int det, int shrt);
  27. int wm8958_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack,
  28. wm8958_micdet_cb cb, void *cb_data);
  29. #define WM8994_CACHE_SIZE 1570
  30. struct wm8994_access_mask {
  31. unsigned short readable; /* Mask of readable bits */
  32. unsigned short writable; /* Mask of writable bits */
  33. };
  34. extern const struct wm8994_access_mask wm8994_access_masks[WM8994_CACHE_SIZE];
  35. extern const u16 wm8994_reg_defaults[WM8994_CACHE_SIZE];
  36. #endif