bandwidth allocation problems with external USB audio device

Bug #889953 reported by David Monniaux
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

usb-audio with a Zoom H4N does not work.

The Zoom H4N contains a USB hub and a usb-audio device. When connecting, it produces the following error in dmesg:
cannot submit datapipe for urb 0, error -28: not enough bandwidth
When attempting to use Jack in full-duplex, jackd attempts a 0x4142 ioctl (SNDRV_PCM_IOCTL_START), gets an EPIPE, and crashes; the kernel produces another 'cannot submit datapipe for urb 0, error -28: not enough bandwidth' message in dmesg.

From reading various forums and lists, the problem seems related to a bug in bandwidth allocation in EHCI_HCD with respect to isochronous endpoints (audio devices), which happens particularly badly when these devices are behind hubs.

Workaround: disable the EHCI controller to which the audio device is connected, e.g.
echo -n '0000:00:1d.7' > /sys/bus/pci/drivers/ehci_hcd/unbind
where 0000:00:1d.7 is to be replaced by the correct PCI address. This will reconnect the device under USB 1.1.

This problem has been going on for years in the Linux kernel and should definitely be fixed.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-12-generic 3.0.0-12.20
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelModules: wl
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu4
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: david 2167 F.... pulseaudio
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf6adc000 irq 46'
   Mixer name : 'Intel Cantiga HDMI'
   Components : 'HDA:111d76b2,10280277,00100302 HDA:80862802,80860101,00100000'
   Controls : 19
   Simple ctrls : 11
Date: Sun Nov 13 21:09:45 2011
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=ef890c0a-abf2-48af-b767-6c84d2fdf528
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
MachineType: Dell Inc. Latitude E4200
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-12-generic root=UUID=238c0805-e3d7-41bb-bcc2-ee866f5734f3 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-12-generic N/A
 linux-backports-modules-3.0.0-12-generic N/A
 linux-firmware 1.60
SourcePackage: linux
UpgradeStatus: Upgraded to oneiric on 2011-10-15 (29 days ago)
dmi.bios.date: 05/06/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A16
dmi.board.name: 02GMRH
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA16:bd05/06/2010:svnDellInc.:pnLatitudeE4200:pvr:rvnDellInc.:rn02GMRH:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: Latitude E4200
dmi.sys.vendor: Dell Inc.

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 364024
/proc/bus/usb/devices

Description of problem: ALSA complains in /var/log/messages when I plug in a USB2.0 hub that has an internal audio device.

Version-Release number of selected component (if applicable):
kernel-2.6.31.1-56.fc12.x86_64

How reproducible:

Steps to Reproduce:
1. hotplug USB2.0 hub with internal audio device
2.
3.

Actual results:
kernel: ALSA sound/usb/usbaudio.c:882: cannot submit datapipe for urb 0, error -28: not enough bandwidth

Expected results: no complaints

Additional info: the hub is "Bus=01 Lev=02" in the attached output from /proc/bus/usb/devices. Notice that the hub itself (and the internally connected video and ethernet devices, as well as the four empty ports on the hub) is high speed (480Mb/s) while the audio device is only full speed (12Mb/s).

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 364025
attachment info from /var/log/messages

Here is the record of the events in /var/log/messages when the hub is attached.

Revision history for this message
In , Chuck (chuck-redhat-bugs) wrote :

Can you also attach the output of 'lsusb -v'?

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 364044
lsusb -v

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , Chris (chris-redhat-bugs) wrote :

I suspect that this might have regressed between 2.6.29.5-191.fc11.x86_64
and 2.6.30.10-105.2.4.fc11.x86_64.

In my experience, on the former kernel, there are several things that can cause these messages:

  1) BIOS versions later than A14 for the Dell M4400.
  2) Powering the USB hub from the bus, rather than from external power.
  3) Using a USB hub that doesn't have one TT per port.

However, by avoiding those three conditions, I have been able to avoid those messages on 13 identical machines for the past 8 months or so.

Upgrading to 2.6.30.10-105.2.4.fc11.x86_64 is now on the list of things which
cause these messages to appear.

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

I have seen it on kernel-2.6.33.5-124.fc13.x86_64 but bus1dev7 works now now on
kernel-2.6.33.6-147.fc13.x86_64 , I think it is more random than kernel version dependent, though.
Bus 001 Device 008: ID 093a:2510 Pixart Imaging, Inc. Hama Optical Mouse
Bus 001 Device 007: ID 041e:3010 Creative Technology, Ltd SoundBlaster MP3+
Bus 001 Device 006: ID 04f2:0116 Chicony Electronics Co., Ltd KU-2971 German Keyboard
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC. USB-2.0 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
(lsusb -v upon request)

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

