atmel-ac97c.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Driver for the Atmel AC97C controller
  3. *
  4. * Copyright (C) 2005-2009 Atmel Corporation
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published
  8. * by the Free Software Foundation.
  9. */
  10. #ifndef __INCLUDE_SOUND_ATMEL_AC97C_H
  11. #define __INCLUDE_SOUND_ATMEL_AC97C_H
  12. #include <linux/dw_dmac.h>
  13. #define AC97C_CAPTURE 0x01
  14. #define AC97C_PLAYBACK 0x02
  15. #define AC97C_BOTH (AC97C_CAPTURE | AC97C_PLAYBACK)
  16. /**
  17. * struct atmel_ac97c_pdata - board specific AC97C configuration
  18. * @rx_dws: DMA slave interface to use for sound capture.
  19. * @tx_dws: DMA slave interface to use for sound playback.
  20. * @reset_pin: GPIO pin wired to the reset input on the external AC97 codec,
  21. * optional to use, set to -ENODEV if not in use. AC97 layer will
  22. * try to do a software reset of the external codec anyway.
  23. * @flags: Flags for which directions should be enabled.
  24. *
  25. * If the user do not want to use a DMA channel for playback or capture, i.e.
  26. * only one feature is required on the board. The slave for playback or capture
  27. * can be set to NULL. The AC97C driver will take use of this when setting up
  28. * the sound streams.
  29. */
  30. struct ac97c_platform_data {
  31. struct dw_dma_slave rx_dws;
  32. struct dw_dma_slave tx_dws;
  33. unsigned int flags;
  34. int reset_pin;
  35. };
  36. #endif /* __INCLUDE_SOUND_ATMEL_AC97C_H */