usb: gadget: midi2: Add "Operation Mode" control
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Jul 2023 06:22:05 +0000 (08:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Jul 2023 04:38:14 +0000 (06:38 +0200)
commit1b437d2fb3c1a8c7f2a8a096c0871c8e7c8d109e
treeec3069add00a08176aebe820a9c2dade79b2b913
parent8559caa985503d057e55dd7c6362b8f98359ba2e
usb: gadget: midi2: Add "Operation Mode" control

Add a new ALSA control element to watch the current operation mode
(MIDI 1.0 or MIDI 2.0).  It's a read-only control that reflects the
current value of altsetting, and 0 means unused, 1 for MIDI 1.0
(altset 0) and 2 for MIDI 2.0 (altset 1).

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