diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-14 18:22:40 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-19 12:06:21 +0100 |
commit | 2495ba26e838176c3b572b2b1592d75b4b963692 (patch) | |
tree | bba58991ee8d4a7bb761fe92eb193a70bbde3d84 /sound/soc/fsl/fsl_micfil.c | |
parent | 824a0a02cd74776461aaa30d792b1ed9111c9aa5 (diff) |
ASoC: fsl_micfil: add multi fifo support
The micfil hardware provides the microphone data on multiple successive
FIFO registers, one register per stereo pair. Also to work properly the
SDMA_DONE0_CONFIG_DONE_SEL bit in the SDMA engines SDMA_DONE0_CONFIG
register must be set. This patch provides the necessary information to
the SDMA engine driver.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20220414162249.3934543-13-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_micfil.c')
-rw-r--r-- | sound/soc/fsl/fsl_micfil.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index 4656a18a03e4..56df916ad55f 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -16,6 +16,7 @@ #include <linux/regmap.h> #include <linux/sysfs.h> #include <linux/types.h> +#include <linux/dma/imx-dma.h> #include <sound/dmaengine_pcm.h> #include <sound/pcm.h> #include <sound/soc.h> @@ -35,6 +36,7 @@ struct fsl_micfil { struct clk *busclk; struct clk *mclk; struct snd_dmaengine_dai_dma_data dma_params_rx; + struct sdma_peripheral_config sdmacfg; unsigned int dataline; char name[32]; int irq[MICFIL_IRQ_LINES]; @@ -324,6 +326,10 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream, return ret; } + micfil->dma_params_rx.peripheral_config = &micfil->sdmacfg; + micfil->dma_params_rx.peripheral_size = sizeof(micfil->sdmacfg); + micfil->sdmacfg.n_fifos_src = channels; + micfil->sdmacfg.sw_done = true; micfil->dma_params_rx.maxburst = channels * MICFIL_DMA_MAXBURST_RX; return 0; |