diff options
author | Daniel Mack <zonque@gmail.com> | 2011-08-14 11:31:16 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-14 18:10:43 +0200 |
commit | da6094ea7d3c2295473d8f5134279307255d6ebf (patch) | |
tree | e27db43aec5a48586535a82383be3107050bdac0 /sound/usb/caiaq/device.h | |
parent | Merge branch 'fix/asoc' into for-linus (diff) | |
download | linux-da6094ea7d3c2295473d8f5134279307255d6ebf.tar.xz linux-da6094ea7d3c2295473d8f5134279307255d6ebf.zip |
ALSA: snd_usb_caiaq: track submitted output urbs
The snd_usb_caiaq driver currently assumes that output urbs are serviced
in time and doesn't track when and whether they are given back by the
USB core. That usually works fine, but due to temporary limitations of
the XHCI stack, we faced that urbs were submitted more than once with
this approach.
As it's no good practice to fire and forget urbs anyway, this patch
introduces a proper bit mask to track which requests have been submitted
and given back.
That alone however doesn't make the driver work in case the host
controller is broken and doesn't give back urbs at all, and the output
stream will stop once all pre-allocated output urbs are consumed. But
it does prevent crashes of the controller stack in such cases.
See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: Matej Laitl <matej@laitl.cz>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/caiaq/device.h')
-rw-r--r-- | sound/usb/caiaq/device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/caiaq/device.h b/sound/usb/caiaq/device.h index b2b310194ffa..3f9c6339ae90 100644 --- a/sound/usb/caiaq/device.h +++ b/sound/usb/caiaq/device.h @@ -96,6 +96,7 @@ struct snd_usb_caiaqdev { int input_panic, output_panic, warned; char *audio_in_buf, *audio_out_buf; unsigned int samplerates, bpp; + unsigned long outurb_active_mask; struct snd_pcm_substream *sub_playback[MAX_STREAMS]; struct snd_pcm_substream *sub_capture[MAX_STREAMS]; |