Skip to content
Commit e9ba389c authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 3bdcff70
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment