That's a derail and I don't need to. It's a well known fact among anyone working with audio on Linux, and you can test this at home, easily. Install any of the Linux audio softwares (Ardour, LMMS, Qtractor, all are open source and GPL-licensed, take your pick) and try to use it through PulseAudio. You don't even need a MIDI keyboard, try loading up any kind of instrument and playing with it a virtual keyboard. With PulseAudio, there are noticeable latencies which make playing in realtime a sheer impossibility.

You can try to tweak the PA settings any which way you want, you can't get the sound working glitchlessly with reasonably low latencies. Maybe you can get it to run "good enough" if you're lucky enough to have hardware that works well with PA, but it's not "good enough" for everyone. Now try the same with ALSA or Jack (if you use ALSA, you have to make sure it's routed to bypass PA, otherwise there will be no difference with PA) and you'll see a world of difference. I can easily get around 6ms latencies with ALSA, and that's without doing any tweaks or using RT kernels - with PA it's not even in the same order of magnitude.

PulseAudio is simply not designed for audio work and does not work well in that area. ALSA is a kernel-level system, so of course talking directly to it gives low latency. Whereas, something like Jack is designed by audio professionals, for the very purpose of facilitating low-latency audio. And it's kind of amazing really, Linux can actually be used as a superior proaudio workstation OS, when you choose and setup your hardware correctly - with a RT kernel + Jack, you can get latencies lower than on any other platform, including OS X. And Jack provides a modular design (real modular, not systemd-modular, hehehehe I'm trolling) that's quite unique in the realm of audio systems - it allows you to route audio between applications with very low latencies, so you can create a virtual sound setup in the same way you'd create one with actual hardware synths. Linux is actually quite capable in the realm of proaudio.

There's a reason why PulseAudio isn't being used by audio applications or audio professionals. And it's not "omg lennart let's boycott this because lennart". It's because PA simply isn't up to the task. Sure, it may be fine for normal desktop use and I never claimed anything different. But that doesn't translate to audio work where the requirements are different.

The best of both worlds approach - for hobbyist, non-proaudio-use - is to use PA with a Jack backend, where PA can be used to support things like desktop, music players etc. and it outputs via Jack, while audio applications can talk to Jack directly. This is something I've been meaning to set up myself (I'm lazy, shut up).

While this sounds reasonable, PA will get better. It has zero copy API so the latency will not grow significantly on localhost. You should definitely use RT kernel and JACK as a backend, but PA can be used as a frontend with low latency overhead. It's just about passing pointers.

01-28-2014, 09:58 PM

dee.

Quote:

Originally Posted by caligula

While this sounds reasonable, PA will get better. It has zero copy API so the latency will not grow significantly on localhost. You should definitely use RT kernel and JACK as a backend, but PA can be used as a frontend with low latency overhead. It's just about passing pointers.

Well that sounds nice and all but in practice it's just not happening.

PA can definitely be used as a frontend and backend for casual desktop use, like video/music playback, desktop sounds or such. But it will never be useful as a frontend for actual, serious audio applications. Because the needs are just too different.

In fact, the Jack webpage explains this difference quite well:

Quote:

PulseAudio is focused on desktop and mobile audio needs. It doesn't try to address low latency usage, but does provide seamless device switching, network routing, global per-application volume control and lots more great stuff.
JACK is focused on the needs of pro-audio and music creation users. It offers the lowest possible latency, complete routing flexibility between applications and audio hardware, and all audio is always sample synchronized - apps don't run ahead or behind of others. It doesn't provide the smooth desktop experience that PulseAudio is aiming at.

01-28-2014, 10:15 PM

mrugiero

In any case, caligula, I think you are missing dee.'s point. The point was not about PA and Jack, but on something more general: there isn't always a solution that fixes everything, sometimes you need specific solutions for specific problems, so forcing one specific solution for all the problems becomes short sighted.

01-29-2014, 01:02 AM

Vim_User

Quote:

Originally Posted by mrugiero

But again, if systemd is an optional dependency only, I think there is nothing to complain about here, and I seriously doubt the X guys are that moronic to make it a hard one, I hardly believe they are morons at all.

