diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-18 04:54:00 -0400 |
commit | 4741c336d27dec3ea68a35659abb8dc82b142388 (patch) | |
tree | a8576df82129354b77b0144c480c446ec7aba7b2 /sound/core/oss/pcm_oss.c | |
parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
parent | a9a5cd5d2a57fb76dbae2115450f777b69beccf7 (diff) |
Merge branch 'master'
Diffstat (limited to 'sound/core/oss/pcm_oss.c')
-rw-r--r-- | sound/core/oss/pcm_oss.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 91114c7aeff5..c5978d6c6080 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, | |||
1682 | substream->oss.setup = *setup; | 1682 | substream->oss.setup = *setup; |
1683 | if (setup->nonblock) | 1683 | if (setup->nonblock) |
1684 | substream->ffile->f_flags |= O_NONBLOCK; | 1684 | substream->ffile->f_flags |= O_NONBLOCK; |
1685 | else | 1685 | else if (setup->block) |
1686 | substream->ffile->f_flags &= ~O_NONBLOCK; | 1686 | substream->ffile->f_flags &= ~O_NONBLOCK; |
1687 | runtime = substream->runtime; | 1687 | runtime = substream->runtime; |
1688 | runtime->oss.params = 1; | 1688 | runtime->oss.params = 1; |
@@ -1757,10 +1757,11 @@ static int snd_pcm_oss_open_file(struct file *file, | |||
1757 | } | 1757 | } |
1758 | 1758 | ||
1759 | pcm_oss_file->streams[idx] = substream; | 1759 | pcm_oss_file->streams[idx] = substream; |
1760 | substream->file = pcm_oss_file; | ||
1760 | snd_pcm_oss_init_substream(substream, &setup[idx], minor); | 1761 | snd_pcm_oss_init_substream(substream, &setup[idx], minor); |
1761 | } | 1762 | } |
1762 | 1763 | ||
1763 | if (! pcm_oss_file->streams[0] && pcm_oss_file->streams[1]) { | 1764 | if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) { |
1764 | snd_pcm_oss_release_file(pcm_oss_file); | 1765 | snd_pcm_oss_release_file(pcm_oss_file); |
1765 | return -EINVAL; | 1766 | return -EINVAL; |
1766 | } | 1767 | } |
@@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file) | |||
1809 | err = -EFAULT; | 1810 | err = -EFAULT; |
1810 | goto __error; | 1811 | goto __error; |
1811 | } | 1812 | } |
1812 | memset(setup, 0, sizeof(*setup)); | 1813 | memset(setup, 0, sizeof(setup)); |
1813 | if (file->f_mode & FMODE_WRITE) | 1814 | if (file->f_mode & FMODE_WRITE) |
1814 | snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, | 1815 | snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK, |
1815 | task_name, &setup[0]); | 1816 | task_name, &setup[0]); |