]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: snd-usb: Fix URB cancellation at stream start
authorDaniel Mack <zonque@gmail.com>
Wed, 29 Aug 2012 11:17:05 +0000 (13:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 30 Aug 2012 05:46:27 +0000 (07:46 +0200)
commit6efd3bc8d6b74f77b7d355b19f1c7a90b8beded2
tree43832c8eeaad08cf294da8a438512815858cfa66
parent472cc687cded1d9698f99bf4bc341b7163bda697
ALSA: snd-usb: Fix URB cancellation at stream start

Commit 463af7510 ("ALSA: usb-audio: Fix scheduling-while-atomic bug in
PCM capture stream") fixed a scheduling-while-atomic bug that happened
when snd_usb_endpoint_start was called from the trigger callback, which
is an atmic context. However, the patch breaks the idea of the endpoints
reference counting, which is the reason why the driver has been
refactored lately.

Revert that commit and let snd_usb_endpoint_start() take care of the URB
cancellation again. As this function is called from both atomic and
non-atomic context, add a flag to denote whether the function may sleep.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: stable@kernel.org [3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/endpoint.h
sound/usb/pcm.c