summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-06-03 08:14:47 +0200
committerTakashi Iwai <tiwai@suse.de>2014-06-03 08:15:18 +0200
commitefd4b76ef789541e7046e873b3546209352cdb59 (patch)
tree00651414599c34c265ce48072bee23816430f795 /sound/core
parentALSA: firewire-lib: Remove a comment about restriction of asynchronous operation (diff)
parentALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup (diff)
downloadlinux-efd4b76ef789541e7046e873b3546209352cdb59.tar.xz
linux-efd4b76ef789541e7046e873b3546209352cdb59.zip
Merge branch 'for-linus' into for-next
Just to catch up a few small fixes for HD-audio and DMA engine.
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_dmaengine.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c
index 94d08733cb38..76cbb9ec953a 100644
--- a/sound/core/pcm_dmaengine.c
+++ b/sound/core/pcm_dmaengine.c
@@ -182,6 +182,7 @@ static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
+ struct snd_pcm_runtime *runtime = substream->runtime;
int ret;
switch (cmd) {
@@ -196,6 +197,11 @@ int snd_dmaengine_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
dmaengine_resume(prtd->dma_chan);
break;
case SNDRV_PCM_TRIGGER_SUSPEND:
+ if (runtime->info & SNDRV_PCM_INFO_PAUSE)
+ dmaengine_pause(prtd->dma_chan);
+ else
+ dmaengine_terminate_all(prtd->dma_chan);
+ break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
dmaengine_pause(prtd->dma_chan);
break;