ALSA: ump: Set default protocol when not given explicitly
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2024 16:47:17 +0000 (18:47 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2024 16:49:00 +0000 (18:49 +0200)
commitbc42ca002d5d211f9c57334b9b4c25ddb0b4ec35
tree981eeaf85be51a773becf4076a560b5bb506a11f
parentac0d71ee534e67c7e53439e8e9cb45ed40731660
ALSA: ump: Set default protocol when not given explicitly

When an inquiry of the current protocol via UMP Stream Configuration
message fails by some reason, we may leave the current protocol
undefined, which may lead to unexpected behavior.  Better to assume a
valid protocol found in the protocol capability bits instead.

For a device that doesn't support the UMP v1.2 feature, it won't reach
to this code path, and USB MIDI GTB descriptor would be used for
determining the protocol, instead.

Link: https://lore.kernel.org/r/20240529164723.18309-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/ump.c