Linux Audio

Check our new training course

Loading...
 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
 7#ifndef _MESON_AIU_FIFO_H
 8#define _MESON_AIU_FIFO_H
 9
10struct snd_pcm_hardware;
11struct snd_soc_component_driver;
12struct snd_soc_dai_driver;
13struct clk;
14struct snd_pcm_ops;
15struct snd_pcm_substream;
16struct snd_soc_dai;
17struct snd_pcm_hw_params;
18struct platform_device;
19
20struct aiu_fifo {
21	struct snd_pcm_hardware *pcm;
22	unsigned int mem_offset;
23	unsigned int fifo_block;
24	struct clk *pclk;
25	int irq;
26};
27
28int aiu_fifo_dai_probe(struct snd_soc_dai *dai);
29int aiu_fifo_dai_remove(struct snd_soc_dai *dai);
30
31snd_pcm_uframes_t aiu_fifo_pointer(struct snd_soc_component *component,
32				   struct snd_pcm_substream *substream);
33
34int aiu_fifo_trigger(struct snd_pcm_substream *substream, int cmd,
35		     struct snd_soc_dai *dai);
36int aiu_fifo_prepare(struct snd_pcm_substream *substream,
37		     struct snd_soc_dai *dai);
38int aiu_fifo_hw_params(struct snd_pcm_substream *substream,
39		       struct snd_pcm_hw_params *params,
40		       struct snd_soc_dai *dai);
41int aiu_fifo_hw_free(struct snd_pcm_substream *substream,
42		     struct snd_soc_dai *dai);
43int aiu_fifo_startup(struct snd_pcm_substream *substream,
44		     struct snd_soc_dai *dai);
45void aiu_fifo_shutdown(struct snd_pcm_substream *substream,
46		       struct snd_soc_dai *dai);
47int aiu_fifo_pcm_new(struct snd_soc_pcm_runtime *rtd,
48		     struct snd_soc_dai *dai);
49
50#endif /* _MESON_AIU_FIFO_H */