summaryrefslogtreecommitdiffstats
path: root/sound/usb/endpoint.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-08 08:52:45 +0100
committerTakashi Iwai <tiwai@suse.de>2012-11-08 08:56:44 +0100
commitf58161ba1b05a968e5136824b5a16b714b6a5317 (patch)
tree66a8547463d97e87224b1192135a5921b70e3027 /sound/usb/endpoint.h
parentd1a3c98d50731c627909029bb653a0557946f0f5 (diff)
downloadop-kernel-dev-f58161ba1b05a968e5136824b5a16b714b6a5317.zip
op-kernel-dev-f58161ba1b05a968e5136824b5a16b714b6a5317.tar.gz
ALSA: usb-audio: Fix crash at re-preparing the PCM stream
There are bug reports of a crash with USB-audio devices when PCM prepare is performed immediately after the stream is stopped via trigger callback. It turned out that the problem is that we don't wait until all URBs are killed. This patch adds a new function to synchronize the pending stop operation on an endpoint, and calls in the prepare callback for avoiding the crash above. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=49181 Reported-and-tested-by: Artem S. Tashkinov <t.artem@lycos.com> Cc: <stable@vger.kernel.org> [v3.6] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.h')
-rw-r--r--sound/usb/endpoint.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/endpoint.h b/sound/usb/endpoint.h
index 6376ccf..3d4c970 100644
--- a/sound/usb/endpoint.h
+++ b/sound/usb/endpoint.h
@@ -19,6 +19,7 @@ int snd_usb_endpoint_set_params(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);
+void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
void snd_usb_endpoint_free(struct list_head *head);
OpenPOWER on IntegriCloud