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