12

I'm having the following issues with my amp on the Raspberry Pi 2, Model B.

  1. Boot up the Pi, everything sounds great.
  2. Play a sound byte through the Pi (using ALSA)
  3. Speakers hiss regardless of PCM being "muted" (using alsamixesr) or having a any kind of volume.

I have set disable_audio_dither=1 in the /boot/config.txt, however it doesn't fix this issue.

I tested to make sure it was enabled by running:

# vcgencmd get_config disable_audio_dither
disable_audio_dither=1

What could be happening from when I bootup to when I play the first bit of sound and how can I stop the hiss after the first play again?

Edit

My question differs from the question asked here How to get better Audio quality from audio jack output, because this question talks about issues with popping noises between songs. My issue is that after any audio is played on the Pi whatsoever there is henceforth a hissing sound from the speakers until the Pi is restarted. I have having no popping sounds whatsoever and using a USB card has not fixed this issue for me.

Edit 2

Tried using a Tendak HDMI to VGA for the sound (http://www.amazon.com/Tendak-Converter-Adapter-Projector-Blu-ray/dp/B00SKP88VA/ref=sr_1_10?ie=UTF8&qid=1450364986&sr=8-10&keywords=tendak+hdmi) thinking that we'd have more like that way, but the issue still persists.

Mikey A. Leonetti
  • 311
  • 1
  • 3
  • 12

5 Answers5

2

I was able to get rid of the hiss entirely by adding audio_pwm_mode=2 to my /boot/config.txt. BTW: I also have a ground loop isolator between my audio jack and my amp.

1

The Pi's audio port isn't very good but this consequence of a cheap audio port can be mitigated by one of two ways.

1. PulseAudio


PulseAudio is a higher quality way of playing audio through any port.

You can read more and learn how to install/use it here: https://dbader.org/blog/crackle-free-audio-on-the-raspberry-pi-with-mpd-and-pulseaudio

2. USB Sound Cards


This is the more widely used solution, as with a USB sound card you can use a microphone. You can pick one up for less than $5 on eBay and Amazon.

Patrick Cook
  • 6,365
  • 8
  • 38
  • 63
1

I suspect the amp is still on after playing the first audio file. There are a few things you can try (some of which you may have tried already of course).

  • Closing the software used to play the samples. I was testing using sonic pi on a model 2, and closing sonic pi stopped the hiss made it much quieter. Further testing demonstrates that the quiet hiss is there even during boot, before snd_bcm2835 is loaded, and that sonic pi starts the louder hiss.
  • Stopping (rmmod) various modules related to sound. You'll need to enable the "force" option to do this as some modules appear to be "in use" but not used by anything specific. There's a reason it's disabled by default (high chance of crashing).

When testing in sonic Pi I could hear the same (loud) hiss in the gaps between beeps -- I suspect you're only not hearing it during the samples because it's drowned out by the sample. Like you the volume and mute buttons didn't do anything. My tests were with some awful earphones in the onboard audio port.

The fact that the hiss was louder with playing software suggests 2 sources. I don't know the topology but I would guess the DAC and the amp, with the amp always powered.

As I'm into playing with the hardware, and have made some simple audio hardware years ago, I'd consider a hardware mute circuit controlled by a GPIO pin. Off the top of my head I'm thinking something like a 1K resistor to ground switched by a small FET (all per channel, but you could run them off the same GPIO pin). This is likely to be better than breaking the circuit using a transistor, as you may get a switch-off pop and increase pickup at the next stage (I assume amplified speakers). Of course this wouldn't help much if you have silences within your audio clips.

It sounds like white noise (near enough) so you wouldn't be able to filter it (unlike mains hum), and I suspect it's loud enough that ramping up the output volume so you can turn down your amp/speakers wouldn't be enough.

Chris H
  • 585
  • 2
  • 14
0

It's a hardware problem.

The original Pi's suffered from hiss due to power supply noise injection. The '+' (and B2) series are a lot better in this respect (because they decouple the sound from the GPU with a separate regulator), however you can reduce hiss by using a 'higher quality' PSU (those rated at 1.5 A are usually better) and/or adding an extra electrolytic cap. across the GPU power near the 'sound output' power pins.

user37374
  • 3
  • 1
0

I was facing this same issue and infact i did reinstall OS, finally I found that my issue was with servoblaster using as pwm, As servoblaster use PIN 18 which is used for 3.5 audio Jack also, using PCM flag --pcm i was able to get back my audio. Please find more detail on this site https://leenabot.com/en/Driving-Servo-Motors-Servo-Blaster-for-Raspberry-Pi/. Hope this is helpful for other who are using servoblaster.