aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-11 17:56:56 +0200
committerBen Hutchings <ben@decadent.org.uk>2013-08-02 22:14:56 +0200
commit53fcffc423f4f56269533c2b82f96295019a6f58 (patch)
treef3fca685f6bc3b1e06e0b6c1eb75a057853df82d /sound/pci
parentc0a05a14a4e78eba5f3ce15e227d9e805d43909f (diff)
downloadkernel_samsung_smdk4412-53fcffc423f4f56269533c2b82f96295019a6f58.zip
kernel_samsung_smdk4412-53fcffc423f4f56269533c2b82f96295019a6f58.tar.gz
kernel_samsung_smdk4412-53fcffc423f4f56269533c2b82f96295019a6f58.tar.bz2
ALSA: atiixp: Fix unlocked snd_pcm_stop() call
commit cc7282b8d5abbd48c81d1465925d464d9e3eaa8f upstream. snd_pcm_stop() must be called in the PCM substream lock context. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/atiixp.c2
-rw-r--r--sound/pci/atiixp_modem.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 15e4e5e..6faa173 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -688,7 +688,9 @@ static void snd_atiixp_xrun_dma(struct atiixp *chip, struct atiixp_dma *dma)
if (! dma->substream || ! dma->running)
return;
snd_printdd("atiixp: XRUN detected (DMA %d)\n", dma->ops->type);
+ snd_pcm_stream_lock(dma->substream);
snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN);
+ snd_pcm_stream_unlock(dma->substream);
}
/*
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 57bf8f4..d752120 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -638,7 +638,9 @@ static void snd_atiixp_xrun_dma(struct atiixp_modem *chip,
if (! dma->substream || ! dma->running)
return;
snd_printdd("atiixp-modem: XRUN detected (DMA %d)\n", dma->ops->type);
+ snd_pcm_stream_lock(dma->substream);
snd_pcm_stop(dma->substream, SNDRV_PCM_STATE_XRUN);
+ snd_pcm_stream_unlock(dma->substream);
}
/*