tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fix for high CPU usage of audio/pulseaudio



ryoon@ wrote:

> The patch from Onno van der Linden improves audio/pulseaudio.
> So its high CPU usage problem is fixed.
> Can I commit the patch during freeze?
> 
> http://mail-index.netbsd.org/netbsd-users/2015/12/25/msg017535.html
 :
> @@ -14,7 +14,7 @@
>  + * And only primary sound device will be used (n=1).
>  + */
>  +    char args[64];
> -+    pa_snprintf(args, sizeof(args), "device=/dev/audio");
> ++    pa_snprintf(args, sizeof(args), "mmap=0 device=/dev/audio");
>  +    if (!pa_module_load(c, "module-oss", args))
>  +      exit(1);
>  +    n = 1;

Is it necessary (or harmless) even for (their native) Linux systems?

I wonder if we should rather config it in
/usr/pkg/share/example/pulseaudio/default.pa or
per-user ~/.config/pulse/default.pa only on
"systems that lack udev support" than hardcoding it
unconditionally.


--- /usr/pkg/share/examples/pulseaudio/default.pa	2015-12-23 02:53:45.000000000 +0900
+++ .config/pulse/default.pa	2015-12-26 08:00:17.000000000 +0900
@@ -51,7 +51,8 @@
 ### Automatically load driver modules depending on the hardware available
 .ifexists module-detect.so
 ### Use the static hardware detection module (for systems that lack udev support)
-load-module module-detect
+#load-module module-detect
+load-module module-oss mmap=0 device="/dev/audio"
 .endif
 
 ### Automatically connect sink and source if JACK server is present


---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index