Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#1213 closed bug (fixed)

Music output fails

Reported by: powerpee@… Owned by:
Priority: normal Milestone: Firmware 2.3.7.0
Component: fon-plugin-music Version: 2.3.7.0 beta3
Severity: unknown
Cc: Hardware: 2.0n (FON2300)

Description

Did an update from beta 2 to beta 3, with Music 1.7 in both occasions. Music played fine on beta 2, but doesn't output on beta 3.

Hardware: Auzentech Aureon USB soundcard

Tried:

  • rebooting,
  • rebooting without USB soundcard,
  • reinstalled Music 1.7,
  • reinstalled Music 1.6 +MPD,
  • different USB port,

Symptom: audio cards is detected, but music files play back within a couple of seconds (as if the playback speed is too high).

ssh: Audiod is already in use.

Attachments (0)

Change History (22)

comment:1 Changed 7 years ago by matthijs

  • Milestone set to Firmware 2.3.7.0
  • Status changed from new to confirmed

Hmm, I think I'm seeing the same problem here, no audio output and songs change very quickly.

When connecting with SSH and running the "logread" command, I see a lot of these messages:

Jul 31 13:01:59 Fonera user.err kernel: cannot submit datapipe for urb 0, error -22: internal error

Could you see if you have these messages as well (see reportbugs for info on running commands on your Fonera), to confirm we're seeing the same problem?

I have hunch that this might be caused by the updated USB driver for some reason, I'll investigate further.

comment:2 follow-up: Changed 7 years ago by matthijs

