ALSA: ump: Support UMP Endpoint and Function Block parsing
authorTakashi Iwai <tiwai@suse.de>
Mon, 12 Jun 2023 08:10:46 +0000 (10:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 12 Jun 2023 16:22:26 +0000 (18:22 +0200)
commit37e0e14128e0685267dc5c037bf655421a6ce2ea
tree27c09ee3e9dc7eefd92010c3c24ae6a8f83478d0
parente375b8a045873cf5fb8bf61bf9a0ddfcd484243a
ALSA: ump: Support UMP Endpoint and Function Block parsing

This patch adds the basic support for UMP Endpoint and UMP Function
Block parsing, which are extended in the new UMP v1.1 spec.
The patch provides a new helper function to perform the query of the
UMP Endpoint information and builds up the UMP blocks based on UMP
Function Block information.  For the communication over the UMP
Endpoint, it opens the rawmidi device once internally, inquiries the
UMP Endpoint and Function Block info by sending new UMP Stream
messages, and waits for the response for each query.

The new UMP spec allows to update the FB info and change its
associated groups or its activeness on the fly, too.  For catching it,
the UMP core keeps watching the incoming UMP messages, and
snd_ump_receive() handles the incoming UMP Stream messages to refresh
the FB info.

Link: https://lore.kernel.org/r/20230612081054.17200-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/ump.h
include/sound/ump_msg.h
sound/core/ump.c