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