pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Background Noise on Audio

Fri Nov 30, 2018 2:34 pm

Hey all! :-)

I recently built an audioplayer using a Raspberry Pi 3 B+. I wanted the headless possibility to use Airplay (for Tidal) and play music from my Home-NAS on my Stereo-Receiver, so using Volumio was my obvious choice. As the integrated 3,5mm audiojack has a rather bad reputation, I also ordered a HiFiBerry Digi+ (Standard) to connect the Pi via TOSLINK to my Receiver. That should provide a bit-perfect output and distortion-free connection.

To my understanding, that should have been a good setup... BUT:
There is a background noise, that is driving me crazy by now. As soon as I start playblack, the noise starts. In quiet parts of the music, it still is hearable, and as soon as I stop the playback, the noise stops about 3 seconds later.

I tried to get rid of the noise as follows:

Audio-Out
- Optical-Out of the HiFiBerry
- integrated 3,5mm Audiojack-Out

Noise still there.
(I have no possibility to test the HDMI-Out)

Power-Source:
As I have read a lot about Power-related noise, I tried:
- this PSU: https://www.amazon.de/gp/product/B01N6FD57M
- an Apple-PSU (as they are supposed to be low on noise)
- a lying-around LG PSU
- a Powerbank as independent powersource
- all of the above on different power-outlets all around the house

Noise still there.

Case:
I'm using HiFiBerry-Case (https://www.amazon.de/gp/product/B01FJSU7OQ)
But you never know... so I tried no case.

Noise still there.

Music Sources:
- Different tracks
- Different files
- Different formats (mp3, Flac, Airplay)
- Different sources (NAS, Airplay, Pi Local SD Storage, Internetradio)

Noise still there.

Distribution:
- Volumio
- Moode Audio

Noise still there.

HiFiBerry:
I uninstalled the HiFiBerry Board.

Noise still there.

Other Hardware
- Headphones on Pi
- Different Headphones on Pi
- Audiojack to receiver
- Toslink to receiver

Noise still there.

Network config
- Wifi 2,4 GHz (No ethernet cable connected)
- Wifi 5 GHz (No ethernet cable connected)
- Changed Wifi-channels in router
- Ethernet-connection - Wifi completely disabled

You guessed it: Noise still there.

I am running out of ideas in terms of simple connections and hardware configurations.
All of the above, in all kind of different variations, does not reduce or alter the noise.

Does anyone have some hints or ideas where to go from here?
Any help is much appreciated!

Have a nice weekend,
pucksen

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Fri Nov 30, 2018 6:23 pm

The TYPE of noise might help identify its source.

Hiss? High/Low?
Hum?
Crackling?
Buzzing?

Is it affected by the volume control?

If you have more than one place where you can adjust the volume, maybe your "gain staging" is at fault. If what you're actually hearing is the noise floor, try turning the volume DOWN later in the chain and UP earlier in the chain.

I guess you also ought to try an official Pi 5V 2.5A PSU.

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Fri Nov 30, 2018 11:29 pm

The noise actually sounds a lot like white noise.

If I understand that right, my chain basically consists of the Pi and my amp/or headphones. Right now I am using the Pi -> Toslink -> Amp Scenario for testing, as there was no difference between this one and Pi -> audiojack -> headphones in previous testing.

When I use the HiFiBerry Optical Out, there is no option to control the volume other than on my amplifier. If I change volume on my amp, the noise's volume is changing too, but so does the music volume. The noise volume stays the same relative to the other sound output.

This evening I tried a clean install of Raspbian, installed nothing but shairplay, played some music over Airplay, and... Noise is still there.

I already ordered the official PSU, which should arrive in the next few days. But since the problem persisted even in a Powerbank/Battery Setup, I actually don't think it will make a difference.

EDIT: Typo

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Sat Dec 01, 2018 5:33 pm

Is it possible that the audio file you're trying to play has been digitized at a very low audio level?

To test/eliminate this possibility, do you have any other (non-Pi) device that can feed the same audio file to your amp?

