Ethernet noise interferance with a USB Sound card


14 posts
by FADpi » Wed Nov 07, 2012 12:03 am
I got a cheap USB sound card from ebay which uses C-Media chipset it has two ports (Mic and Headphone). It works great on my laptop, the sound quality is very good when recording and playing back. However, when I used it on the RPi I found that the ethernet actually interfere and add noise to the recorded sound. When I unplug the ethernet cable those noises are almost gone.

So to summarize:
# No network activities:
- Not doing anything (or playing a normal sound file) -> No noise at all
- Recording with cable disconnected -> Almost no noise
- Recording with cable connected -> Repeating noise

# With network activities: (i was coping files to RPi over sftp)
- Not doing anything -> Repeating noise

This is only happening with the USB sound card, I didn't hear any noise from the built-in audio port while coping files over.

I would of blamed my cheap sound card, but it works great with my laptop. Is it a problem with RPi design? Have any of you guys tried a better sound card?
Fahad
http://www.fadvisor.net/blog
User avatar
Posts: 10
Joined: Tue Nov 06, 2012 10:52 pm
by stinos » Wed Nov 07, 2012 8:47 am
imo there are two possibilities:
- when ethernet consumes power, this is reflected as a variation of the voltage on the USB line and your soundcard has poor voltage regulation inside so the variation of the input voltage makes it into the analog circuitry. This seems the most likely to me. Can be verified if you have an oscilloscope to measure voltages on the usb line.
- when ethernet is working it simply generates noise, and this noise is picked up by the analog circuitry because it is not shielded properly (so the noise doesn't propagate through the usb line but simply through the air). Would this be the case, you can verify this: plug the soundcard into your laptop, do a recording while at the same time making ethernet work hard on the Pi and putting the Pi near the soundcard
Posts: 21
Joined: Tue Oct 30, 2012 4:57 pm
by pluggy » Wed Nov 07, 2012 10:54 am
The Pi has USB issues other than the power issues already mentioned, (see the Elephant in our room thread in troubleshooting) it manifests iteself worst with audio devices and web-cams. You could try adding

Code: Select all
dwc_otg.speed=1


to /boot/cmdline.txt

It switches the USB down to USB.1.1 speeds and generally improves things for audio devices. Unfortunately it nails your ethernet speed as well.

Things have improved dramatically in the last few months so make sure you have the latest updates with :

Code: Select all
sudo apt-get update
sudo apt-get upgrade
Don't judge Linux by the Pi.......
User avatar
Posts: 2514
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by ski522 » Wed Nov 07, 2012 11:16 am
Rap your USB sound card in aluminum foil and see if the noise goes away. The card you have has no internal shielding, so it's possible that you're picking up some EMF from the ethernet cable.
Posts: 394
Joined: Sun Sep 30, 2012 2:22 pm
by redhawk » Wed Nov 07, 2012 11:59 am
Use a USB cable extender and move your dongle further away from the ethernet port if that doesn't help add a clip-on ferrite core with 1 or 2 loops.

Richard S.
User avatar
Posts: 3519
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by FADpi » Wed Nov 07, 2012 4:53 pm
Thank you all for the responses.

After doing some tests based on what you guys suggested I can say it is not an EMF issue, since aluminum shielding, cable extender and being near the Ethernet cable didn't change (increase or decrease) the noise and it remained as is. I also ran my Pi with a 5v 2A power adapter (instead of my laptop USB) still the same problem.

However, I used a powered USB hub and plugged the sound card into one of its ports and the noise is gone. No noise when coping files over the ethernet and when recording. So I think what "stinos" suggested first is correct where the power consumed by the ethernet is causing variations leading to this noise.

Can I mitigate this effect by connecting a capacitor to the voltage pins on the sound card? (a decoupling capacitor)
Fahad
http://www.fadvisor.net/blog
User avatar
Posts: 10
Joined: Tue Nov 06, 2012 10:52 pm
by FADpi » Wed Nov 07, 2012 8:45 pm
I tested the same sound card with the new RPi Rev2 (512MB) and I did not encounter any noise. It seems that they have solved the ethernet interference issue in the new design.
Fahad
http://www.fadvisor.net/blog
User avatar
Posts: 10
Joined: Tue Nov 06, 2012 10:52 pm
by karamarka » Thu Feb 20, 2014 10:52 am
The B model does indeed have this issue.
I tried with different shielded audio jack cables and I kept hearing a tactactactactac sort of noise whenever the Ethernet cable was plugged in. Also tried with shielded network cables, as well. Disconnecting it stopped the background noise completely.

Some suggest to go wireless, but of course I`d avoid cooking myself in microwaves just to watch a movie...
Posts: 1
Joined: Thu Feb 20, 2014 10:46 am
by edfardos » Thu Apr 10, 2014 9:57 pm
nope, wifi wont help either. I came across this thread trying to figure out why my usb audio dongle clicked and popped whenever there was wifi network activity.

I'm only using audio (upnp stream client), I can only imagine how bad it is with video. Things like Pandora/pianobar pre-buffer most of a song, so you never notice it. but others, gmediarender, it pops and glitches full time.

It's not RF as you discovered. I chuckled when you mentioned tinfoil (in which my dongle is currently wrapped).

Possibly bus saturation, or power drops. Not sure how to isolate nor debug either on the Pi.

--edfardos
Posts: 6
Joined: Thu Apr 10, 2014 9:52 pm
by edfardos » Thu Apr 10, 2014 11:31 pm
Just to follow up, after hours of research, it's not an RF, nor a USB issue. It's a firmware problem. Downgrading to May24-2013 firmware 001a8517f67182c278e1eff33f1fc2aac0bb22cc completely fixed the problem. Be advised that this firmware only works on older raspberry pi's. On new pi's, the activity light blinks 8 times because of the new sdram hardware, and will not boot.

Luckily i have more than one pi.

I also have no idea how to go about figuring out which commit broke the usb audio dongle when there's usb network activity (other than installing 100's of firmware's).

--edfardos
Posts: 6
Joined: Thu Apr 10, 2014 9:52 pm
by edfardos » Fri Apr 11, 2014 1:02 am
rpi-update 98f31dca01cf0d7dcccc4e3ddaf627ba3303b7d6 #aug15-2013

no network pops
no guitar-like distortion for mpg123 and gmediarenderer

newer than that and you get network pops
older than that and you get guitar-like distortion with mpg123 and gmediarender

I did a logarithmic deduction between May2013, and April2014. only took me 4 updates


--edfardos
Posts: 6
Joined: Thu Apr 10, 2014 9:52 pm
by Richard-TX » Fri Apr 11, 2014 1:51 am
edfardos wrote:rpi-update 98f31dca01cf0d7dcccc4e3ddaf627ba3303b7d6 #aug15-2013

no network pops
no guitar-like distortion for mpg123 and gmediarenderer

newer than that and you get network pops
older than that and you get guitar-like distortion with mpg123 and gmediarender


That sounds about right.

The 12-20-2013 and later releases have a few issues. At this point in time the 9-25-2013 release is all that I will run.
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
User avatar
Posts: 1292
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas
by edfardos » Fri Apr 11, 2014 3:14 am
Whew, okay, so it's not just me. Distortion was fixed at some point, but network-activity pops were introduced some time later. The in-between builds are the only solution.

I'm wondering if there's a build that supports the latest sdram chip shipping on new pi's? Is it possible to get no distortion, no network-activity noise, and boot the latest hardware?

curiously,
-edfardos
Posts: 6
Joined: Thu Apr 10, 2014 9:52 pm
by loophie » Thu Jun 05, 2014 5:47 pm
hi, I have same problem with USB soundcard. i have DSP project using simulink and run it in Raspberry Pi.
when I playback the audio sound, it work properly. But, when I combine with audio capture, the noise is interupting the sound from mic. I use Raspbian 2013-09-25-wheezy-raspbian. My project run in the Raspberry Pi without ethernet activy. is there anyone know about my problem?
thanks..
Posts: 4
Joined: Wed Mar 12, 2014 7:20 pm