]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2c4b4c3894c0058e5ef87c7172e152bde8fa60e4
tree924ad436ded7e564eb9d6cced4092fc65f4d12e1
parent91a47f1012aaa0c70447f6d38e53613cbb6f65de
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