floomat
Posts: 3
Joined: Wed Aug 01, 2012 9:20 pm

Sound Stuttering when playing MP3

Wed Aug 01, 2012 9:36 pm

Hey, i recently got my Rpi and i'm very happy to have one!

Now i tried to set up my little Project: A music player which plays mostly MP3 from SD/USB. Simple i thought.

First problems: Sound was not working at all. No Analog, No HDMI. I got this fixed with help from the Wiki. :)

Now i just had no idea how to play music, i installed VLC because i knew that from my Windows PC, tried out: no Audio playback at all. I searched around for another Music player and found one i really like: LXMusic. :)

Now playing Music works fine but when i switch to the next track or skip a few seconds it begin stuttering and will only stop by closing and reopening LXMusic. :(

I clocked CPU to 900Mhz to improve speed a bit. Hope i didn't kill something with this.

What i'm doing wrong? Why does simple music is stuttering?

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: Sound Stuttering when playing MP3

Wed Aug 01, 2012 10:03 pm

Stuttering usually is caused by the cpu load being 2 high. There are issues with the analog sound output, but people describe it as clicking and background noise. If the cpu can't refill the audio buffers fast enough, the audio will start stuttering. Have you checked your cpu load during play?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5163
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Sound Stuttering when playing MP3

Wed Aug 01, 2012 11:29 pm

There is a firmware update that can reduce the interrupt latency, which may help audio underruns.
You should udpate firmware (rpi-update or use bleeding-edge repository), and add
sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0
to cmdline.txt.

(backing up first is recommended, just in case sdcard change cause any problems)

floomat
Posts: 3
Joined: Wed Aug 01, 2012 9:20 pm

Re: Sound Stuttering when playing MP3

Thu Aug 02, 2012 7:54 am

I checked CPU load and it's not filled up completly when audio is playing. Also it does work but when i skip to the next track or a few seconds in the track it begin stuttering. I use audio over HDMI not over analog atm. Maybe check analog later today.

I tried rpi-update from hexxeh a few days ago and it has crashed my start.elf, not bootable anymore. Will have to backup this time before try it again ;) Also i'm running the latest release from the raspberry page (debian wheezy).

So will try to update anyway...i'll report back.

lintweaker
Posts: 33
Joined: Mon Jul 09, 2012 6:26 pm

Re: Sound Stuttering when playing MP3

Thu Aug 02, 2012 2:38 pm

OK, as I have audio problems I just tried the 'sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0' options. When I boot I get:

mmc0: Timeout waiting for hardware interrupt - cmd13.
mmc0: Timeout waiting for hardware interrupt - cmd13.


This keeps on going for a while but continues to boot with the same message appearing making the system unusable.

kernel 3.1.9+ #242
firmware: 1 aug ... version 328870

floomat
Posts: 3
Joined: Wed Aug 01, 2012 9:20 pm

Re: Sound Stuttering when playing MP3

Thu Aug 02, 2012 5:16 pm

I tried hexxeh's update script and again it kills my complete system. i can't boot up into LXDE, there is definitly something broken in that script.

Anyway, i tried out OpenElec and MP3 just works there fine, but sometimes it "gets stuck" playing in really low qualitiy until i reboot...maybe i got a defective raspberry pi? :(

puik
Posts: 2
Joined: Sat May 19, 2012 6:46 pm

Re: Sound Stuttering when playing MP3

Mon Aug 06, 2012 8:06 am

Hi,

I'm not sure how related this is but in any case: I have random skips or jumps in audio playback with mpd randomly once in a few minutes (various formats: flac, mp3, ogg). The suggested firmware update does not seem to help.
version 329495, Aug 5 2012 16:23:31

Usually when a skip occurs mpd reports "alsa: Underrun on ALSA device "hw:0,0" ". My problem may be also related to mpd as mpg123 does not seem to skip with mp3s (I don't know how to diagnose it). So far haven't tested other players (been searching for a command line alternative to mpd).

Using hdmi audio, cpu load remains <10% during playback.

Return to “Troubleshooting”