Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: fsl_asrc_dma: Use dmaengine_terminate_async()

dmaengine_terminate_all() is deprecated and should no longer be used.
Use dmaengine_terminate_async() instead. This involves no functional change
since both functions do the same.
After dmaengine_terminate_async() dmaengine_synchronize() must be called
to make sure the channel has really stopped before the underlying memory
is freed. This is done implicitly by dma_release_channel() called from
the .hw_free hook.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220617120133.4011846-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Sascha Hauer and committed by
Mark Brown
289a3ec0 87a36978

+2 -2
+2 -2
sound/soc/fsl/fsl_asrc_dma.c
··· 114 114 case SNDRV_PCM_TRIGGER_STOP: 115 115 case SNDRV_PCM_TRIGGER_SUSPEND: 116 116 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 117 - dmaengine_terminate_all(pair->dma_chan[OUT]); 118 - dmaengine_terminate_all(pair->dma_chan[IN]); 117 + dmaengine_terminate_async(pair->dma_chan[OUT]); 118 + dmaengine_terminate_async(pair->dma_chan[IN]); 119 119 break; 120 120 default: 121 121 return -EINVAL;