diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-08-04 20:37:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-06 20:52:16 -0700 |
commit | a2f4638207875fb0a164cd39f16174ef794a1906 (patch) | |
tree | a9a3e1ba188a7b0fffb7e849847f157923ff7caf | |
parent | 2181f8c0a96a7b0e29151330c2fae6e18831ed3a (diff) |
ALSA: Don't reject O_RDWR at opening PCM OSS
Accept O_RDWR at opening a PCM OSS device that is read- or write-only,
just for the compatibility with the behavior of older versions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | sound/core/oss/pcm_oss.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index ac990bf0b48f..785a2acd9adf 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -1745,6 +1745,8 @@ static int snd_pcm_oss_open_file(struct file *file, for (idx = 0; idx < 2; idx++) { if (setup[idx].disable) continue; + if (! pcm->streams[idx].substream_count) + continue; /* no matching substream */ if (idx == SNDRV_PCM_STREAM_PLAYBACK) { if (! (f_mode & FMODE_WRITE)) continue; |