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



Hi,

From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>, Date: Sat, 26 Dec 2015 08:30:28 +0900

> 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.

This part is inside of defined(__NetBSD__).
It has no effect for Linux or other non-NetBSD platform.

Thank you.

> --- /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

--
Ryo ONODERA // ryo_on%yk.rim.or.jp@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index