<div dir="ltr">Hi Craig,<div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 20, 2016 at 4:02 AM, Craig Latta <span dir="ltr"><<a href="mailto:craig@blackpagedigital.com" target="_blank">craig@blackpagedigital.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Hi Eliot--<br>
<span class=""><br>
> First, Cog on Linux in 2010 had to use the itimer heartbeat because<br>
> pthreads only supported one priority, and so the heartbeat couldn't<br>
> be a thread. The itimer heartbeat works by delivering signals, and<br>
> ALSA didn't cope with interrupted system calls. Second, the X11 GUI<br>
> and socket i/o depend on delivering SIGIO and ALSA interfered with<br>
> signal delivery. When ALSA loaded it installed its own SIGIO handler<br>
> but didn't check for any previously installed handler and so broke<br>
> the system.<br>
><br>
> To fix these two problems I had to maintain my own corrected version<br>
> of the ALSA code, we were under time pressure and this was quicker<br>
> than trying to engage the ALSA author(s) to correct the code.<br>
<br>
</span> Aha, I'm curious to know if your signal fix involved a separate<br>
host process for ALSA, and/or the SIGRTMIN signals, as mentioned in [1].<br>
I guess I'll find out soon enough. :)<br>
<span class=""><br>
> So if ALSA is the only game in town I guess we must get the code<br>
> fixed. How is ALSA maintained and by whom?<br>
<br>
</span> The project hosts a git repository[2]. The core team is listed at [3].<br>
<span class=""><br>
> Is the code still broken as described above?<br>
<br>
</span> I suspect so; do you have a minimal regression test I can build and<br>
run?<br></blockquote><div><br></div><div>Thanks for the links. I checked-out alas-lib (via ) today and indeed the code is still broken. Look at the sigaction calls in src/async.c and they don't ask for the old action. I'll try contacting the authors and suggesting they fix things.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> > I found an enlightening and sad summary of the Linux audio<br>
</span>> > processing architecture[4] which, although written in 2010, seems<br>
> > to jibe with the current Wikipedia pages for ALSA[5],<br>
> > PulseAudio[6], JACK[7] (another sound server), and OSS[8], and with<br>
> > a similarly sad Linux MIDI summary[9].<br>
><br>
> I'll try and find time to read this. Care to summarize?<br>
<br>
Oh, just that there are far too many pieces, with feature sets that<br>
overlap and build on each other in ever stranger ways over time. It's<br>
easy to think that one piece is "standard" for a particular role, when<br>
it actually does something very different. But at least there are<br>
reasonable overviews now.<br>
<br>
For Linux Squeak MIDI, the upshot is that we want to play nicely<br>
with ALSA, and PortMIDI is a good way to do that. More broadly, using<br>
the PortMedia libraries/APIs would make Squeak audio and MIDI much more<br>
pleasant on Linux, Windows, and Mac OS. Indeed, let's start by getting<br>
your ALSA bug confirmed for 2016, then probably get your fix integrated.<br>
<br>
<br>
thanks again,<br>
<br>
-C<br>
<br>
[1] <a href="https://tinyurl.com/z2o58km" rel="noreferrer" target="_blank">https://tinyurl.com/z2o58km</a> (<a href="http://linuxquestions.org" rel="noreferrer" target="_blank">linuxquestions.org</a>)<br>
[2] <a href="http://www.alsa-project.org/main/index.php/GIT_Server" rel="noreferrer" target="_blank">http://www.alsa-project.org/main/index.php/GIT_Server</a><br>
[3] <a href="http://www.alsa-project.org/main/index.php/Alsa_Team" rel="noreferrer" target="_blank">http://www.alsa-project.org/main/index.php/Alsa_Team</a><br>
<br>
[4] <a href="http://tuxradar.com/content/how-it-works-linux-audio-explained" rel="noreferrer" target="_blank">http://tuxradar.com/content/how-it-works-linux-audio-explained</a><br>
[5] <a href="https://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture</a><br>
[6] <a href="https://en.wikipedia.org/wiki/PulseAudio" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/PulseAudio</a><br>
[7] <a href="https://en.wikipedia.org/wiki/JACK_Audio_Connection_Kit" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/JACK_Audio_Connection_Kit</a><br>
[8] <a href="https://en.wikipedia.org/wiki/Open_Sound_System" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Open_Sound_System</a><br>
[9] <a href="http://www.tedfelix.com/linux/linux-midi.html" rel="noreferrer" target="_blank">http://www.tedfelix.com/linux/linux-midi.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Craig Latta<br>
Black Page Digital<br>
Amsterdam<br>
<a href="mailto:craig@blackpagedigital.com">craig@blackpagedigital.com</a><br>
<a href="tel:%2B31%20%20%206%202757%207177" value="+31627577177">+31 6 2757 7177</a> (SMS ok)<br>
<a href="tel:%2B%201%20415%20%20287%203547" value="+14152873547">+ 1 415 287 3547</a> (no SMS)<br></div></div></blockquote></div><div><br></div><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>