From mboxrd@z Thu Jan 1 00:00:00 1970 From: Clemens Ladisch Subject: Re: [Bug 46011] Capture of sound from USB connected audio card (UGM96) doesn't work in 3.5.1 - kernel bug generated: scheduling while atomic Date: Thu, 16 Aug 2012 13:26:48 +0200 Message-ID: <502CD8F8.50008@ladisch.de> References: <20120815103121.D4D5211FC6C@bugzilla.kernel.org> <502B7B5B.1030808@gmail.com> <502CCB3D.3070506@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by alsa0.perex.cz (Postfix) with ESMTP id 06189265B5D for ; Thu, 16 Aug 2012 12:57:07 +0200 (CEST) In-Reply-To: <502CCB3D.3070506@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Daniel Mack Cc: Takashi Iwai , alsa-devel List-Id: alsa-devel@alsa-project.org 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 same.) 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. Regards, Clemens