aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-07-05 18:03:42 +0200
committerTakashi Iwai <tiwai@suse.de>2024-07-06 09:38:27 +0200
commitfefbbdfb59d3a20fd98734363e6dd9fa7cc65c70 (patch)
tree061d4b19a5afb6974d1011e412edf6e0d0d39436 /include/uapi
parentALSA: pcm: Fix id copying in snd_pcm_set_sync_per_card() (diff)
downloadlinux-fefbbdfb59d3a20fd98734363e6dd9fa7cc65c70.tar.gz
linux-fefbbdfb59d3a20fd98734363e6dd9fa7cc65c70.zip
ALSA: seq: Add tempo base unit for MIDI2 Set Tempo messages
MIDI2 Set Tempo message defines the tempo in 10ns unit for finer accuracy, while MIDI1 was defined in 1us unit. For adapting this different unit, introduce "tempo_base" field to snd_seq_queue_tempo struct so that user-space can pass the proper tempo base unit. The accepted value is limited, it must be either 0, 10 or 1000. The protocol version is bumped to 1.0.4 along with this. The access with the older protocol version ignores the tempo-base value in ioctls and always treats as 1000. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Link: https://patch.msgid.link/20240705160344.6481-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/sound/asequencer.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/uapi/sound/asequencer.h b/include/uapi/sound/asequencer.h
index c85fdd8895d8..39b37edcf813 100644
--- a/include/uapi/sound/asequencer.h
+++ b/include/uapi/sound/asequencer.h
@@ -10,7 +10,7 @@
#include <sound/asound.h>
/** version of the sequencer */
-#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 3)
+#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 4)
/**
* definition of sequencer event types
@@ -523,11 +523,12 @@ struct snd_seq_queue_status {
/* queue tempo */
struct snd_seq_queue_tempo {
int queue; /* sequencer queue */
- unsigned int tempo; /* current tempo, us/tick */
+ unsigned int tempo; /* current tempo, us/tick (or different time-base below) */
int ppq; /* time resolution, ticks/quarter */
unsigned int skew_value; /* queue skew */
unsigned int skew_base; /* queue skew base */
- char reserved[24]; /* for the future */
+ unsigned short tempo_base; /* tempo base in nsec unit; either 10 or 1000 */
+ char reserved[22]; /* for the future */
};