max9877.h 1014 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * max9877.h -- amp driver for max9877
  3. *
  4. * Copyright (C) 2009 Samsung Electronics Co.Ltd
  5. * Author: Joonyoung Shim <jy0922.shim@samsung.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the
  9. * Free Software Foundation; either version 2 of the License, or (at your
  10. * option) any later version.
  11. *
  12. */
  13. #ifndef _MAX9877_H
  14. #define _MAX9877_H
  15. #define MAX9877_INPUT_MODE 0x00
  16. #define MAX9877_SPK_VOLUME 0x01
  17. #define MAX9877_HPL_VOLUME 0x02
  18. #define MAX9877_HPR_VOLUME 0x03
  19. #define MAX9877_OUTPUT_MODE 0x04
  20. /* MAX9877_INPUT_MODE */
  21. #define MAX9877_INB (1 << 4)
  22. #define MAX9877_INA (1 << 5)
  23. #define MAX9877_ZCD (1 << 6)
  24. /* MAX9877_OUTPUT_MODE */
  25. #define MAX9877_OUTMODE_MASK (15 << 0)
  26. #define MAX9877_OSC_MASK (3 << 4)
  27. #define MAX9877_OSC_OFFSET 4
  28. #define MAX9877_BYPASS (1 << 6)
  29. #define MAX9877_SHDN (1 << 7)
  30. extern int max9877_add_controls(struct snd_soc_codec *codec);
  31. #endif