Created attachment 432694
lsusb -v

Using:
Bus 001 Device 011: ID 041e:3010 Creative Technology, Ltd SoundBlaster MP3+
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: MP3 [Sound Blaster MP3+], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

It works after reboot but when I try Twinkle it start to print:
kernel: ALSA sound/usb/usbaudio.c:882: cannot submit datapipe for urb 0, error -28: not enough bandwidth

killall pulseaudio; rmmod snd_usb_audio
unplug+plug USB device
modprobe snd_usb_audio
Does not help.

snd_hda_codec_atihdmi (blacklisted above) seems to play but nothing is heard.

Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 12 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora please change the 'version' of this
bug to the applicable version. If you are unable to change the version,
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 457973
/var/log/messages

Revision history for this message
In , John (john-redhat-bugs) wrote :

The symptom persists with Fedora 14. The attachment of Comment #9 has:
   Nov 4 17:13:53 f14-64 kernel: [ 45.638196] ALSA sound/usb/urb.c:838: cannot submit datapipe for urb 0, error -28: not enough bandwidth
with the usb device hot-plugged at:
   Nov 4 17:13:52 f14-64 kernel: [ 44.424094] usb 2-1: new high speed USB device using ehci_hcd and address 6

Revision history for this message
In , John (john-redhat-bugs) wrote :

I was working now for 2 day's on the problem:
"cannot submit datapipe for urb 0, error -28: not enough bandwidth".

finally - u cant imagine how simple it was - i found the reason and got my usb-sound back again.

the main reason was the "auto-mute feature" after changing audio source with pulse.

so try to go ahead.
 - open gnome-alsamixer or alsamixer
 - switch to tab USB Mixer
 - and increase master volume (Speaker) from zero to more...

here is the original source for this hint:
http://forum.ubuntuusers.de/topic/medusa-5-1-usb-headset/#post-2532118

looks like the errormessage above has nothing todo with missing sound.

hope this will help.

regards
ds

Revision history for this message
In , Jan (jan-redhat-bugs) wrote :

After I replaced the old Creative Labs USB audio for new noname USB audio devices I (also) no longer see this problem.
ID 041e:30d3 Creative Technology, Ltd
ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Revision history for this message
In , Joel (joel-redhat-bugs) wrote :

This happens to me when I plug an edirol UA25-ex in my system, and it believe it prevent jackd from working out of the box.

I remember having it work okay before, but now with F15 and F16 alpha it does not work well.

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 528147
/var/log/messsages at plugin of USB docking station

This persists in Fedora 16 beta; I change Version to 16. Here are is syslog (/var/log/messages). Note these lines:
-----
Oct 13 20:25:01 f16b64 kernel: [ 936.870268] usb 1-5.4: New USB device found, idVendor=0d8c, idProduct=0105
Oct 13 20:25:01 f16b64 kernel: [ 936.870273] usb 1-5.4: New USB device strings: Mfr=3, Product=1, SerialNumber=0
Oct 13 20:25:01 f16b64 kernel: [ 936.870277] usb 1-5.4: Product: USB Multimedia Audio Device
Oct 13 20:25:01 f16b64 kernel: [ 936.870280] usb 1-5.4: Manufacturer: C-Media Electronics Inc.
Oct 13 20:25:01 f16b64 kernel: [ 936.871910] input: C-Media Electronics Inc. USB Multimedia Audio Device as /devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.4/1-5.4:1.3/input/input5
Oct 13 20:25:01 f16b64 kernel: [ 936.872297] generic-usb 0003:0D8C:0105.0004: input,hidraw3: USB HID v1.00 Device [C-Media Electronics Inc. USB Multimedia Audio Device] on usb-0000:00:02.1-5.4/input3
Oct 13 20:25:01 f16b64 mtp-probe: bus: 1, device: 4 was not an MTP device
Oct 13 20:25:01 f16b64 mtp-probe: bus: 1, device: 5 was not an MTP device
Oct 13 20:25:01 f16b64 mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:02.1/usb1/1-5/1-5.4"
Oct 13 20:25:01 f16b64 mtp-probe: bus: 1, device: 7 was not an MTP device
Oct 13 20:25:01 f16b64 kernel: [ 937.035539] ALSA sound/usb/mixer.c:795 9:0: cannot get min/max values for control 2 (id 9)
Oct 13 20:25:01 f16b64 kernel: [ 937.035552] ALSA sound/usb/mixer.c:795 10:0: cannot get min/max values for control 2 (id 10)
Oct 13 20:25:01 f16b64 kernel: [ 937.035561] ALSA sound/usb/mixer.c:795 11:0: cannot get min/max values for control 2 (id 11)
Oct 13 20:25:01 f16b64 kernel: [ 937.037360] usbcore: registered new interface driver snd-usb-audio

