diff options
author | Daniel Mack <zonque@gmail.com> | 2012-08-29 13:17:05 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-08-30 07:46:27 +0200 |
commit | 015618b902ae8e28705b7af9b4668615fea48ddd (patch) | |
tree | 43832c8eeaad08cf294da8a438512815858cfa66 /sound/usb/endpoint.h | |
parent | ALSA: hda - Don't trust codec EPSS bit for IDT 92HD83xx & co (diff) | |
download | linux-015618b902ae8e28705b7af9b4668615fea48ddd.tar.xz linux-015618b902ae8e28705b7af9b4668615fea48ddd.zip |
ALSA: snd-usb: Fix URB cancellation at stream start
Commit e9ba389c5 ("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>
Diffstat (limited to 'sound/usb/endpoint.h')
-rw-r--r-- | sound/usb/endpoint.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h index ee2723fb174f..a8e60c1408e5 100644 --- a/sound/usb/endpoint.h +++ b/sound/usb/endpoint.h @@ -13,7 +13,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep, struct audioformat *fmt, struct snd_usb_endpoint *sync_ep); -int snd_usb_endpoint_start(struct snd_usb_endpoint *ep); +int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep); void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, int force, int can_sleep, int wait); int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |