Noise at front of audio playback


50 posts   Page 2 of 2   1, 2
by Narf03 » Sun Jul 15, 2012 7:31 am
Same problem here, got 2 unit of pi here, and both showing the same problem. Using debian now, do raspian having the same problem ? thanks.
Posts: 243
Joined: Mon Jun 11, 2012 3:44 pm
Location: Malaysia
by zAo » Wed Jul 25, 2012 3:55 pm
Any updates? This makes mpd unusable :(
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by dom » Wed Jul 25, 2012 4:53 pm
zAo wrote:Any updates? This makes mpd unusable :(

Is your firmware up to date? Are you on HDMI or analogue audio? Can you give me commands that reproduce the problem?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5076
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by zAo » Wed Jul 25, 2012 5:09 pm
Yes, I have the latest firmware. I have the problem on analoge wit mpd 0.16.0.
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by mikerr » Wed Jul 25, 2012 5:15 pm
I had this problem for a while (on analogue) and rpi-updates never fixed it

what did fix it eventually was this start.elf file:
viewtopic.php?f=66&t=7107&p=130405#p130405
Android app - Raspi Card Imager - download and image SD cards - No PC required !
User avatar
Posts: 2420
Joined: Thu Jan 12, 2012 12:46 pm
Location: Up north , UK
by dom » Wed Jul 25, 2012 5:47 pm
zAo wrote:Yes, I have the latest firmware. I have the problem on analoge wit mpd 0.16.0.

Please report:
/opt/vc/bin/vcgencmd version

What do you play with mpd?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5076
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by zAo » Wed Jul 25, 2012 5:56 pm
dom wrote:
zAo wrote:Yes, I have the latest firmware. I have the problem on analoge wit mpd 0.16.0.

Please report:
/opt/vc/bin/vcgencmd version

What do you play with mpd?

I played multiple MP3 (VBR and SBR) and FLAC.

pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version
Jul 22 2012 19:41:10
Copyright (c) 2012 Broadcom
version 326770 (release)
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by zAo » Wed Jul 25, 2012 5:59 pm
mikerr wrote:I had this problem for a while (on analogue) and rpi-updates never fixed it

what did fix it eventually was this start.elf file:
viewtopic.php?f=66&t=7107&p=130405#p130405

Thanks, I tried it, but the problem is still there.
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by SinnerG » Wed Jul 25, 2012 9:13 pm
Anyone have any thoughts on correcting this outside of software?

I hooked up my multimeter to a audio test lead connected to the pi this evening and measured around 140-180mV DC offset with nothing playing in XBMC. It was alot higher on startup, but after about 15 minutes I was seeing those values. Peak-to-peak output AC voltage came out around 1.3V while playing 1 kHz sine wave audio file at full tilt, which is similar to the output from my DELL U2711's sound bar. I have various capacitors lying around here and maybe tomorrow evening I'll try out some as a DC blocking cap.

Perhaps the popping can be rid of using a DC blocking cap on the analogue output?
Posts: 12
Joined: Mon Jul 23, 2012 7:44 am
by mahjongg » Wed Jul 25, 2012 11:09 pm
There IS a dc decoupling capacitor in the analog audio output of the PI, is a generous 10uF. There are also clipping diodes there connected between 3V3 and GND.
Physically the (stereo) audio output consists of two GPIO pins (that is 3V3 digital levels) controlled by PWM logic, followed by a resistor divider 35%, for 1V P/P max and a RC filter for converting the PWM signal into a DC level (modulated for an AC level in the audio band). All that followed as said by the decoupling capacitor and clipping.

Its obvious that the actual PWM is only turned on when needed, that is why there is a plop when the average DC voltage goes from 0V to 0.5V when turned on. A "soft turn on" should indeed help, but somehow it isn't always applied. A better solution would be to always turn on the PWM, at a 50% dusty cycle, but indeed that consumes electricity, to be exact it would consume about 8mW when not loaded, that shouldn't be of much concern I assume.
User avatar
Forum Moderator
Forum Moderator
Posts: 9219
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands
by SinnerG » Thu Jul 26, 2012 12:37 pm
Ah, I wasn't aware of how the pi analogue out is constructed. I would gladly sacrifice 8mW of power if it rids the analogue jack of the pop. I just went and bought a HDMI to component+audio converter so I can use the HDMI output instead and see what that is like.

Ideally I should just by a HDTV. :)
Posts: 12
Joined: Mon Jul 23, 2012 7:44 am
by mahjongg » Thu Jul 26, 2012 12:58 pm
I'm fairly confident the problem will be dealt with in software, but to me it seems a very minor problem for the intended purpose of the PI, which isn't designed to be a media player.
User avatar
Forum Moderator
Forum Moderator
Posts: 9219
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands
by SinnerG » Thu Jul 26, 2012 1:32 pm
Agreed, except it does seem like it has become one of its main usages. :) I need to get around to ordering my second one as a play toy.
Posts: 12
Joined: Mon Jul 23, 2012 7:44 am
by mahjongg » Thu Jul 26, 2012 1:34 pm
Well, as issues like this are solved as a community effort, the more interest there is in solving it the greater the chance it will be solved sooner rather than later.
User avatar
Forum Moderator
Forum Moderator
Posts: 9219
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands
by SinnerG » Thu Jul 26, 2012 2:09 pm
Wish I could be of more help. I was hoping to use the pi as a means to getting back into un*x-based programming again, but the last time I did that was more than a decade ago on SGIs. One gets tired of the MS Windows dev day job. :)
Posts: 12
Joined: Mon Jul 23, 2012 7:44 am
by zAo » Fri Jul 27, 2012 7:31 am
Same here; I wish I new how to resolve something like this. But with some bash scripting experience, this issue won't be resolved I guess :D
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by anton » Fri Jul 27, 2012 2:29 pm
For those still experiencing the 'pop' sound with mpd I can recommend the following settings which solved the problem completely:

Navigate to your mpd.conf and use the following setting for audio_output
Code: Select all
audio_output {
        type            "pipe"
        name            "my pipe"
        command         "aplay -f cd 2>/dev/null"
        format          "44100:16:2"
}


In order to be able to adjust the volume within mpd use the following setting:
Code: Select all
mixer_type                      "software"


Hope this helps.
Posts: 1
Joined: Fri Jul 27, 2012 2:22 pm
by zAo » Sat Jul 28, 2012 3:23 pm
Thank you VERY much. This did the trick.

EDIT: Ok, I was too quick. The noise at the start is gone, but during playback there are random 'ticks' every ~1 second.
Posts: 7
Joined: Wed Jul 25, 2012 3:39 pm
by _willem_ » Sun Jul 29, 2012 11:09 am
I have the same problem with (pretty loud) noise when changing songs. Running mpd version 0.16, wheezy with firmware version as reported by vcgencmd "Jul 14 2012 13:11:40 Copyright (c) 2012 Broadcom version 325444 (release)" Using the analogue output. I play mp3's from a usb stick connected directly to the raspberry pi. Cpu usage is about 11%.

Anton's fix solves that problem. Thanks!

I don't get any 'clicks' during playback, with out withour Anton's fix.
Posts: 1
Joined: Sun Jul 29, 2012 10:56 am
by decembersoul » Mon Jul 30, 2012 1:59 pm
Hello

I have set up my raspbian with the wheezy image from 2012-07-15.
Same sound problems like most of you.

Summery:
Test Firmware Version
pi@raspberrypi ~ $ /opt/vc/bin/vcgencmd version
Jul 22 2012 19:41:10
Copyright (c) 2012 Broadcom
version 326770 (release)


Increase mpd buffer size
/etc/mpd.conf
audio_​buffer_​size „4096”


Resample audio output for mpd
audio_output {
type "pipe"
name "my pipe"
command "aplay -f cd 2>/dev/null"
format "44100:16:2"
}
mixer_type "software"


That should be all or?

Sometimes the output is very quiet. If i stop/start the playback then the sound is ok. Hope this will be fixed too.
Posts: 2
Joined: Mon Jul 30, 2012 1:49 pm
by musicmatze » Sat Aug 04, 2012 6:04 pm
Having the same problem here.
Currently I use Audio output config like this:

Code: Select all
audio_output {
        type            "alsa"
        name            "My ALSA Device"
        device          "hw:0,0"        # optional
        format          "44100:16:2"    # optional
        mixer_device    "default"       # optional
        mixer_control   "PCM"           # optional
        mixer_index     "0"             # optional
        buffer_time     "1000000"       # optional
}


