aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-07-06 06:27:25 -0400
committerJaroslav Kysela <perex@suse.cz>2007-07-20 05:11:46 -0400
commit1a7fa543cb5d8185d293a03842b33136d8dcc04c (patch)
treed81e9852e5fc50dd9d14c28de767f7629138f3a8 /sound
parent940d244851f8a204b5aedae678d9ab96c20b2fec (diff)
[ALSA] Fix substream to check in PCM drain
The check of a substream in snd_pcm_drain() might not be always correct since runtime can point a different substream (although the PCM state of each linked substream should be same, in theory). This patch fixes it. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index a96733a5beb8..59b29cd482ae 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1487,7 +1487,7 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream)
1487 1487
1488 snd_pcm_stream_lock_irq(substream); 1488 snd_pcm_stream_lock_irq(substream);
1489 /* resume pause */ 1489 /* resume pause */
1490 if (runtime->status->state == SNDRV_PCM_STATE_PAUSED) 1490 if (substream->runtime->status->state == SNDRV_PCM_STATE_PAUSED)
1491 snd_pcm_pause(substream, 0); 1491 snd_pcm_pause(substream, 0);
1492 1492
1493 /* pre-start/stop - all running streams are changed to DRAINING state */ 1493 /* pre-start/stop - all running streams are changed to DRAINING state */