]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream
authorTakashi Iwai <tiwai@suse.de>
Wed, 15 Aug 2012 10:32:00 +0000 (12:32 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 16 Aug 2012 06:04:07 +0000 (08:04 +0200)
commit463af7510994f188689281e81f8e37eddf378138
treea103bde320260cd42172a9171af0d3fe7da889c4
parent3b09fbf15309f8766a8efea8f9040350482ecc05
ALSA: usb-audio: Fix scheduling-while-atomic bug in PCM capture stream

A PCM capture stream on usb-audio causes a scheduling-while-atomic
BUG, as reported in the bugzilla entry below.  It's because
snd_usb_endpoint_start() is called at first at trigger START for a
capture stream, and this function contains the left-over EP
deactivation codes.  The problem doesn't happen for a playback stream
because the function is called at PCM prepare time, which can sleep.

This patch fixes the BUG by moving the EP deactivation code into the
PCM prepare callback.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c
sound/usb/pcm.c