Update of /cvsroot/alsa/alsa-kernel/core/oss
In directory sc8-pr-cvs1:/tmp/cvs-serv3448

Modified Files:
        pcm_oss.c 
Log Message:
Fixed open for O_RDWR when capture is not available

Index: pcm_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/oss/pcm_oss.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- pcm_oss.c   24 Jul 2003 21:02:45 -0000      1.45
+++ pcm_oss.c   16 Aug 2003 09:54:09 -0000      1.46
@@ -1614,8 +1614,12 @@
        if ((f_mode & FMODE_READ) && !(csetup && csetup->disable)) {
                if ((err = snd_pcm_open_substream(pcm, SNDRV_PCM_STREAM_CAPTURE, 
                                               &csubstream)) < 0) {
-                       snd_pcm_oss_release_file(pcm_oss_file);
-                       return err;
+                       if (!(f_mode & FMODE_WRITE) || err != -ENODEV) {
+                               snd_pcm_oss_release_file(pcm_oss_file);
+                               return err;
+                       } else {
+                               csubstream = NULL;
+                       }
                }
                pcm_oss_file->streams[SNDRV_PCM_STREAM_CAPTURE] = csubstream;
        }



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to