usb: gadget: midi2: More flexible MIDI 1.0 configuration
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Jul 2023 06:22:06 +0000 (08:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jul 2023 04:38:14 +0000 (06:38 +0200)
commita85ff0db48c372063988f2072a07bd361ce9c4ef
treed576d39c55765dba186cfdd83ec85c60fc25cd11
parent1b437d2fb3c1a8c7f2a8a096c0871c8e7c8d109e
usb: gadget: midi2: More flexible MIDI 1.0 configuration

This patch allows users to set up MIDI 1.0 ports more flexibly.
Namely, instead of the fixed mapping only from FB 0, now multiple
block definitions are applied to build up the MIDI 1.0 mapping.

The each block config has midi1_first_group and midi1_num_groups
attributes, and those specify which Groups are used for MIDI 1.0.
Those fields must be within the UMP Groups defined in the block
itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20230725062206.9674-8-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/ABI/testing/configfs-usb-gadget-midi2
Documentation/usb/gadget-testing.rst
drivers/usb/gadget/function/f_midi2.c
drivers/usb/gadget/function/u_midi2.h