<div dir="ltr"><div>>Here are the instructions:</div><div>></div><div>>1. Place a pulseaudio-9999 ebuild into your local overlay:</div><div>></div><div>>mkdir -p /usr/local/portage/media-sound/pulseaudio</div>
<div>>cd /usr/local/portage/media-sound/pulseaudio</div><div>>wget <a href="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/pulseaudio-9999.ebuild">http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/pulseaudio/pulseaudio-9999.ebuild</a></div>
<div>>repoman manifest</div><div>></div><div>>2. Enable your local overlay by adding this line to the end of /etc/portage/make.conf:</div><div>></div><div>>PORTDIR_OVERLAY="$PORTDIR_OVERLAY /usr/local/portage"</div>
<div>></div><div>>3. Build pulseaudio-9999 with debug symbols.</div><div>></div><div>>FEATURES=splitdebug CFLAGS="-O2 -pipe -g3 -ggdb" ACCEPT_KEYWORDS="**" emerge -av =media-sound/pulseaudio-9999</div>
<div>></div><div>>Just in case, rebuild some libraries with debug symbols, too:</div><div>></div><div>>FEATURES=splitdebug CFLAGS="-O2 -pipe -g3 -ggdb" emerge -1 alsa-lib speex</div><div>></div><div>
>4. Build perf:</div><div>></div><div>>emerge perf</div><div>></div><div>>5. Restart pulseaudio as a user:</div><div>></div><div>>pulseaudio -k ; pulseaudio --start</div><div>></div><div>>6. Profile PulseAudio:</div>
<div>></div><div>># as root:</div><div>>perf record -p `pidof pulseaudio`</div><div>></div><div>># while it is recording, play FEZ as a user</div><div>>./FEZ</div><div>>... and while the game is playing something, place a test audio-only call with skype. Wait for it to hang up.</div>
<div>></div><div>># Then stop perf-recording with Ctrl+C</div><div>></div><div>>7. Make a readable profile report:</div><div>></div><div>>perf report > report.txt</div><div>></div><div>>My report (from FEZ + skype test call + pavucontrol) is attached. I had to truncate it so that it fits the mailing list size limit (100 KB). PulseAudio is from today's git. Please don't be alarmed by the top line that says 13.99%: this is 13.99% of all non-idle CPU cycles.</div>
<div>></div><div>>Here is the top of the "top" output:</div><div>></div><div>>26778 aep 20 0 1572544 541308 54048 R 25,3 3,3 1:14.73 FEZ.bin.x86_64</div><div>>26807 aep 20 0 571612 150612 70128 S 9,3 0,9 0:20.21 skype</div>
<div>> 607 root 20 0 204388 47360 28568 S 8,0 0,3 2:43.67 X</div><div>>26767 aep 9 -11 821636 18488 15180 S 6,6 0,1 0:17.97 pulseaudio</div><div>>19913 aep 20 0 947044 70872 31932 S 6,3 0,4 0:58.03 pavucontrol</div>
<div>></div><div>Oh what a tedious task you gave me. I will do that when I come back from work. Just to make sure, compiling libs (specially alsa-lib) with such CFLAGS might break a lot of things, since I'd be disabling some of my current flags, and that might catch other libs out of guard. This is my current CFLAGS</div>
<div><br></div><div>CFLAGS="-march=core2"</div><div>CFLAGS="${CFLAGS} -msse4"</div><div>CFLAGS="${CFLAGS} -mcx16"</div><div>CFLAGS="${CFLAGS} -msahf"</div><div>CFLAGS="${CFLAGS} -O2"</div>
<div>CFLAGS="${CFLAGS} -pipe"</div><div><br></div><div>I'll do that for science and for the sake of testing though. Also, comparing with FEZ is not really fair. The game barely has any graphics demand and was already the least problematic to start with (check the original post). I'll check FEZ out and some of the others too.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 14 July 2014 09:09, Jan Alexander Steffens <span dir="ltr"><<a href="mailto:jan.steffens@gmail.com" target="_blank">jan.steffens@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"><br>
Am 14.07.2014 17:59 schrieb "Laurențiu Nicola" <<a href="mailto:lnicola@dend.ro" target="_blank">lnicola@dend.ro</a>>:</p><div class=""><br>
><br>
> While I agree, I think it's only fair to say that both Windows and<br>
> PulseAudio avoid the resampling if the source sample rate is the same as<br>
> the configured one. In my distribution (Arch), /etc/pulse/daemon.conf<br>
> has<br>
><br>
> ; default-sample-rate = 44100<br>
><br>
> which means it's the default. Many audio sources are 44.1 kHz, so they<br>
> don't need resampling. It might be interesting to see what sample rate<br>
> your the slow apps use and whether Pulse isn't configured to use 48000<br>
> or something else.<br>
><br>
> Using pure ALSA I've had some issues with ALSA preferring to open the<br>
> device and 48000, but I'm not sure whether this applies to PulseAudio or<br>
> not.</div><p></p>
<p dir="ltr">If the device does not support 44.1kHz but only 48kHz (and many cheap integrated ones don't) then PA will still have to resample.</p>
<br>_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org">pulseaudio-discuss@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" target="_blank">http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss</a><br>
<br></blockquote></div><br></div>