ALSA: seq: Automatic conversion of UMP events
authorTakashi Iwai <tiwai@suse.de>
Tue, 23 May 2023 07:53:51 +0000 (09:53 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 23 May 2023 10:11:28 +0000 (12:11 +0200)
commite9e02819a98a50fefe2f8016b1e5237742637cd1
treecaabcac9fedb9005043a9dc35e2a413bce9f559b
parenta3ca3b30800da0a334e2d6eb68d123ec8e2d2bf6
ALSA: seq: Automatic conversion of UMP events

This patch enables the automatic conversion of UMP events from/to the
legacy ALSA sequencer MIDI events.  Also, as UMP itself has two
different modes (MIDI 1.0 and MIDI 2.0), yet another converters
between them are needed, too.  Namely, we have conversions between the
legacy and UMP like:
  - seq legacy event -> seq UMP MIDI 1.0 event
  - seq legacy event -> seq UMP MIDI 2.0 event
  - seq UMP MIDI 1.0 event -> seq legacy event
  - seq UMP MIDI 2.0 event -> seq legacy event

and the conversions between UMP MIDI 1.0 and 2.0 clients like:
  - seq UMP MIDI 1.0 event -> seq UMP MIDI 2.0 event
  - seq UMP MIDI 2.0 event -> seq UMP MIDI 1.0 event

The translation is per best-effort; some MIDI 2.0 specific events are
ignored when translated to MIDI 1.0.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230523075358.9672-31-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/Kconfig
sound/core/seq/Makefile
sound/core/seq/seq_clientmgr.c
sound/core/seq/seq_clientmgr.h
sound/core/seq/seq_ports.h
sound/core/seq/seq_ump_convert.c [new file with mode: 0644]
sound/core/seq/seq_ump_convert.h [new file with mode: 0644]