This! They didn't make a hard dependency for systemd in Wayland, so why should they do that in Xorg?

01-29-2014, 02:08 AM

gens

Quote:

Originally Posted by caligula

While this sounds reasonable, PA will get better. It has zero copy API so the latency will not grow significantly on localhost. You should definitely use RT kernel and JACK as a backend, but PA can be used as a frontend with low latency overhead. It's just about passing pointers.

zero copy is not that good as people think
in fact it's mostly no better then a regular copy

PA uses alsa in the end
so if you have like 2 sounds playing with different sampling rate there needs to be mixing

and still last time i checked it it used way too much cpu
in fact it used twice as much cpu then the music player, music player that decodes stuff

after... 2 years you'd think it gets better

01-29-2014, 05:46 AM

erendorn

Quote:

Originally Posted by dee.

Well that sounds nice and all but in practice it's just not happening.

PA can definitely be used as a frontend and backend for casual desktop use, like video/music playback, desktop sounds or such. But it will never be useful as a frontend for actual, serious audio applications. Because the needs are just too different.

In fact, the Jack webpage explains this difference quite well:

Fully agreed.
I think PA makes sense as the default, and if you have niche needs, there are better alternatives.
So I think the situation is pretty good all in all.

01-29-2014, 07:25 AM

Daktyl198

Quote:

Originally Posted by Vim_User

This! They didn't make a hard dependency for systemd in Wayland, so why should they do that in Xorg?

Would it even be an optional "dependency"? From what I can tell, it only provides integration if you use systemd, it doesn't try to force it on you or allude that X works better with systemd.

01-29-2014, 07:36 AM

GreatEmerald

Quote:

Originally Posted by Daktyl198

Would it even be an optional "dependency"? From what I can tell, it only provides integration if you use systemd, it doesn't try to force it on you or allude that X works better with systemd.

Well, X does work better with systemd, by virtue of being able to operate without root privileges.

01-29-2014, 07:52 AM

nachoig

Quote:

Originally Posted by jrch2k8

i think the problem radicate in the fact most people don't have the background needed to understand why systemd do what it does, so they tend to whine about thing they probably won't ever touch in their life for whatever reason they read for any random troll here and there which 99% of the time are totally wrong.

so in the end they blame systemd for the lazyness of other init systems devs.

facts:

1.) CGroups was declares a security bug by kernel devs: only systemd devs responded to the call to find a proper and secure solution (PID1 in 205+)
2.) consolekit is dead for more than a year!!! blame systemd because they are the only ones around proposing an far superior solution that even canonical has to accept for thecnical reasons
3.) network init at early boot stages is a bloddy hell of a mess/bonding is like calling satan to your home!!! blame systemd ofc for fixing it and then lay control to networkmanager later in the boot process, blame you lennart you so evil
4.) journal is binary OMFG, lennart is the devils spawn!!! ohh wait syslog still works perfectly fine(give lots less info than journalctl) and it never started that early in the boot process or stay alive during shutdown process or have a nice dbus API or give easy search functions(without 2 pHD in grep/sed engineering) and never played well with other log Systems like rsyslog and never was standard among distros(rsyslog/syslog/syslog-ng/etc)
5.) Dbus in kernel OMG the heaven will fall!!! ohh, wait basically every linux app on existance uses dbus and the kernel didn't like the idea because lennart poisoned their corn flakes but because kernel IPC is quite obsolete and slow and porting dbus to a lower layer will allow for way more performance and security plus regular apps won't even notice and kernel deis can take that train and improve a lot of subsystem suffering from IPC performance issues, well WTH lets blame lennart either way
6.) etc,etc,etc,etc blah blah blah lets go political besucase i can't understand any of the above, just to not look stupid

7. The purpose of the ingration between Xserver and systemd is to run Xserver without root privileges. So, if the problem is choice, blame systemd for offering this choice. :)

Edit: I didn't see the post of GreatEmerald.

01-29-2014, 08:04 AM

gens

Quote:

Originally Posted by GreatEmerald

Well, X does work better with systemd, by virtue of being able to operate without root privileges.

X can be run as a normal user
it only requires KMS to be used, that binary drivers don't support