1 /* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
3 * Copyright (c) 2020 BayLibre, SAS.
4 * Author: Jerome Brunet <jbrunet@baylibre.com>
7 #ifndef _MESON_AIU_FIFO_H
8 #define _MESON_AIU_FIFO_H
10 struct snd_pcm_hardware
;
11 struct snd_soc_component_driver
;
12 struct snd_soc_dai_driver
;
15 struct snd_pcm_substream
;
17 struct snd_pcm_hw_params
;
18 struct platform_device
;
21 struct snd_pcm_hardware
*pcm
;
22 unsigned int mem_offset
;
23 unsigned int fifo_block
;
28 int aiu_fifo_dai_probe(struct snd_soc_dai
*dai
);
29 int aiu_fifo_dai_remove(struct snd_soc_dai
*dai
);
31 snd_pcm_uframes_t
aiu_fifo_pointer(struct snd_soc_component
*component
,
32 struct snd_pcm_substream
*substream
);
34 int aiu_fifo_trigger(struct snd_pcm_substream
*substream
, int cmd
,
35 struct snd_soc_dai
*dai
);
36 int aiu_fifo_prepare(struct snd_pcm_substream
*substream
,
37 struct snd_soc_dai
*dai
);
38 int aiu_fifo_hw_params(struct snd_pcm_substream
*substream
,
39 struct snd_pcm_hw_params
*params
,
40 struct snd_soc_dai
*dai
);
41 int aiu_fifo_hw_free(struct snd_pcm_substream
*substream
,
42 struct snd_soc_dai
*dai
);
43 int aiu_fifo_startup(struct snd_pcm_substream
*substream
,
44 struct snd_soc_dai
*dai
);
45 void aiu_fifo_shutdown(struct snd_pcm_substream
*substream
,
46 struct snd_soc_dai
*dai
);
47 int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime
*rtd
,
48 struct snd_soc_dai
*dai
);
50 #endif /* _MESON_AIU_FIFO_H */