summaryrefslogtreecommitdiffstats
path: root/sound/usb/usbaudio.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-05-02 18:17:06 +0200
committerTakashi Iwai <tiwai@suse.de>2014-05-02 18:17:06 +0200
commit1ee23fe07ee83a38ecee927e701f762888ada942 (patch)
treef8af5087956bef2a461410b49584dc3bd2cd988c /sound/usb/usbaudio.h
parent1c53e7253ed8769a00afa0f06777d731dbe1ba6f (diff)
downloadlinux-stable-1ee23fe07ee83a38ecee927e701f762888ada942.tar.gz
linux-stable-1ee23fe07ee83a38ecee927e701f762888ada942.tar.bz2
linux-stable-1ee23fe07ee83a38ecee927e701f762888ada942.zip
ALSA: usb-audio: Fix deadlocks at resuming
The recent addition of the USB audio mixer suspend/resume may lead to deadlocks when the driver tries to call usb_autopm_get_interface() recursively, since the function tries to sync with the finish of the other calls. For avoiding it, introduce a flag indicating the resume operation and avoids the recursive usb_autopm_get_interface() calls during the resume. Reported-and-tested-by: Bryan Quigley <gquigs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/usbaudio.h')
-rw-r--r--sound/usb/usbaudio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 25c4c7e217de..91d0380431b4 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -40,6 +40,7 @@ struct snd_usb_audio {
struct rw_semaphore shutdown_rwsem;
unsigned int shutdown:1;
unsigned int probing:1;
+ unsigned int in_pm:1;
unsigned int autosuspended:1;
unsigned int txfr_quirk:1; /* Subframe boundaries on transfers */