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?
Ethernet noise interferance with a USB Sound card
7 posts
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
- 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
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
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
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.......
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: 371
- Joined: Sun Sep 30, 2012 2:22 pm
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.
Richard S.
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)
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
http://www.fadvisor.net/blog
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
http://www.fadvisor.net/blog