Nevertheless, as a linux user, I envy some features. I had apt break recently in a way that took 5 hours to fix with help from the people at #debian at oftc. A stable, mature and high performant filesystem with snapshots is badly needed. It could have reduced my time to a working apt again from hours to minutes.
I've been using real time threads and preemptive scheduling on my Linux audio workstations since 2005. Am I missing something here, or is that date in the article a typo?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
Heck, there are still major parts of RT Linux being released in the upcoming kernel:
But I haven't been able to figure out anything that would indicate FreeBSD is better (or is better than what Linux was in 2016). The information is sparse, but it seems to me that it has a scheduler with _some_ support for realtime threads (when the timeslice is up, RT threads take priority in the scheduling algorithm), but not really preemption of non-RT threads by RT threads (ie., when a RT thread is ready to wake up, non-RT threads get kicked out even if the timeslice isn't up), and I cannot find anything at all about the kernel being preemptable by userspace threads, RT or not.
At first it was necessary to compile the realtime-lsm module to allow user programs to make use of realtime scheduling. In late 2006 or so (IIRC) rlimits-aware PAM became available which made realtime-lsm redundant.
I've used CONFIG_PREEMPT=y (along with CONFIG_HZ=1000) when compiling mainline kernels all along. My current distro of choice (Void) enables these by default in their 5.4 series kernels. I've never needed PREEMPT_RT for my particular use case.
AFAIK FreeBSD still doesn't allow users to run programs with realtime scheduling privileges (SCHED_FIFO or SCHED_RR), only root.
Although details differ, all of this is still not really a solved problem today. People want to have their cake and eat it too.
"A bit later, a new version of OSS came out, OSS 4, which was not released as open source. The Linux developers had a tantrum and decided to deprecate OSS and replace it with something completely new: ALSA."
This is blatantly false. ALSA begun development in 1998 because of missing features in the OSS API [1], in terms of both drivers and userspace. OSSv4 was not released until 9 years later in 2007 [2]. Various other Linux developers have also expressed unhappiness with deficiencies in the OSS API [3]. Whichever tantrum is being talked about here seems to be wholly fictional.
"Meanwhile, the FreeBSD team just forked the last BSD licensed OSS release and added support for OSS 4 and in-kernel low-latency sound mixing..."
This entire paragraph makes no sense to me and has nothing to do with OSSv4. Announcement of an OSSv4 compatible API didn't happen until 2006 [4], which is well into the FreeBSD 6.x series.
"It was several years before audio became reliable on Linux again and it was really only after everything was, once again, rewritten for PulseAudio. Now it’s being rewritten for PipeWire."
This makes no sense. Applications that were written with basic ALSA/OSS support just worked if they used the Pulseaudio PCM. Applications that used ESD or aRts had issues, but you had the same problems on BSD if you wanted to use GNOME or KDE. Also, Pipewire is explicitly backwards compatible with PulseAudio, so nothing is being rewritten.
[1] https://www.linuxjournal.com/article/8234
[2] http://ossnext.trueinstruments.com/forum/viewtopic.php?f=19&...
However, with my FreeBSD hat on, it should be pointed out that we had this wonderful fellow called Cameron Grant. He is largely responsible for FreeBSD's post-OSS audio system. FreeBSD could have gone several ways for audio at the time, but he made it work, and it worked well. It had virtual channels with in-kernel mixing with very low latency - with full API compatibility. Tragically, Cameron's time was cut short.
Over time, other people got involved and picked it up. The subsystem gradually progressed from the user perspective of being simple and Just Working, to something that is rather powerful today.
Wanted to see what this meant so i read the citation. I think this is what I found most relevant:
> There are two separate models that can be used between the software and the hardware. In a "push" model, the application decides when to read or write data and how much, while the "pull" model reverses that, requiring the hardware to determine when and how much I/O needs to be done. Supporting a push model requires buffering in the system to smooth over arbitrary application behavior. The pull model requires an application that can meet deadlines imposed by the hardware.
The claim is that write(2) etc. is supporting push but ill suited for pull. It's easy to do the former in terms of the latter but not the other way around.
I sort of felt for Lennart Poettering for all the abuse [0] he got (I guess it helped that I'd already given up on using Linux as a desktop, so it could be as broken as it wanted to be as far as I was concerned) until he inflicted systemd on the world...
The post also fails to mention JACK, a low latency audio server for Linux. Which is now replaced by PipeWire. JACK was programmed by the same person as Ardour, called Paul Davis. You might've seen him around here. He's been doing using Linux audio professionally for a while.
There was also a Linux live distribution aimed for being used as a Linux audio workstation, called dyne:bolic.
FreeBSD was and is a niche, not the reason why Linux wasn't used much for professional audio work.
The ALSA debacle was a short lasting transition period (eventually ALSA even got OSS emulation).
The reason why Linux wasn't used much for professional audio work goes to Apple. macOS is just easier to use than any Linux distribution, so it got the momentum in that scene (and in the artistic scene in general). The rest is history.
Assuming there is no video, or the video can be delayed to stay in sync. And it also matters for other real time stuff such as gaming. I suppose most desktop stacks are good enough for gaming, but that's something current Bluetooth audio is unusable for.
Windows audio has never made working with latency or routing sound between programs a goal. There are ways to do it, but isn't in the default. (I forget what it is called, but there is a common standard - starts with an A). For normal users it is good enough, but if you are a musician then it doesn't work well without programs that support the other standard.
Linux does similar things with pipewire/jack. Pipewire is still in the early days so has growing pains. The problem with both is they are not part of the OS so your program needs to be written to handle it (but these days almost all programs use pulseaduio which pipewire implements). This can route any program to any program/output at the OS level, though mixing Jack and pulseaudio APIs is probably a pain. Jack has some nice GUIs for sound routing, I don't know if any exist for this.
The effort is nice to see, but unless they support the jack APIs I think most people will be using jack on freebsd anyway for the near future. On the other hand, this is what Linux should have done all along. Linux has consistently done sound wrong going back to 2003 when they did ALSA instead of fixing OSS.
ASIO
A few times per week, Windows will inform me "Your speakers aren't working" or "Your microphone isn't working". Notice that this is deliberately vague as to agency or cause even though of course they couldn't detect if the actual problem was that the physical microphone or speakers wasn't working. They know it isn't working because their driver fell over even though they don't admit that's the problem. As a result rebooting the computer usually fixes it.
Now, I happen to own a laptop by the same vendor, into which I can plug the exact same devices, and on that laptop these audio devices work reliably even under Windows (which is installed to run some games). But "it works on some hardware and not others" is exactly the sort of poor user experience Linux (and *BSD) audio gets dinged for...
[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/au...