summaryrefslogtreecommitdiff
path: root/sound/core/pcm_dmaengine.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-06-12 18:26:15 +0100
committerMark Brown <broonie@kernel.org>2024-06-12 18:26:15 +0100
commit37a2c94c68ce543bc7e2105d5ab178b03bafc797 (patch)
treed143ccae41078b05079efdb52f1d90088aad4e51 /sound/core/pcm_dmaengine.c
parent524d3f126362b6033e92cbe107ae2158d7fbff94 (diff)
parentc5dcf8ab10606e76c1d8a0ec77f27d84a392e874 (diff)
Fixes for McASP and dmaengine_pcm
Merge series from Jai Luthra <j-luthra@ti.com>: This series fixes two patches: 1. Fix the dmaengine API usage by calling dmaengine_synchronize() after dmaengine_terminate_async() when xrun events occur in application 2. Use the McASP AFIFO property from DT to refine the period size, instead of hardcoding minimum to 64 samples
Diffstat (limited to 'sound/core/pcm_dmaengine.c')
-rw-r--r--sound/core/pcm_dmaengine.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index 12aa1cef11a1..ed07fa5693d2 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -349,6 +349,16 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
+int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream)
+{
+ struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
+
+ dmaengine_synchronize(prtd->dma_chan);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);
+
/**
* snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
* @substream: PCM substream