eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

USB Sound Card via USB Hub VS Rpi USB connector

Mon Feb 03, 2014 10:25 am

Hi All

I have installed the USB Sound card and observed the following:

1. Plug the USB sound card directly into Rpi produces good quality audio

2. Plug the same USB sound card to the USB Hub(externally powered) which is in turn connected to the Rpi produces crackling and unacceptable audio.

Anyone knows how to fix the cracking sound produced by USB Sound Card + USB Hub?

My environments is as follows:

Raspbian Wheezy
USB Sound Card - C-Media CM108 Audio Controller
USB Hub externally powered
Latest Raspberry Pi firmware as of the posted date.

Thank you in advance.

Regards

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: USB Sound Card via USB Hub VS Rpi USB connector

Mon Feb 03, 2014 11:48 am

Hi,
eone wrote:Plug the same USB sound card to the USB Hub(externally powered) which is in turn connected to the Rpi produces crackling and unacceptable audio.
Since the data between RasPi and the USB sound card is digital (with checksums, retires, etc.), the "music data quality" is in both cases exactly the same (hub is USB 2.0 and not 1.1, right ?).

I'd focus on a power supply of the hub. Replace it with another 5V power supply and most likely you will hear the difference.


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: USB Sound Card via USB Hub VS Rpi USB connector

Mon Feb 03, 2014 1:08 pm

Some USB hubs have poor performance on the Pi others may only be capable of 1.1 speeds like some 2.0 hubs sold at Poundland.
The likelihood is the hub is crap at sharing devices, I use my CM108 audio dongle on a PC with only USB 1.1 and it's perfectly fine.
Try comparing the time it takes to copy a large file from USB memory stick to the Pi with your USB hub and without the USB hub.

Richard S.

eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

Re: USB Sound Card via USB Hub VS Rpi USB connector

Mon Feb 03, 2014 4:45 pm

Hi all

I tested the USB Hub by using it on a desktop running Centos 6. The audio quality was good. So it cannot be the USB hub.

Regards

eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 3:34 am

Hi all

I made some experiment and discovered the following:

1. The hub is in self-powered mode (i.e power is drawn from wall socket) and 3 devices attached to it (keyboard, mouse and USB sound card) and connected to Rasp Pi.

2. The USB sound card was producing hissing and crackling audio.

3. When I unplug the keyboard and mouse, the USB sound card was immediately producing good quality audio.

The power adaptor of the 4-port USB hub is rated at 5V, 2.6A. Surely this is adequate to supply 500mA current to each of the 4 ports. Anybody can unravel this.

My USB hub information as reported by lsusb:

Device: ID 0409:0059 NEC Corp. HighSpeed Hub
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 9 Hub
bDeviceSubClass 0 Unused
bDeviceProtocol 1 Single TT
bMaxPacketSize0 64
idVendor 0x0409 NEC Corp.
idProduct 0x0059 HighSpeed Hub

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 4:01 am

You are experiencing the same issue that I am. If you let it continue I believe the kernel will panic.

For now the solution is to load the 2013-09-25 Raspian image.

The image archive is at http://downloads.raspberrypi.org/raspbian/images/

Bug report - https://bugs.launchpad.net/raspbian/+bug/1267696

Panic details - http://www.raspberrypi.org/phpBB3/viewt ... 66&t=68522
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 7:30 am

Hi Richard

After reading your post, I tried the following experiment:

1. Add another USB hub to Rpi. Now there is 2 seif-powered(external power supply) 4-port USB Hub connected to Rpi.

2. On the first USB hub, I connected keyboard and mouse.

3. On the second USB hub, I connected USB Sound Card, USB Drive and my Android Phone.

The result is that USB Sound Card is producing good quality audio. This suggest that the keyboard and the mouse is causing the issue.

I will try 2013-09-25 Raspian image as you suggested and will report on my findings.

Regards,
Irwan

User avatar
ragnarjensen
Posts: 332
Joined: Wed May 15, 2013 6:13 pm
Location: Stockholm, Sweden
Contact: Website

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 11:06 am

