[pulseaudio-commits] r1549 - /branches/lennart/src/modules/module-oss.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Jul 26 12:55:52 PDT 2007


Author: lennart
Date: Thu Jul 26 21:55:51 2007
New Revision: 1549

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1549&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Disable memory mapping if we open the device in O_WRONLY. Unfortunately we =
cannot do mmap() in Linux without opening the device for reading as well.

Modified:
    branches/lennart/src/modules/module-oss.c

Modified: branches/lennart/src/modules/module-oss.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/mo=
dule-oss.c?rev=3D1549&root=3Dpulseaudio&r1=3D1548&r2=3D1549&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/lennart/src/modules/module-oss.c (original)
+++ branches/lennart/src/modules/module-oss.c Thu Jul 26 21:55:51 2007
@@ -1078,10 +1078,15 @@
         goto fail;
 =

     if (use_mmap && (!(caps & DSP_CAP_MMAP) || !(caps & DSP_CAP_TRIGGER)))=
 {
-        pa_log("OSS device not mmap capable, falling back to UNIX read/wri=
te mode");
+        pa_log_info("OSS device not mmap capable, falling back to UNIX rea=
d/write mode.");
         use_mmap =3D 0;
     }
     =

+    if (use_mmap && mode =3D=3D O_WRONLY) {
+        pa_log_info("Device opened for write only, cannot do memory mappin=
g, falling back to UNIX read/write mode.");
+        use_mmap =3D 0;
+    }
+
     if (pa_oss_get_hw_description(p, hwdesc, sizeof(hwdesc)) >=3D 0)
         pa_log_info("Hardware name is '%s'.", hwdesc);
     else




More information about the pulseaudio-commits mailing list