Ok, some further investigation shows that I can play audio just fine when I connect the audio device directly to the Fonera, without an USB hub in between (using a radio stream, since I can't connect an USB stick in this case, I used http://sradio.tv/asx/867.asx).

When I have an USB hub, I also see the following messages (just once, after that they are drowned in the "cannot submit datapipe" messages:

DWC_otg: check_periodic_bandwidth: already claimed usecs 1, required usecs 163
DWC_otg: schedule_periodic: Insufficient periodic bandwidth for periodic transfer.
DWC_otg: DWC OTG HCD URB Enqueue failed adding QTD. Error status -28

I think this is common problem with cheap USB hubs and USB 1 audio devices, since cheap USB hubs only have on Transaction Translator (TT), which is responsible for translating USB 1 to USB 2, meaning there is only limited bandwidth available for the audio device (because the bandwidth needs to be shared). However, this should normally only be a problem when connection multiple USB 1 devices, which is not the case here.

Did you perhaps change something in your hardware setup between beta2 and beta3?

I'll see what happens when I use the old USB driver.

comment:3 in reply to: ↑ 2 Changed 7 years ago by anonymous

OK, I haven't changed anything in the hardware.

The Hub I'm using is an externally powered: ICIDU AL-707906 (see http://www.icidu.com/nl/usb-hub/usb-2-0-hub-4-ports.html. This HUB was not dirty cheap, although that doesn't say a thing in china.

I haven't tested the soundcard directly connected to the Fon.

Replying to matthijs:

Ok, some further investigation shows that I can play audio just fine when I connect the audio device directly to the Fonera, without an USB hub in between (using a radio stream, since I can't connect an USB stick in this case, I used http://sradio.tv/asx/867.asx).

When I have an USB hub, I also see the following messages (just once, after that they are drowned in the "cannot submit datapipe" messages:

DWC_otg: check_periodic_bandwidth: already claimed usecs 1, required usecs 163
DWC_otg: schedule_periodic: Insufficient periodic bandwidth for periodic transfer.
DWC_otg: DWC OTG HCD URB Enqueue failed adding QTD. Error status -28

I think this is common problem with cheap USB hubs and USB 1 audio devices, since cheap USB hubs only have on Transaction Translator (TT), which is responsible for translating USB 1 to USB 2, meaning there is only limited bandwidth available for the audio device (because the bandwidth needs to be shared). However, this should normally only be a problem when connection multiple USB 1 devices, which is not the case here.

Did you perhaps change something in your hardware setup between beta2 and beta3?

I'll see what happens when I use the old USB driver.

comment:4 Changed 7 years ago by powerpee@…

The Terratec Aureon DUAL USB states to be 1.1 and 2.0/3.0 compatible(doh). [ http://www.terratec.net/en/products/Aureon_Dual_USB_9842.html]

Can you advice me another HUB, So I can test if this solves this problem?

comment:5 Changed 7 years ago by matthijs

Hmm, I think I had the same Aureon adapter and it really talked USB1 instead of 2 (which still means it's USB2/3 "compatible", of course...). I can't double-check, though, since I broke that device a few weeks ago.

Finding a hub with multiple TT's is a bit of a challenge, since no manufacturer actually lists this as a feature. But if this used to work with beta2, it's probably too early to be swapping out hardware and we need to look into software first :-)

It would help if you could leave open an SSH prompt and run the command "logread -f" to log kernel messages, while you plug in the USB sound card into the hub and start playback of an mp3. If you could copy-paste the messages logread -f outputs here, that would help to verify that we're in fact looking at the same problem. (don't bother to copy-paste all the repeated "cannot submit datapipe" errors if you have them, though, just one is enough).

comment:6 Changed 7 years ago by powerpee@…

here goes:

Jul 31 14:22:02 Fonera user.debug kernel: hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0010
Jul 31 14:22:02 Fonera user.debug kernel: hub 1-1:1.0: port 4, status 0101, change 0001, 12 Mb/s
Jul 31 14:22:02 Fonera user.debug kernel: hub 1-1:1.0: debounce: port 4: total 100ms stable 100ms status 0x101
Jul 31 14:22:02 Fonera user.debug kernel: hub 1-1:1.0: port 4 not reset yet, waiting 10ms
Jul 31 14:22:02 Fonera user.info kernel: usb 1-1.4: new full speed USB device using dwc_otg and address 6
Jul 31 14:22:02 Fonera user.debug kernel: hub 1-1:1.0: port 4 not reset yet, waiting 10ms
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: ep0 maxpacket = 8
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 10 descriptors after interface
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 2 descriptors after interface
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 1 descriptor after endpoint
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 2 descriptors after interface
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 1 descriptor after endpoint
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: skipped 1 descriptor after interface
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: default language 0x0409
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: new device strings: Mfr=1, Product=2, SerialNumber=0
Jul 31 14:22:02 Fonera user.info kernel: usb 1-1.4: Product: USB PnP Sound Device
Jul 31 14:22:02 Fonera user.info kernel: usb 1-1.4: Manufacturer: C-Media Electronics Inc.      
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: uevent
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: usb_probe_device
Jul 31 14:22:02 Fonera user.info kernel: usb 1-1.4: configuration #1 chosen from 1 choice
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: adding 1-1.4:1.0 (config #1, interface 0)
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4:1.0: uevent
Jul 31 14:22:02 Fonera user.debug kernel: snd-usb-audio 1-1.4:1.0: usb_probe_interface
Jul 31 14:22:02 Fonera user.debug kernel: snd-usb-audio 1-1.4:1.0: usb_probe_interface - got id
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: adding 1-1.4:1.1 (config #1, interface 1)
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4:1.1: uevent
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: adding 1-1.4:1.2 (config #1, interface 2)
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4:1.2: uevent
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4: adding 1-1.4:1.3 (config #1, interface 3)
Jul 31 14:22:02 Fonera user.debug kernel: usb 1-1.4:1.3: uevent
Jul 31 14:22:02 Fonera user.debug kernel: drivers/usb/core/inode.c: creating file '006'
Jul 31 14:22:02 Fonera user.info : sed: /sys//devices/lm0/usb1/1-1/1-1.4/serial: No such file or directory
Jul 31 14:22:02 Fonera user.notice usb-modeswitch: 1-1.4:1.0: Manufacturer=C-Media_Electronics_Inc. Product=USB_PnP_Sound_Device Serial=?
Jul 31 14:22:03 Fonera user.info : 1781
Jul 31 14:22:03 Fonera user.crit fonstated: enqueue --> RestartAudiod
Jul 31 14:22:03 Fonera user.crit fonstated: running event /etc/fonstated/RestartAudiod
Jul 31 14:22:03 Fonera user.crit fonstated: finished running /etc/fonstated/RestartAudiod
Jul 31 14:22:04 Fonera user.info : sed: /sys//devices/lm0/usb1/1-1/1-1.4/serial: No such file or directory
Jul 31 14:22:04 Fonera user.notice usb-modeswitch: 1-1.4:1.1: Manufacturer=C-Media_Electronics_Inc. Product=USB_PnP_Sound_Device Serial=?
Jul 31 14:22:04 Fonera user.info : sed: /sys//devices/lm0/usb1/1-1/1-1.4/serial: No such file or directory
Jul 31 14:22:04 Fonera user.notice usb-modeswitch: 1-1.4:1.2: Manufacturer=C-Media_Electronics_Inc. Product=USB_PnP_Sound_Device Serial=?
Jul 31 14:22:04 Fonera user.info : sed: /sys//devices/lm0/usb1/1-1/1-1.4/serial: No such file or directory
Jul 31 14:22:04 Fonera user.notice usb-modeswitch: 1-1.4:1.3: Manufacturer=C-Media_Electronics_Inc. Product=USB_PnP_Sound_Device Serial=?
Jul 31 14:22:42 Fonera user.notice kernel: DWC_otg: check_periodic_bandwidth: already claimed usecs 1, required usecs 163
Jul 31 14:22:42 Fonera user.notice kernel: DWC_otg: schedule_periodic: Insufficient periodic bandwidth for periodic transfer.
Jul 31 14:22:42 Fonera user.err kernel: DWC_otg: DWC OTG HCD URB Enqueue failed adding QTD. Error status -28
Jul 31 14:22:42 Fonera user.err kernel: cannot submit datapipe for urb 0, error -28: not enough bandwidth
Jul 31 14:22:42 Fonera user.err kernel: cannot submit datapipe for urb 0, error -22: internal error


comment:7 follow-up: Changed 7 years ago by matthijs

Ok, that's the same errors I'm seeing here, so that's good.

From the log, I see this is a "full speed" device, which is an USB 1 speed, not USB 2 (though USB 2 still uses the lower speeds I guess). So this means it needs a TT for its data transfers.

I've also been looking at the code and I have sneaky suspicion that the previous driver version might have contained a bug which caused it not to notice that there's not enough guaranteed bandwidth (but for some reason it _did_ work, even though it wasn't supposed to or guarenteed to). I'm not completely sure, still digging in the sources and specs.

In any case, thanks for the information you supplied, I'll be digging into this a bit further. If there's any progress, I'll let you know.

comment:8 in reply to: ↑ 7 Changed 7 years ago by anonymous

Hi Matthijs,

The brand "Ultron" sells USB hubs which can host up to 127 devices, making it a Multi-TT Hub (says a forum member somewhere). Now, can you reason that USB 3.0 devices will always have multiple TT connections?

Looking forward to hearing from you.

Replying to matthijs:

Ok, that's the same errors I'm seeing here, so that's good.

From the log, I see this is a "full speed" device, which is an USB 1 speed, not USB 2 (though USB 2 still uses the lower speeds I guess). So this means it needs a TT for its data transfers.

I've also been looking at the code and I have sneaky suspicion that the previous driver version might have contained a bug which caused it not to notice that there's not enough guaranteed bandwidth (but for some reason it _did_ work, even though it wasn't supposed to or guarenteed to). I'm not completely sure, still digging in the sources and specs.

In any case, thanks for the information you supplied, I'll be digging into this a bit further. If there's any progress, I'll let you know.

comment:9 Changed 7 years ago by matthijs

Ok, I think this is a bug in the usb driver after all. It seems they're comparing USB full speed (USB 1) transfer times with hi speed (USB 2) transfer times, which makes it look like the audio device needs a humongous amount of bandwidth, while it really doesn't. This is caused by a change introduced by the recent driver update. I'll need to look closer about fixing this properly, but worst case we can just revert the relevant part back to the previous driver version to fix this, I think.

As for these hubs for up to 127 devices, I think that that's really just the limit of an USB bus, which can address 127 devices. Multi-TT is not related to the amount of devices it can connect, but to the amount of bandwidth available to low/full speed (USB1) devices.

How USB3 fits into this, I'm completely unsure, I haven't looked into that protocol at all.

For now, I wouldn't waste any money trying to find a better USB hub, since it really looks like it should work with a single-TT hub as well (as long as you're not going to connect a lot of other USB1 devices that need dedicated bandwidth, like mice or webcams to your Fonera).

comment:10 follow-up: Changed 7 years ago by matthijs

  • Status changed from confirmed to testing-fix

In the meanwhile I (finally!) managed to get my hands on an even newer driver version from Ralink (download kept aborting or producing corrupt files...). However, this driver version does not actually change anything, except for adding support for newer kernels.

I might try contacting Ralink about this to find out why they made this change in the first place, but for now I'll settle with just reverting the offending part of the driver update to at least make USB audio devices work again. I'm testing this change now, I'll push it to the svn repository once I'm satisfied.

comment:11 in reply to: ↑ 10 Changed 7 years ago by anonymous

Hi Matthijs,

Obscure Ralink server I guess. I appreciate the effort. Can you keep me informed on a new release with updated / reversed USB driver?

thnx

Replying to matthijs:

In the meanwhile I (finally!) managed to get my hands on an even newer driver version from Ralink (download kept aborting or producing corrupt files...). However, this driver version does not actually change anything, except for adding support for newer kernels.

I might try contacting Ralink about this to find out why they made this change in the first place, but for now I'll settle with just reverting the offending part of the driver update to at least make USB audio devices work again. I'm testing this change now, I'll push it to the svn repository once I'm satisfied.

comment:12 Changed 7 years ago by matthijs

I'll leave a comment here!

comment:13 follow-up: Changed 6 years ago by matthijs

  • Resolution set to fixed
  • Status changed from testing-fix to closed

(In [2134]) kernel: Make isochronous usb devices work again.

This fixes a bug introduced by Ralink in the last driver update, by simply reverting a very small part of the update. It's unclear what this change was intended for, but reverting it makes isochronous usb devices work again.

In particular, this fixes USB audio devices and makes the music plugin work again.

See the patch file for a more detailed analysis.

Closes: #1213

comment:14 in reply to: ↑ 13 Changed 6 years ago by anonymous

Hi Matthijs,

I don't know how to install this fix (or if this is possible). Sorry for the N00b question, but can I patch my current dev to have the problem solved?

thnx, Pee

Replying to matthijs:

(In [2134]) kernel: Make isochronous usb devices work again.

This fixes a bug introduced by Ralink in the last driver update, by simply reverting a very small part of the update. It's unclear what this change was intended for, but reverting it makes isochronous usb devices work again.

In particular, this fixes USB audio devices and makes the music plugin work again.

See the patch file for a more detailed analysis.

Closes: #1213

comment:15 Changed 6 years ago by matthijs

You'll have to install a different firmware build, since the change affects the kernel (which can't be replaced by itself). I was going to point you at the relevant firmware build from our auto-builder, but we're having some problems with that machine, so it's not available yet.

I'll get back to you when the build is done!

comment:16 Changed 6 years ago by anonymous

The build is done!

You can download it from here: http://download.fonosfera.org/auto-builds/fon-ng/fon-ng-r2141/fonera2n/

There's also install instructions there (you probably want to use the tarball version).

Let me know if this build fixes the problem for you!

comment:17 Changed 6 years ago by powerpee@…

Yes; updated today and music playback is fine again.

Hell of a THANK YOU!!

keep up the good work.

-Pee

comment:18 Changed 6 years ago by powerpee@…

One little thing: Playing back music and uploading files at the same time causes the sound output to crackle. I don't know if it used to do this before, or if this is a new bug?

comment:19 follow-up: Changed 6 years ago by matthijs

I think this might be a common problem with USB audio, keeping it busy with audio data takes more CPU time than a regular sound card.

I'm not sure if this also happened with earlier firmware versions. Perhaps you'd like to do a quick test with 2.3.6.1?

comment:20 in reply to: ↑ 19 Changed 6 years ago by anonymous

Yes, I would love to, but am so happy things are finally running the way I want them that I am not eager to give this a try.

Replying to matthijs:

I think this might be a common problem with USB audio, keeping it busy with audio data takes more CPU time than a regular sound card.

I'm not sure if this also happened with earlier firmware versions. Perhaps you'd like to do a quick test with 2.3.6.1?

comment:21 follow-up: Changed 6 years ago by matthijs

Sure, no problem. I'll give this a try when I need to flash 2.3.6.1 for some other testing.

What kind of "uploading files" do you mean exactly? Copying files to the Fonera using Windows file sharing, using the Picasa/Flickr?/etc uploaders or something else?

comment:22 in reply to: ↑ 21 Changed 6 years ago by anonymous

I used FTP access tot the Fonera via Wifi. I've tried throttling the max upload speed, but this didn't help much.

Replying to matthijs:

Sure, no problem. I'll give this a try when I need to flash 2.3.6.1 for some other testing.

What kind of "uploading files" do you mean exactly? Copying files to the Fonera using Windows file sharing, using the Picasa/Flickr?/etc uploaders or something else?

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.