]> git.alsa-project.org Git - alsa-lib.git/commit
seq: Add API functions to set different tempo base values
authorTakashi Iwai <tiwai@suse.de>
Wed, 3 Jul 2024 13:00:20 +0000 (15:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Jul 2024 15:12:44 +0000 (17:12 +0200)
commit24c7f427339402546f17a2bb6c0624ebb85ec847
tree9afcb2934cd8053add616de283565bdb592e6351
parent568b2ac1db491f6dac88607ef8e5ae3454357f00
seq: Add API functions to set different tempo base values

MIDI2 Set Tempo message uses 10ns-based values, and we need to update
the API to change the base time unit.

This patch adds a few new API functions:
- snd_seq_has_queue_tempo_base() returns 1 if the client supports a
  new tempo-base value; if 0, it's an old system and application has
  to use the tempo in the fixed 1us unit
- the tempo base can be changed with
  snd_seq_queue_tempo_set_tempo_base(), provided in nsec unit;
  the value has to be either 10 or 1000 (or 0 as default, equivalent
  with 1000)

The protocol version is checked and fallback to the fixed 1us base for
the old clients.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/seq.h
include/sound/uapi/asequencer.h
src/Versions.in.in
src/seq/seq.c
src/seq/seq_hw.c
src/seq/seq_local.h