From alsa-devel-owner@alsa.jcu.cz  Mon Jan  4 19:02:22 1999
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id SAA08165;
	Mon, 4 Jan 1999 18:53:14 +0100
Date: Mon, 4 Jan 1999 18:53:14 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: "P.J.Leonard" <P.J.Leonard@bath.ac.uk>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: ALSA Sequencer API
In-Reply-To: <3690F9CD.59E2@bath.ac.uk>
Message-ID: <Pine.LNX.3.96.990104183837.29500A-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Mon, 4 Jan 1999, P.J.Leonard wrote:

> Jaroslav Kysela wrote:
> > 
> > On Sun, 3 Jan 1999, Frank van de Pol wrote:
> > 
> > > > when I wrote the jazz midi sequencer I found it very hard to implement a
> > > > working midi-thru with the OSS API (with the OUTOFBAND ioctl).
> > 
> > Hello Andreas,
> > 
> >         version 0.3.0pre1+ of driver comes with first useable version of
> > sequencer. Currently this sequencer is working only with external MIDI
> > devices (no wavetable or other drivers for onboard synthesizer are
> > available yet), but we welcome any questions/ideas/test code for it.
> >         It would be nice work on sequencer together with experienced
> > application developers which should help us correct some things.
> > 
> >                                                         Jaroslav
> 
>  Is the ../test/seq/  code meant to compile ?

No.. This is old code for sequencer prototype (I need remove it). Latest
test code (mostly new and some moved from driver test code) is in alsa-lib
package in alsa-lib/test/seq*..

>  Also I see that user land clients sit on a file waiting for a message.
> Has anyone
> done any tests on the latency involved here ? This is important if I am

Note that latency depends on system scheduler, task priority and system
load. With PCM we have latency about 1.5ms - I think that we can reach
latency under 1ms with round-robin and maximum priority.

> going to
> support alsa from cantor (my sequencer). As Frank mentioned user land
> clients need 
> tight timing. I see that the examples run the user code as a real-time

User land DRIVERS needs tight timing, not usual sequencer applications - 
they use precise kernel-side timing and kernel side buffers...

> task.
> What if the user client hangs (CTRL-ALT-DELETE ?)

Why? If driver hangs - all incoming events are lost (queue overrun) and if
user kill this client (Ctrl-C or kill -SIGTERM) then sequencer deallocate 
all events for/from this client. Note that failure of one client doesn't
have any effect for other clients.

Note that first version of sequencer may contains fatal bugs which should 
break this model, of course..

We can also make some discussion about queues.. Mainly about watermarks,
event memory pools etc..

							Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


