From: Paul Barton-Davis <pbd@Op.Net>
To: linux-sound@vger.kernel.org
Subject: Re: [alsa-devel] Re: MidiShare and ALSA sequencer
Date: Wed, 08 Sep 1999 15:18:36 +0000 [thread overview]
Message-ID: <marc-linux-sound-93680330520444@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-93679717712022@msgid-missing>
>> So if I understand correctly, patched Linux has good RT guarantees for
>> user-space interrupt latency (witnessed by Benno's blocking write()s);
>> the trouble for timer-driven tasks is that there's no interrupt coming
>> in at the desired time.
>>
>> Then a select() has good timing when it wakes up on a fd, but not on
>> timeout? So a software synthesizer, including one driven by MIDI,
>> ought to do well, but a sequencer loses.
>
>
>This seems rather inconsistent to me that one is able to get good
>timing by waking up on the soundcards interrupt, but not by setting
>precise timers. (greater than 10ms precison)
the soundcard interrupt *is* a precise timer. It can interrupt every
1/(fragmentsize*samplerate) secs, which can be as little as 0.6usecs
with a 32 sample fragment size @ 48KHz.
I am not sure what you mean by "inconsistent": there is no
inconsistency here - interval timing in any contemporary computer is
based on interrupts and/or a clock crystal+register. The system timer
interrupts every 1/HZsecs, and so you cannot get better interval
timing than 1/HZ intervals from anything that relies on the system
timer. If something else can generate interrupts at a faster rate,
then it can cause tasks to wake up more frequently.
>(One solution of an audio/MIDI sequencer could be to base the MIDI timing
>on the PCM audio interrupts (using short fragments to get msec precision)
>plus checking the TSC counter to get more accurate MIDI timing,
>but this is not as elegant as UTIME)
not at all elegant: much of the time that I am using SoftWerk, I am
not using the PCM capabilities of a soundcard at all (I'm driving
external sound generation equipment) and so there would be no
interrupts. If SoftWerk opened the PCM device to activate the
interrupts, it has essentially stolen the capability to control that
device from another program, and since SoftWerk doesn't need any PCM
capabilities, this is really silly.
>The KURT people showed that UTIME has little overhead
>and the time-drift (over a day) is comparable to the standard-timer.
>
>Does anyone know the reasons because the UTIME patches
>can't be included in the kernel ?
Linus doesn't like their design. He is quite happy with the idea, but
felt that they messed up some aspects of the patch. This was the last
I read, anyway.
>With the low-latency patches + UTIME patches in the mainstream kernel , as a
>userspace RT programmer I would be very happy.
moi aussi.
--p
prev parent reply other threads:[~1999-09-08 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-09-08 13:55 [alsa-devel] Re: MidiShare and ALSA sequencer Benno Senoner
1999-09-08 15:18 ` Paul Barton-Davis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-sound-93680330520444@msgid-missing \
--to=pbd@op.net \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox