[alsa-devel] [patch] usb6fire: prevent driver panic state when stopping

Jurgen Kramer gtmkramer at xs4all.nl
Fri Dec 7 10:26:43 CET 2012


The patch below prevents the 6fire usb driver going into panic state
when stopping playing. On some systems the urb in handler
(usb6fire_pcm_in_urb_handler) is being called while urbs are being
killed off, this causes the driver to set panic state and can result in
the kernel warning 'URB %p submitted while active'.

Signed-off-by: Jurgen Kramer <gtmkramer at xs4all.nl>

diff -uNrp linux/sound/usb/6fire/pcm.c linux.new/sound/usb/6fire/pcm.c
--- linux/sound/usb/6fire/pcm.c	2012-11-23 17:01:41.754673597 +0100
+++ linux.new/sound/usb/6fire/pcm.c	2012-12-07 10:09:11.386666744 +0100
@@ -135,6 +135,9 @@ static void usb6fire_pcm_stream_stop(str
 	struct control_runtime *ctrl_rt = rt->chip->control;
 	if (rt->stream_state != STREAM_DISABLED) {
+		rt->stream_state = STREAM_STOPPING;
 		for (i = 0; i < PCM_N_URBS; i++) {


More information about the Alsa-devel mailing list