Posts: 2
Joined: Sun May 20, 2012 8:35 am

Sound fails after a while - snd-bcm2835

Sun May 20, 2012 8:54 am

I am getting to grips with the Pi and am mostly running it headless via SSH. I have got an eBay USB wireless connection working and have managed to get internet radio and shairport working.

But, the sound usually drops out after a few minutes (usually a few seconds with mplayer and a local mp3 file, and I did have Radio 4 playing all day once).

I am using the snd-bcm2835 and since first noticing this problem I have installed alsa with no effect.

There are no indications of problems in syslog.

Is this a known problem and is there a fix?

Posts: 24
Joined: Wed May 16, 2012 7:05 pm

Re: Sound fails after a while - snd-bcm2835

Wed May 23, 2012 12:00 am

I've seen this too. A program that produces sound (in my case ogg123) hangs.

I also noticed another strange effect (that can be used as a workaround.)

Open another terminal (or SSH connection) and use amixer to change any setting (e.g. volume.)


Code: Select all

amixer cset numid=1 123
(the volume value can be anything, as long as it is different from the previous value, because the driver saves the previous value and will not send a message if they are the same.)

Now, if the sound-generating app was frozen, amixer will freeze also.

But, if you interrupt amixer (with Ctrl-C) the original app will resume playing again!

I'm guessing the original problem is a deadlock caused by a race condition in the driver, but whenever a process leaves the queue it gets resolved.

Posts: 6
Joined: Wed Mar 14, 2012 8:45 pm

Re: Sound fails after a while - snd-bcm2835

Wed Oct 24, 2012 10:35 pm

yeah having this problem right now with ogg123.
I switched to sox and it hasn't locked up yet, and it's been playing for 20 minutes

Return to “Troubleshooting”