[alsa-devel] [Bug 46011] Capture of sound from USB connected audio card (UGM96) doesn't work in 3.5.1 - kernel bug generated: scheduling while atomic

Clemens Ladisch clemens at ladisch.de
Thu Aug 16 13:26:48 CEST 2012

Daniel Mack wrote:
> Clemens, the patch below fixes a "sleeping while atomic" bug in the USB
> audio driver, but it raises a new "not enough bandwidth" issue, which
> might even be unreleated.
>> +++ b/sound/usb/pcm.c
>> @@ -544,6 +544,9 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
>> +	/* clear the pending deactivation on the target EPs */
>> +	deactivate_endpoints(subs);

The HC drivers calculate bandwidth for a stream when the first URB is
submitted or the last one is completed.  (xHCI does this when the
altsetting is changed; IIRC there are plans to have other HCDs do the

This patch doesn't change the relative order of URB submissions and
cancellations.  The descriptions in bug 46011 indicates that we're
running into the not-completely-fixed EHCI scheduling bugs.


More information about the Alsa-devel mailing list