mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.21k stars 572 forks source link

Sound stop working after a few hours on Raspberry Pi Zero with latest Raspbian Lite Stretch #713

Closed jaguar419 closed 3 years ago

jaguar419 commented 6 years ago

Everything works great at first, but I'll come back a few hours later and connect over airplay to the pi, everything appears to work correctly, but no sound comes out. So I disconnect from airplay and try to connect again, but I am unable to. On reboot everything works fine, I have tried all the wireless power off troubleshooting. Today while I noticed airplay wasn't working as described I tried a speaker test, it appears to work, but no sound. After reboot of pi airplay works fine and so does speaker test. Any suggestions?

mikebrady commented 6 years ago

Thanks for the post. What version of Shairport Sync (maybe have a look at the CONTRIBUTING page for some more hints)? Also the wording about the speaker test is a bit ambiguous; what is the “it” that appeared to work, and what was it that made no sound — was it Shairport Sync or was it the speaker test?

jaguar419 commented 6 years ago

Installed version 3.2RC10-OpenSSL-Avahi-ALSA-sysconfdir:/usr/local/etc. speaker-test -t wav is the command I'm using to test the sound. When airplay is functional the speaker test produces sound, but when airplay is not playing sound or letting my connect the speaker test gives no sound.

mikebrady commented 6 years ago

Thanks for the information. The fact that the speaker test fails would suggest that the output device might be faulty, but it's very difficult to have any certainty. By the way, what is the output device? I have been using a Pimoroni PHAT with great success, and it runs for days without problems.

Anyway, more information might help. If you could turn on logging and statistics as described in the CONTRIBUTIONS.md page here, and post the log around the point where the audio output stops, it might contain some clues.

jaguar419 commented 6 years ago

I’m using a usb soundcard that I had been using with a RPI3 with no problems. The Zero works fine usually but when it stops a reboot always fixes it.

mikebrady commented 6 years ago

Thanks. Could it possibly be a slightly defective power supply? Can you easily substitute another one?

jaguar419 commented 6 years ago

https://www.amazon.com/gp/product/B075HB98J9/ref=oh_aui_detailpage_o07_s00?ie=UTF8&psc=1

This is how my zero gets power, I'm basically using it as a ups. My micro usb cable is 24AWG, I had problems with voltage leakage using my RPI3 with adafruit touch screen, kept getting white screen of death because of it, but I wasn't using this battery shield with it. I'll hook my mulitmeter up to it and see what I get.

mikebrady commented 6 years ago

Thanks -- that's interesting. There's a little bit of negative commentary in the comments but TBH, it's hard to know how seriously to take them. If it was possible to use a known-good substitute and see if the problem persists or not, it seems to me a low-hassle way of checking. The multimeter might not pick up a sudden glitchy loss of power...

jaguar419 commented 6 years ago

I can switch out with official power supply, and do some more experimenting to figure when the issue crops up exactly.

mikebrady commented 6 years ago

Thanks – that might be the easiest. Please keep us posted.

jaguar419 commented 6 years ago

I have some more info. Earlier this morning everything working fine. Come back an hour later connect via airplay and start streaming, but no sound. I unconnect and attempt to reconnect, but am unable to. Later I try to connect again with success, but when I press play I get the, Airplay Speaker Not Available "Raspberrypi" is being used by someone else.

jaguar419 commented 6 years ago

I always disconnect from the pi and I have changed allow_session_interruption to yes.

mikebrady commented 6 years ago

Thanks. When you went away this morning, did you just bring the source (an iPhone?) out of range, or did you stop playing first? (I'm trying to visualise the scenario.)

Another thing -- would it be possible for you to update to the development version please -- the instructions are on the UPDATING.md page?

jaguar419 commented 6 years ago

I always stop playing and disconnect first. I can update to development version.

mikebrady commented 6 years ago

Thanks for your efforts. The thing about the development version is that it'll be easier to make changes and experimental modifications quickly if needed.

jaguar419 commented 6 years ago

http://weworkweplay.com/play/rebooting-the-raspberry-pi-when-it-loses-wireless-connection-wifi/

I used on my RPI3 to restart network if necessary. I'm doing this with my Zero now to see if it helps.

mikebrady commented 6 years ago

Fair enough. My experience in the last year or so with Raspberry Pi’s on WiFi has been very good. They never drop the connection and when the access point is restarted they always reassociate without intervention. If power management is definitely off and they are dropping off the network, it would be grounds for suspecting that something else is going on...

jaguar419 commented 6 years ago

Just now I connected to my with pi with airplay, but again no sound. I disconnect and attempt to reconnect but I am unable to and stop trying. Then I get an Airplay message. Unable to connect to “Unknown”

mikebrady commented 6 years ago

Thanks. That sounds awfully like a network problem of some kind.

Is it possible that the WiFi access point (maybe it's a router) is faulty? Is there any way of substituting a different one, even temporarily? (This is why engineers love to have replacements for everything!)

Maybe try using wavemon on the Pi to see what the general quality of the network is like?

jaguar419 commented 6 years ago

I have Spectrum so I'm using their not so great router. I have installed wavemon. If my pi is in the same room as router link quality is 100% and signal level is around -32 dBm. When my pi is upstairs in usual place link quality is in 80's and signal level around -50 dBm.

mikebrady commented 6 years ago

Not familiar with the router -- maybe other readers are. Interesting about the different qualities. Do the problems occur when the Pi is in the same room?

github-actions[bot] commented 3 years ago

This issue has been inactive for 60 days so will be closed 7 days from now. To prevent this, please remove the "stale" label or post a comment.