Oct 13 20:25:01 f16b64 kernel: [ 937.460016] ALSA sound/usb/urb.c:813 cannot submit datapipe for urb 0, error -28: not enough bandwidth
-----

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 528148
lsusb -v

Revision history for this message
In , Brendan (brendan-redhat-bugs) wrote :

I've been experiencing the same problem.

There's a potential fix here with this patch: http://marc.info/?l=linux-usb&m=131973404328622

From what I could ascertain from the lkml I don't think it was merged for 3.2. I will try it when I get my hands back on my UA25EX.

Revision history for this message
David Monniaux (david-monniaux) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
David Monniaux (david-monniaux) wrote :

This problem is discussed here:
http://marc.info/?l=linux-usb&m=131973404328622

Revision history for this message
David Monniaux (david-monniaux) wrote :

Tried the patch from http://marc.info/?l=linux-usb&m=131973404328622
seems to work well so far, external sound card works in full duplex, no adverse effect. Am experimenting more.

tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Thomas Poussevin's patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

Revision history for this message
David Monniaux (david-monniaux) wrote :
Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Revision history for this message
David Monniaux (david-monniaux) wrote :

The above patch seems to solve the problem in most circumstances, but not always. Unsure about causes.

Revision history for this message
Xavier Gnata (xavier-gnata-gmail) wrote :

The above patch is included in the kernel 3.1.5 mainline.
AFAICS on my box runing a kernel 3.1.5 , the error -28 is gone and my sound card works flawlessly.

Revision history for this message
David Monniaux (david-monniaux) wrote :

Patch also in mainline kernel 3.2r5.

Revision history for this message
In , Dave (dave-redhat-bugs) wrote :

[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.

Revision history for this message
In , John (john-redhat-bugs) wrote :

Created attachment 572050
syslog (/var/log/messages) at hotplug of USB docking station

kernel-3.3.0-4.fc16.x86_64 no longer complain like originally. Here are the syslog lines which result from plugging in the USB docking station.

Revision history for this message
In , Joel (joel-redhat-bugs) wrote :

Tested with UA25ex in advanced mode. It is now working perfectly.

Very very nice!

Revision history for this message
In , Josh (josh-redhat-bugs) wrote :

*** Bug 654034 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Joel (joel-redhat-bugs) wrote :

Created attachment 574601
dmesg

My problems re-surfaced with kernel 3.3.0-8.fc17
and last kernel to work was 3.3.0-5.fc17

I attached dmesg, from which I had:
1. Booted up.
2. Started a folding@home client
3. Started xorg
4. Attempted to play mp3 trough MPD (actually gave me some seconds of audio)
5. MPD appeared to hang, and would not play upon restarting attempts.
6. Noticed dmesg
7. Tries to unplug USB from USB3.0, into a USB 2.0.
8. Get's the message about 'Not enough bandwidth' again, as pre 3.3.0 kernels.

Is it the same, or a new bug?

Revision history for this message
penalvch (penalvch) wrote :

David Monniaux, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

If reproducible, could you also please test the latest upstream kernel available (not the daily folder) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.13-rc5

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: bios-outdated-a24 needs-upstream-testing
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Benjamin McGough (bmcgough) wrote :

Just found the same issue with Saucy and upstream kernel 3.12.0-0312000-generic. Also seen on default saucy kernel (3.11.0-15).

tags: added: kernel-bug-exists-upstream kernel-bug-exists-upstream-3.12.0
Revision history for this message
penalvch (penalvch) wrote :

Benjamin McGough, thank you for your comment. So your hardware and problem may be tracked, could you please file a new report with Ubuntu by executing the following in a terminal while booted into a Ubuntu repository kernel (not a mainline one) via:
ubuntu-bug linux

For more on this, please read the official Ubuntu documentation:
Ubuntu Bug Control and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Kernel Team: https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

tags: removed: kernel-bug-exists-upstream kernel-bug-exists-upstream-3.12.0
Changed in linux (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
penalvch (penalvch) wrote :

OR using EOL release, and no response since 2013.

no longer affects: linux (Ubuntu)
affects: linux (Fedora) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Medium → Undecided
status: Fix Released → New
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.