1
0
Fork 0

[ALSA] Don't reject O_RDWR at opening PCM OSS with read/write-only device

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: Jaroslav Kysela <perex@suse.cz>
hifive-unleashed-5.1
Takashi Iwai 2006-08-02 21:12:09 +02:00 committed by Jaroslav Kysela
parent 264f9577a5
commit 6cb53e7ed7
1 changed files with 2 additions and 0 deletions

View File

@ -2228,6 +2228,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;