summaryrefslogtreecommitdiffstats
path: root/sound/core/oss
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-04-06 19:47:42 +0200
committerJaroslav Kysela <perex@suse.cz>2006-04-12 11:34:04 +0200
commit1576274d30286dd048967176dc8e75e192051ff5 (patch)
tree5b8304905185ec023106afc4d53c3d77f736cd76 /sound/core/oss
parentbbdc1b7dbe41578da7c9a6266cf450abe97e4ca7 (diff)
downloadop-kernel-dev-1576274d30286dd048967176dc8e75e192051ff5.zip
op-kernel-dev-1576274d30286dd048967176dc8e75e192051ff5.tar.gz
[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/oss')
-rw-r--r--sound/core/oss/pcm_oss.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 7c0c4e1..c5978d6 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1682,7 +1682,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream,
substream->oss.setup = *setup;
if (setup->nonblock)
substream->ffile->f_flags |= O_NONBLOCK;
- else
+ else if (setup->block)
substream->ffile->f_flags &= ~O_NONBLOCK;
runtime = substream->runtime;
runtime->oss.params = 1;
@@ -1757,6 +1757,7 @@ static int snd_pcm_oss_open_file(struct file *file,
}
pcm_oss_file->streams[idx] = substream;
+ substream->file = pcm_oss_file;
snd_pcm_oss_init_substream(substream, &setup[idx], minor);
}
@@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
err = -EFAULT;
goto __error;
}
- memset(setup, 0, sizeof(*setup));
+ memset(setup, 0, sizeof(setup));
if (file->f_mode & FMODE_WRITE)
snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK,
task_name, &setup[0]);
OpenPOWER on IntegriCloud