Re: [LAD] ALSA Sequencer timestamp on event without scheduling

From: Clemens Ladisch <clemens@email-addr-hidden>
Date: Mon Sep 19 2016 - 15:27:59 EEST

Felipe Ferreri Tonello wrote:
> * We want to deliver these events *ASAP* to the application -
> scheduling adds latency, a lot;
> * Timestamps are in the past relative to the central.
>
> But I still need the timestamp information. Why? The spec doesn't
> explain, but it makes sense to believe it is used to have a predictable
> latency, so if the central device wants to layout these MIDI message,
> they little or no jitter in between.

MIDI is a real-time protocol, and the sequencer assumes that events are
delivered in real time.

If you want to minimize jitter, you have to impose a certain fixed
latency, and schedule all events that arrived too early.

If you want to minimize latency, you have to deliver the events
immediately.

> Thus, to be MIDI compliant

Compliant with what? The MIDI specification does not say anything about
timestamps associated with events.

> we need to set this timestamp some how on the event. And I think the
> simplest way, is to use snd_seq_real_time_t on ev.time.time.

But nobody will read it. And without a queue, the timestamp does not
make sense. And applications that care about the time of received events
tell the sequencer to overwrite the timestamp with the actual delivery
time anyway.

Regards,
Clemens
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Mon Sep 19 16:15:03 2016

This archive was generated by hypermail 2.1.8 : Mon Sep 19 2016 - 16:15:03 EEST