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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2181f8c0a9
commit
a2f4638207
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user