aiu-fifo.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
  2. /*
  3. * Copyright (c) 2020 BayLibre, SAS.
  4. * Author: Jerome Brunet <jbrunet@baylibre.com>
  5. */
  6. #ifndef _MESON_AIU_FIFO_H
  7. #define _MESON_AIU_FIFO_H
  8. struct snd_pcm_hardware;
  9. struct snd_soc_component_driver;
  10. struct snd_soc_dai_driver;
  11. struct clk;
  12. struct snd_pcm_ops;
  13. struct snd_pcm_substream;
  14. struct snd_soc_dai;
  15. struct snd_pcm_hw_params;
  16. struct platform_device;
  17. struct aiu_fifo {
  18. struct snd_pcm_hardware *pcm;
  19. unsigned int mem_offset;
  20. unsigned int fifo_block;
  21. struct clk *pclk;
  22. int irq;
  23. };
  24. int aiu_fifo_dai_probe(struct snd_soc_dai *dai);
  25. int aiu_fifo_dai_remove(struct snd_soc_dai *dai);
  26. snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
  27. struct snd_pcm_substream *substream);
  28. int aiu_fifo_trigger(struct snd_pcm_substream *substream, int cmd,
  29. struct snd_soc_dai *dai);
  30. int aiu_fifo_prepare(struct snd_pcm_substream *substream,
  31. struct snd_soc_dai *dai);
  32. int aiu_fifo_hw_params(struct snd_pcm_substream *substream,
  33. struct snd_pcm_hw_params *params,
  34. struct snd_soc_dai *dai);
  35. int aiu_fifo_hw_free(struct snd_pcm_substream *substream,
  36. struct snd_soc_dai *dai);
  37. int aiu_fifo_startup(struct snd_pcm_substream *substream,
  38. struct snd_soc_dai *dai);
  39. void aiu_fifo_shutdown(struct snd_pcm_substream *substream,
  40. struct snd_soc_dai *dai);
  41. int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
  42. struct snd_soc_dai *dai);
  43. #endif /* _MESON_AIU_FIFO_H */