]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix crash at re-preparing the PCM stream
authorTakashi Iwai <tiwai@suse.de>
Thu, 8 Nov 2012 07:52:45 +0000 (08:52 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 8 Nov 2012 07:56:44 +0000 (08:56 +0100)
commita96fb2bc1c55bcbab4397d1bb9e9b89342cbf2aa
tree66a8547463d97e87224b1192135a5921b70e3027
parentb08098c92f6ce844504d61c42436803ed58121eb
ALSA: usb-audio: Fix crash at re-preparing the PCM stream

There are bug reports of a crash with USB-audio devices when PCM
prepare is performed immediately after the stream is stopped via
trigger callback.  It turned out that the problem is that we don't
wait until all URBs are killed.

This patch adds a new function to synchronize the pending stop
operation on an endpoint, and calls in the prepare callback for
avoiding the crash above.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=49181

Reported-and-tested-by: Artem S. Tashkinov <t.artem@lycos.com>
Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/endpoint.h
sound/usb/pcm.c