lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aXuVXruPir7hasdd@lizhi-Precision-Tower-5810>
Date: Thu, 29 Jan 2026 12:14:06 -0500
From: Frank Li <Frank.li@....com>
To: Shengjiu Wang <shengjiu.wang@....com>
Cc: lgirdwood@...il.com, broonie@...nel.org, robh@...nel.org,
	krzk+dt@...nel.org, conor+dt@...nel.org, shawnguo@...nel.org,
	s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
	linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
	imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org, shengjiu.wang@...il.com,
	Xiubo.Lee@...il.com, nicoleotsuka@...il.com, perex@...ex.cz,
	tiwai@...e.com, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 2/3] ASoC: fsl_asrc: Add support for i.MX952 platform

On Wed, Jan 28, 2026 at 03:18:52PM +0800, Shengjiu Wang wrote:
> Add a compatible string and clock mapping table to support ASRC on the
> i.MX952 platform.
>
> There is a limitation on i.MX952 that dma request is not cleared at the
> end of conversion with dma slave mode. Which causes sample is dropped
> from the input fifo on the second time if dma is triggered before the
> client device and EDMA may copy wrong data from output fifo as the output
> fifo is not ready in the beginning.
>
> So need to trigger asrc before dma on i.MX952, and add delay to wait
> output data is generated then start the EDMA for output, otherwise the
> m2m function has noise issues.
>
> Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> ---
>  sound/soc/fsl/fsl_asrc.c        | 39 +++++++++++++++++++++++++++++++++
>  sound/soc/fsl/fsl_asrc.h        | 16 ++++++++++++++
>  sound/soc/fsl/fsl_asrc_common.h |  3 +++
>  sound/soc/fsl/fsl_asrc_m2m.c    | 29 +++++++++++++++++-------
>  4 files changed, 79 insertions(+), 8 deletions(-)
>
...
> diff --git a/sound/soc/fsl/fsl_asrc_m2m.c b/sound/soc/fsl/fsl_asrc_m2m.c
> index f46881f71e43..296e13a16490 100644
> --- a/sound/soc/fsl/fsl_asrc_m2m.c
> +++ b/sound/soc/fsl/fsl_asrc_m2m.c
> @@ -253,15 +253,28 @@ static int asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task
>  	reinit_completion(&pair->complete[IN]);
>  	reinit_completion(&pair->complete[OUT]);
>
> -	/* Submit DMA request */
> -	dmaengine_submit(pair->desc[IN]);
> -	dma_async_issue_pending(pair->desc[IN]->chan);
> -	if (out_dma_len > 0) {
> -		dmaengine_submit(pair->desc[OUT]);
> -		dma_async_issue_pending(pair->desc[OUT]->chan);
> -	}
> +	if (asrc->start_before_dma) {
> +		asrc->m2m_start(pair);

Does other Soc also work if ASRC start before DMA enable? Suppose most like
work. Then needn't start_before_dma.

Frank

> +		/* Submit DMA request */
> +		dmaengine_submit(pair->desc[IN]);
> +		dma_async_issue_pending(pair->desc[IN]->chan);
> +		if (out_dma_len > 0) {
> +			if (asrc->m2m_output_ready)
> +				asrc->m2m_output_ready(pair);
> +			dmaengine_submit(pair->desc[OUT]);
> +			dma_async_issue_pending(pair->desc[OUT]->chan);
> +		}
> +	} else {
> +		/* Submit DMA request */
> +		dmaengine_submit(pair->desc[IN]);
> +		dma_async_issue_pending(pair->desc[IN]->chan);
> +		if (out_dma_len > 0) {
> +			dmaengine_submit(pair->desc[OUT]);
> +			dma_async_issue_pending(pair->desc[OUT]->chan);
> +		}
>
> -	asrc->m2m_start(pair);
> +		asrc->m2m_start(pair);
> +	}
>
>  	if (!wait_for_completion_interruptible_timeout(&pair->complete[IN], 10 * HZ)) {
>  		dev_err(dev, "out DMA task timeout\n");
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