Is there an analogue output you can try on the HiFiBerry? Which maybe DOES have a volume control? (In which case you would be looking to turn that up high (and turn your amp volume down first!)

----

Edit: Sorry - just re-read your original post - it looks like you've tried all these avenues.

User avatar
Burngate
Posts: 6046
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Background Noise on Audio

Sat Dec 01, 2018 6:07 pm

I find it suspicious that the white noise starts immediately, but takes three seconds to stop. As if whatever's reading the file and pushing it out takes three seconds to work out the file's finished and shut itself down.

It's probably difficult to do, but I'd be thinking about creating two files, one containing a 1kHz tone at full scale, and the other with absolute silence.
That would give you an idea about the level of the noise.

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Sat Dec 01, 2018 7:10 pm

Good idea, Burngate. I have such test audio files available that I use for this type of thing.

Pucksen, if you are up to try it, download and expand the zip file attached to this post below.

It contains a 44.1kHz stereo 16-bit .aif file (= .wav file) that has a 1kHz test tone on both-, left-only, right-only then both- again channels, each interspersed with 2 seconds of silence.

It is a "-12dB" signal, so it shouldn't blow your speakers/headphones!! It's a 16-bit audio file, so the noise should be something like -96dB down from full scale, or -84dB down from the signal level in the file... i.e. pretty much inaudible.

There is a timeline screengrab included in the folder, that shows the audio waveform pattern.

Does that show the noise?
Attachments
16s B-R-L-B-.zip
Audio Test Files
(37.86 KiB) Downloaded 22 times

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Sat Dec 01, 2018 10:37 pm

Burngate wrote:
Sat Dec 01, 2018 6:07 pm
I find it suspicious that the white noise starts immediately, but takes three seconds to stop. As if whatever's reading the file and pushing it out takes three seconds to work out the file's finished and shut itself down.
I did some additional testing on the built-in audiojack today.
I noticed that the noise does not stop after playback when I use the audiojack.
After a reboot, there is no noise until I start to play something. Before that there is absolute silence on the headphones.
So I think the noise stopping after 3 seconds was just the because of the optical signal shutting down when there is no playback.

As alsamixer is working when I use the audiojack, I now know that the noise-level always stays the same. Changing volume in alsamixer only changes the volume of the audio, the noise keeps its level.

Playing back mooblie's test file gives me the noise all the way through. I rebooted the Pi, started playback of the file, noise begins and stays. So it seems like as soon as the sound output activates, there is the noise.

My official PSU should arrive on Tuesday, I am starting to hope that somehow all my power sources are somehow f*d up. Even it does not make that many sense ;-)

drgeoff
Posts: 9885
Joined: Wed Jan 25, 2012 6:39 pm

Re: Background Noise on Audio

Sat Dec 01, 2018 11:14 pm

ISTR talk of dither being applied to make the approx 11 bit PWM DAC analogue audio out sound a bit better. Is that enabled and present even on a digital output from the RPi?

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Mon Dec 03, 2018 4:43 pm

drgeoff wrote:
Sat Dec 01, 2018 11:14 pm
ISTR talk of dither being applied to make the approx 11 bit PWM DAC analogue audio out sound a bit better. Is that enabled and present even on a digital output from the RPi?
If it were the case that dither is causing the OP's noise, wouldn't everyone taking sound out of the Pi have heard it too?

drgeoff
Posts: 9885
Joined: Wed Jan 25, 2012 6:39 pm

Re: Background Noise on Audio

Mon Dec 03, 2018 5:25 pm

mooblie wrote:
Mon Dec 03, 2018 4:43 pm
drgeoff wrote:
Sat Dec 01, 2018 11:14 pm
ISTR talk of dither being applied to make the approx 11 bit PWM DAC analogue audio out sound a bit better. Is that enabled and present even on a digital output from the RPi?
If it were the case that dither is causing the OP's noise, wouldn't everyone taking sound out of the Pi have heard it too?
True, but perhaps the OP's tolerance of such noise is much less.

We've been given no info about the SNR.

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Tue Dec 04, 2018 9:38 am

drgeoff wrote:
Mon Dec 03, 2018 5:25 pm

True, but perhaps the OP's tolerance of such noise is much less.

I would rule that out. I dont think I have a particularly good sense of hearing. I am no paranoid audiophile who can hear the streetlights in his audio... (no offence!) ;)

As for the SNR, I have no idea how i would actually measure that. All I can say is that the noise stays clearly audible in the silence-parts of mooblie‘s testfile.

Today my official PSU arrives, and I will report back later if that actually changes anything.
If it does not, I am tempted to buy a USB soundcard, or another Pi (maybe mine simple is faulty?)


Edit: typo

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Wed Dec 05, 2018 8:06 pm

pucksen wrote:
Tue Dec 04, 2018 9:38 am

Today my official PSU arrives, and I will report back later if that actually changes anything.
If it does not, I am tempted to buy a USB soundcard, or another Pi (maybe mine simple is faulty?)
It did not change anything.

I tried to fiddle around with /etc/asound.conf as I found this thread: https://discourse.osmc.tv/t/external-us ... und/532/16, but that did not change anything as well.

I read about some GPU-related noise-issues elsewhere, but don't know where to start on this...

:cry:

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Wed Dec 05, 2018 9:15 pm

Hmm. Sympathies!

Can you get/try another Pi?

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Wed Dec 05, 2018 10:15 pm

Thanks mooblie!

I just ordered another board that will arrive on friday. I'll keep you posted! :-)

pucksen
Posts: 7
Joined: Fri Nov 30, 2018 2:31 pm

Re: Background Noise on Audio

Fri Dec 07, 2018 3:08 pm

mooblie wrote:
Wed Dec 05, 2018 9:15 pm
Can you get/try another Pi?

I got a new one. Same thing. I really don't get it. :?

User avatar
mooblie
Posts: 125
Joined: Fri Oct 14, 2016 2:07 pm
Location: The Scottish Highlands

Re: Background Noise on Audio

Fri Dec 07, 2018 5:12 pm

Just re-read your first post. You've changed everything?!
I am lost for further ideas too. :( Sorry.

Return to “Troubleshooting”