mixer type software
Code: Select all
audio_buffer_size               "4096"
buffer_before_play              "50%"
connection_timeout              "60"
max_connections                 "5"
max_playlist_length             "16384"
max_command_list_size           "2048"
max_output_buffer_size          "8192"


I played around with the configuration file. First I had a buffer time 500,000, then 750,000, now 1,000,000 and buffer before play from 10, 15, 25 up to 50%. These configurations did not fix the issue.
I would be so pleased if this problem gets fixed. I wanted to use the Pi as Jukebox with mpd, but with these annoying plops, I can't do it...

There's a 1TB 3.5" external storage connected, using through truecrypt. But I think, that's not the issue...
I use the analogue playback.

regards,
musicmatze
Posts: 2
Joined: Sat Aug 04, 2012 4:20 pm
by kilokahn » Fri Sep 14, 2012 7:16 pm
Any luck on a solution? I have this issue when using MPD playing an aacPlus stream and a single MP3 file that's on the SD card, so it's not external sources causing this.
Chris Haslage, Owner
NexMix.com Productions
Posts: 21
Joined: Sun Sep 09, 2012 3:41 am
Location: Tallmadge, OH, USA
by pasky » Sat Oct 27, 2012 9:00 pm
I have found that this issue seems to be also much improved by using pulseaudio, which has a nice bonus of also allowing me to stream audio to the Pi from programs on my other Linux computers as well.

Just install pulseaudio on Pi. The only caveat is that pulseaudio must run as same user as mpd, and by default it runs as the 'pi' user; the simplest solution is to change mpd's user to 'pi' in /etc/mpd.conf and chowning /var/run/mpd, /var/log/mpd, /var/lib/mpd appropriately (running pulseaudio in system mode is way too laggy due to disabled shm).

The crackling sound happens only few seconds as playback is completely stopped (not just paused), as pulseaudio automatically releases the sound device. To prevent pulseaudio from doing that, comment out 'load-module module-suspend-on-idle' in /etc/default/default.pa
Posts: 1
Joined: Sat Oct 27, 2012 8:49 pm
by musicmatze » Thu Nov 15, 2012 12:51 pm
My guess is, that this problem is related to the encoding of the mp3-Files you all (and me too) want to play!
I found out that pausing and resuming a 320kbps-File works very well. My config is:
Code: Select all
audio_buffer_size "2048"
buffer_before_play "50%"

When I skip a 128kbps-File, my ears die because of this weird noise. Maybe, this is the problem?

EDIT: Anyway, switching from "lame" as codec to "vorbis" helped. Not completely, there's still a noise, but this load booom-noise is gone for now when skipping a title. When pausing and resume, there's almost nothing left.

EDIT: My Setup is mpd. No Pulse, no other stuff. Just mpd as server.
Posts: 2
Joined: Sat Aug 04, 2012 4:20 pm
by Tsunulukai » Wed Apr 10, 2013 8:41 pm
Hi Guys,

The issue is firmware-related, and it's been resolved!

See http://forum.stmlabs.com/showthread.php ... 8#pid59568

With the new firmware, it only pops onces when beginning to play the first time after a reboot.
No need to install pusle audio, or change de fault audio output configuration on MPD. Just replace start.elf & fixup.dat files on the boot partition by the ones linked on the forum, and you're good.

If you need the "_x variants", those are available here:
http://forum.stmlabs.com/showthread.php ... 7#pid59887

Alternatively, if you run raspbian, you can use the following commands that will automatically update your firmware to the latest available.

Code: Select all
wget http://archive.raspberrypi.org/debian/raspberrypi.gpg.key
apt-key add raspberrypi.gpg.key
rm -f raspberrypi.gpg.key

if ! cat /etc/apt/sources.list | grep archive.raspberrypi.org>/dev/null; then
cat << EOF >>/etc/apt/sources.list
deb http://archive.raspberrypi.org/debian/ wheezy main
EOF
fi

apt-get update
apt-get install raspberrypi-bootloader



Greetz,
Posts: 1
Joined: Wed Apr 10, 2013 8:15 pm