I had the same problem, but it went away when I switched to another hub.
eone wrote: bDeviceProtocol 1 Single TT
This might be the problem, the hub has only one Transaction Translator. The Transaction Translator is what translates USB1 to USB2.
When you have three USB1 devices (keyboard, mouse and sound card) competing for the lone Transaction Translator, the hub might struggle and start to drop packets. And lost packets in an audio stream is often heard as crackles.
My new hub is reported by lsusb as having bDeviceProtocol 2 TT per port, each USB1 device I plug in has its own TT.
3. When I unplug the keyboard and mouse, the USB sound card was immediately producing good quality audio.
The Sound Card is then the only USB1 device connected to the hub and can have exclusive access to the Transaction Translator.
3. On the second USB hub, I connected USB Sound Card, USB Drive and my Android Phone.
Assuming both the drive and the phone are USB2, you now have only one USB1 device in need of the Transaction Translator, and presumably it can keep up.
The result is that USB Sound Card is producing good quality audio. This suggest that the keyboard and the mouse is causing the issue.
Seeing as the Sound Card works when it is the sole USB1 device connected to the hub, I would try to get my hands on a hub with multiple transaction translators.
There are known problems in the USB implementation on the RPi, especially when using isochronous transactions, as from a sound scard.

http://www.raspberrypi.org/phpBB3/viewtopic.php?t=23544
https://github.com/raspberrypi/linux/issues/351

--
Ragnar

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 11:16 am

eone wrote:Hi Richard

This suggest that the keyboard and the mouse is causing the issue.

I will try 2013-09-25 Raspian image as you suggested and will report on my findings.

Regards,
Irwan
Inwan,

The keyboard and mouse aggravate the problem. I believe that the core issue is the driver. They changed something either in the kernel or in the USB driver code to where it just can't handle streaming audio over wifi and poll the keyboard and mouse at the same time.

Please let me know if the older image fixes your problem.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 12:04 pm

Hi ragnarjensen,

What is the brand and model of your USB hub that has bDeviceProtocol 2 TT per port? It'll be helpful to know. Otherwise buying a bDeviceProtocol 2 TT per port is a guessing game.

Hi Richard,

I installed the 2013-09-25 Rasbpian image and later the 2013-09-10 Raspbian image. Both images DID NOT resolve the issue.

The current work around for me then is to have 2 USB hubs. One for keyboard and mouse. The other hub for sound card and non-USB1 device.


Regards

User avatar
ragnarjensen
Posts: 332
Joined: Wed May 15, 2013 6:13 pm
Location: Stockholm, Sweden
Contact: Website

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 1:06 pm

My hub is just a black box, there are no brand or model names on it.
The chipset reported by lsusb is 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub

This one looks similar to mine and has the same chipset:
http://www.amazon.com/Plugable-Port-Spe ... 003Z4G3I6/

A couple of others:
http://www.amazon.com/Plugable-USB-Port ... B00483WRZ6
http://www.amazon.com/FORCETEK-7-Port-S ... 00ALJ2IDC/

--
Ragnar

eone
Posts: 10
Joined: Thu Jul 11, 2013 3:49 am

Re: USB Sound Card via USB Hub VS Rpi USB connector

Tue Feb 04, 2014 5:02 pm

Richard-TX wrote:
Inwan,

The keyboard and mouse aggravate the problem. I believe that the core issue is the driver. They changed something either in the kernel or in the USB driver code to where it just can't handle streaming audio over wifi and poll the keyboard and mouse at the same time.

Please let me know if the older image fixes your problem.
Richard,

I tested with 2013-02-09-wheezy-raspbian.img and the USB sound card was producing good quality audio. However, the mouse was very,very,very slow. I think you are right: it's either in the kernel or USB driver.

Regards

audetto
Posts: 30
Joined: Fri Feb 28, 2014 8:44 pm

Re: USB Sound Card via USB Hub VS Rpi USB connector

Fri Feb 28, 2014 9:23 pm

I have a very similar issues.

On the hub, as soon as there is some other usb activity, very bad sound (even after all other devices have been removed).

Directly into Pi, ok

My hub is

1a40:0101 Terminus Technology Inc. Hub

explicitly bought from modmypi for its great qualities....

Return to “Troubleshooting”