Commit 77a7a6e9 authored by Chancel Liu's avatar Chancel Liu Committed by Mark Brown

ASoC: fsl_micfil: Add support when using eDMA

On i.MX93 platform MICFIL uses eDMA. The maxburst should be set to the
number of channels in eDMA multiple FIFO mode.
Signed-off-by: default avatarChancel Liu <chancel.liu@nxp.com>
Acked-by: default avatarShengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20221028082750.991822-4-chancel.liu@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a10a5254
...@@ -63,6 +63,7 @@ struct fsl_micfil_soc_data { ...@@ -63,6 +63,7 @@ struct fsl_micfil_soc_data {
unsigned int fifo_depth; unsigned int fifo_depth;
unsigned int dataline; unsigned int dataline;
bool imx; bool imx;
bool use_edma;
u64 formats; u64 formats;
}; };
...@@ -88,6 +89,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx93 = { ...@@ -88,6 +89,7 @@ static struct fsl_micfil_soc_data fsl_micfil_imx93 = {
.fifo_depth = 32, .fifo_depth = 32,
.dataline = 0xf, .dataline = 0xf,
.formats = SNDRV_PCM_FMTBIT_S32_LE, .formats = SNDRV_PCM_FMTBIT_S32_LE,
.use_edma = true,
}; };
static const struct of_device_id fsl_micfil_dt_ids[] = { static const struct of_device_id fsl_micfil_dt_ids[] = {
...@@ -690,6 +692,8 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream, ...@@ -690,6 +692,8 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream,
micfil->sdmacfg.n_fifos_src = channels; micfil->sdmacfg.n_fifos_src = channels;
micfil->sdmacfg.sw_done = true; micfil->sdmacfg.sw_done = true;
micfil->dma_params_rx.maxburst = channels * MICFIL_DMA_MAXBURST_RX; micfil->dma_params_rx.maxburst = channels * MICFIL_DMA_MAXBURST_RX;
if (micfil->soc->use_edma)
micfil->dma_params_rx.maxburst = channels;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment