AmpliPi
AmpliPi copied to clipboard
LMS stream choppy and distorted after not being used for a few days
I have an LMS client stream configured on my AmpliPi, connected to my LMS server running elsewhere on my network. After a few days of no use (with nothing playing and no zones linked) when I try to play something on the LMS stream, the playback is distorted, crackly, and sounds terrible.
Deleting the input using the LMS client stream and recreating makes no difference, the playback is still terrible.
Deleting the input and stream and recreating both appears to resolve the issue.
Trying stuff out here. So far, I am not inclined to believe this has to do with our process monitoring stuff, but instead deeper squeezelite
issues, particularly because our setup does use ALSA, not PulseAudio (... yet.)
I last touched this chunk of code in Dec 2023, part of our initial 0.3.0 release. To note - that's also the moment I introduced squeezelite as an actual .deb package, which may have updated the version we are running to one with a regression.
@sumnerboy12 have you noticed this in other 0.3.x releases as well?
I have implemented a nightly restart of all my streams (using NodeRED) and I have not noticed any issues since then. Sorry I can't provide more information but I am happy things are stable at the moment :).
Reproduced this in-house after running an LMS stream for 6 days. Some notes:
- One
squeezelite
+LMS player combo had a Beyonce playlist loaded for 6 days, and when I started playing it it had this issue. Killing the Beyonce playlist from within LMS and playing a Detroit jazz internet radio station actually cleared this for that player alone;squeezelite
did not get restarted. - A CDMX internet radio station and a Barcelona internet radio station were also loaded and stopped for 6 days; they did not have this issue on first play.
- A drumbase.space station has been running for 6 days straight and has this issue.
- there are not duplicate
squeezelite
clients - Modifying AmpliPi controlled volume or mute does not change this.
- Modifying the LMS server volume does not change this
- pausing and pressing play again on this stream did fix it
- squeezelite was never restarted
- there are not duplicate
I'm testing upgrades to these packages in #743 ; we'll see if they make a difference.
We've received some feedback that this issue has not yet reoccurred for an LMS user running 0.3.6, with the above LMS & squeezelite updates merged.
And this issue has re-occurred for this user. Given those old suspicious squeezelite issues above, I am increasingly wondering if there's some underlying squeezelite/LMS dependency issue. All those reports are many years old and have seemingly evaporated - nobody complains of this anymore, except our users. This may be solved long term by #471 + #472 + upgrading to a later distro (which unlocks #415).
In the shorter term, I think I'm going to implement a cronjob that jams the reset button on the stream every two-ish days, and put a comment next to it that references this comment. Future person: have we upgraded beyond Buster for our distribution? you may be able to get rid of this cronjob!