asoc-s3c.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2009 Samsung Electronics Co. Ltd
  4. * Author: Jaswinder Singh <[email protected]>
  5. */
  6. /* The machine init code calls s3c*_ac97_setup_gpio with
  7. * one of these defines in order to select appropriate bank
  8. * of GPIO for AC97 pins
  9. */
  10. #define S3C64XX_AC97_GPD 0
  11. #define S3C64XX_AC97_GPE 1
  12. #include <linux/dmaengine.h>
  13. extern void s3c64xx_ac97_setup_gpio(int);
  14. struct samsung_i2s_type {
  15. /* If the Primary DAI has 5.1 Channels */
  16. #define QUIRK_PRI_6CHAN (1 << 0)
  17. /* If the I2S block has a Stereo Overlay Channel */
  18. #define QUIRK_SEC_DAI (1 << 1)
  19. /*
  20. * If the I2S block has no internal prescalar or MUX (I2SMOD[10] bit)
  21. * The Machine driver must provide suitably set clock to the I2S block.
  22. */
  23. #define QUIRK_NO_MUXPSR (1 << 2)
  24. #define QUIRK_NEED_RSTCLR (1 << 3)
  25. #define QUIRK_SUPPORTS_TDM (1 << 4)
  26. #define QUIRK_SUPPORTS_IDMA (1 << 5)
  27. /* Quirks of the I2S controller */
  28. u32 quirks;
  29. dma_addr_t idma_addr;
  30. };
  31. /**
  32. * struct s3c_audio_pdata - common platform data for audio device drivers
  33. * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
  34. */
  35. struct s3c_audio_pdata {
  36. int (*cfg_gpio)(struct platform_device *);
  37. dma_filter_fn dma_filter;
  38. void *dma_playback;
  39. void *dma_capture;
  40. void *dma_play_sec;
  41. void *dma_capture_mic;
  42. struct samsung_i2s_type type;
  43. };