ALSA: atiixp: Fix unlocked snd_pcm_stop() call
[pandora-kernel.git] / sound / pci / atiixp.c
index 537e0a2..6faa173 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
-#include <linux/moduleparam.h>
+#include <linux/module.h>
 #include <linux/mutex.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -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);
 }
 
 /*