Re: [PATCH v2 11/19] ASoC: fsl_micfil: add multi fifo support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 28, 2022 at 01:27:36PM +0200, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> ---

This also lacks a commit message. Will add:

    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.

Sascha

>  sound/soc/fsl/fsl_micfil.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
> index ffca56d72562d..fe3e1319b35fd 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/platform_data/dma-imx.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;
> -- 
> 2.30.2
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux