mtk-afe-fe-dai.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * mtk-afe-fe-dais.h -- Mediatek afe fe dai operator definition
  4. *
  5. * Copyright (c) 2016 MediaTek Inc.
  6. * Author: Garlic Tseng <[email protected]>
  7. */
  8. #ifndef _MTK_AFE_FE_DAI_H_
  9. #define _MTK_AFE_FE_DAI_H_
  10. struct snd_soc_dai_ops;
  11. struct mtk_base_afe;
  12. struct mtk_base_afe_memif;
  13. int mtk_afe_fe_startup(struct snd_pcm_substream *substream,
  14. struct snd_soc_dai *dai);
  15. void mtk_afe_fe_shutdown(struct snd_pcm_substream *substream,
  16. struct snd_soc_dai *dai);
  17. int mtk_afe_fe_hw_params(struct snd_pcm_substream *substream,
  18. struct snd_pcm_hw_params *params,
  19. struct snd_soc_dai *dai);
  20. int mtk_afe_fe_hw_free(struct snd_pcm_substream *substream,
  21. struct snd_soc_dai *dai);
  22. int mtk_afe_fe_prepare(struct snd_pcm_substream *substream,
  23. struct snd_soc_dai *dai);
  24. int mtk_afe_fe_trigger(struct snd_pcm_substream *substream, int cmd,
  25. struct snd_soc_dai *dai);
  26. extern const struct snd_soc_dai_ops mtk_afe_fe_ops;
  27. int mtk_dynamic_irq_acquire(struct mtk_base_afe *afe);
  28. int mtk_dynamic_irq_release(struct mtk_base_afe *afe, int irq_id);
  29. int mtk_afe_suspend(struct snd_soc_component *component);
  30. int mtk_afe_resume(struct snd_soc_component *component);
  31. int mtk_memif_set_enable(struct mtk_base_afe *afe, int id);
  32. int mtk_memif_set_disable(struct mtk_base_afe *afe, int id);
  33. int mtk_memif_set_addr(struct mtk_base_afe *afe, int id,
  34. unsigned char *dma_area,
  35. dma_addr_t dma_addr,
  36. size_t dma_bytes);
  37. int mtk_memif_set_channel(struct mtk_base_afe *afe,
  38. int id, unsigned int channel);
  39. int mtk_memif_set_rate(struct mtk_base_afe *afe,
  40. int id, unsigned int rate);
  41. int mtk_memif_set_rate_substream(struct snd_pcm_substream *substream,
  42. int id, unsigned int rate);
  43. int mtk_memif_set_format(struct mtk_base_afe *afe,
  44. int id, snd_pcm_format_t format);
  45. int mtk_memif_set_pbuf_size(struct mtk_base_afe *afe,
  46. int id, int pbuf_size);
  47. #endif