diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-04-06 19:47:42 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-04-12 11:34:04 +0200 |
commit | 1576274d30286dd048967176dc8e75e192051ff5 (patch) | |
tree | 5b8304905185ec023106afc4d53c3d77f736cd76 /sound/core/pcm_native.c | |
parent | bbdc1b7dbe41578da7c9a6266cf450abe97e4ca7 (diff) | |
download | linux-1576274d30286dd048967176dc8e75e192051ff5.tar.bz2 |
[ALSA] Fix Oops of PCM OSS emulation
Modules: PCM Midlevel,ALSA<-OSS emulation
Fix Oops of PCM OSS emulation occuring when multiple playback is used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 964e4c47a7f1..0860c5a84502 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -2007,14 +2007,16 @@ static void pcm_release_private(struct snd_pcm_substream *substream) void snd_pcm_release_substream(struct snd_pcm_substream *substream) { snd_pcm_drop(substream); - if (substream->pcm_release) - substream->pcm_release(substream); if (substream->hw_opened) { if (substream->ops->hw_free != NULL) substream->ops->hw_free(substream); substream->ops->close(substream); substream->hw_opened = 0; } + if (substream->pcm_release) { + substream->pcm_release(substream); + substream->pcm_release = NULL; + } snd_pcm_detach_substream(substream); } |