ALSA: pcm : Call kill_fasync() in stream lock
[pandora-kernel.git] / sound / core / pcm_lib.c
index 7f00d34..b36544a 100644 (file)
@@ -1766,10 +1766,10 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
        if (substream->timer_running)
                snd_timer_interrupt(substream->timer, 1);
  _end:
-       snd_pcm_stream_unlock_irqrestore(substream, flags);
        if (runtime->transfer_ack_end)
                runtime->transfer_ack_end(substream);
        kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
+       snd_pcm_stream_unlock_irqrestore(substream, flags);
 }
 
 EXPORT_SYMBOL(snd_pcm_period_elapsed);