ALSA: usb-audio: Don't call usb_set_interface() at trigger callback
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 08:53:08 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 14:11:22 +0000 (15:11 +0100)
commit4974b7950929e4a28d4eaee48e4ad07f168ac132
tree924ad436ded7e564eb9d6cced4092fc65f4d12e1
parentbc4e94aa8e72e79598e63a0b73febdcd8aeb541f
ALSA: usb-audio: Don't call usb_set_interface() at trigger callback

The PCM trigger callback is atomic, hence we must not call a function
like usb_set_interface() there.  Calling it from there would lead to a
kernel Oops.

Fix it by moving the usb_set_interface() call to set_sync_endpoint().

Also, apply the snd_usb_set_interface_quirk() for consistency, too.

Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c