 
            Gents,
Has anyone else observed that pulse audio seems to crash consistently after approximately 24 hours of continuous operation of Ubuntu14.04? This happens regardless of the branch of op25 built on the system. I have searched the web for this problem and have tried a number of fixes for the pulse audio crash but none of them have corrected the problem. I have tried uninstalling pulse audio to use the underlying ALSA, but can't seem to maintain reliable audio level settings after a shutdown or a reboot.
Any ideas or suggestions would be appreciated.
Thank you,
Bill, WA8WG
 
            My streaming machines all have Pulse Audio disabled since it is an unnecessary extra layer of complication. I presume the reboot issues you are having relate to increasing the size of the kernel asound prealloc buffer? If so, I solved that problem by having a small script executed at startup as follows:
#!/bin/sh PCM_ID="/proc/asound/card0/pcm0p/sub0/prealloc" LOGFILE="/home/username/prealloc.status" BUFSIZE="1024"
if [ -f $LOGFILE ]; then rm $LOGFILE fi
# Adjust playback buffer if [ -f $PCM_ID ]; then echo "Success: $PCM_ID ($BUFSIZE)" > $LOGFILE echo $BUFSIZE > $PCM_ID else echo "Failure: $PCM_ID ($BUFSIZE)" > $LOGFILE fi
Obviously you are going to need to edit the LOGFILE destination, but I find it works pretty well when called from /etc/rc.local
 
            Graham,
The only issue that I had after uninstalling Pulse Audio was in maintaining the ALSA level controls such that the settings held constant through restarts/reboots. With Pulse Audio, I could set the audio levels control(s) form the command line with alsamixer, then make those settings permanent with the alsactl store command. I can still invoke both commands with Pulse Audio removed, but the level settings no longer remain constant after a restart having issued the alsactl store command before the restart.
I know very little about Linux and am not sure how best to get around this issue.
Bill
From: op25-dev@yahoogroups.com [mailto:op25-dev@yahoogroups.com] Sent: Sunday, October 8, 2017 6:40 PM To: op25-dev@yahoogroups.com Subject: [op25-dev] Re: OP25 on Ubuntu 14.04
My streaming machines all have Pulse Audio disabled since it is an unnecessary extra layer of complication. I presume the reboot issues you are having relate to increasing the size of the kernel asound prealloc buffer? If so, I solved that problem by having a small script executed at startup as follows:
#!/bin/sh PCM_ID="/proc/asound/card0/pcm0p/sub0/prealloc" LOGFILE="/home/username/prealloc.status" BUFSIZE="1024"
if [ -f $LOGFILE ]; then rm $LOGFILE fi
# Adjust playback buffer if [ -f $PCM_ID ]; then echo "Success: $PCM_ID ($BUFSIZE)" > $LOGFILE echo $BUFSIZE > $PCM_ID else echo "Failure: $PCM_ID ($BUFSIZE)" > $LOGFILE fi
Obviously you are going to need to edit the LOGFILE destination, but I find it works pretty well when called from /etc/rc.local
 
            Are you calling "alsactl restore" after a reboot so that the stored parameters can be used to set the mixer levels? https://linux.die.net/man/1/alsactl https://linux.die.net/man/1/alsactl
 
            No. I was not aware this was necessary before removing pulseaudio. I assume this command could be added to my op25 startup that get called from rc.local? One additional question. I have built your branch of op25 on Debian 8.9 and it compiles and works fine. The problem I have is that I can’t get rc.local in Debian 8.9 to run my startup yet the startup shell works if invoked manually from the local console (terminal) or remotely via ssh. I did verify that rc.local is executable, so I don’t know what’s up with that in Debian 8.9.
Thank you!
Bill
From: op25-dev@yahoogroups.com [mailto:op25-dev@yahoogroups.com] Sent: Monday, October 9, 2017 7:11 PM To: op25-dev@yahoogroups.com Subject: RE: [op25-dev] Re: OP25 on Ubuntu 14.04
Are you calling "alsactl restore" after a reboot so that the stored parameters can be used to set the mixer levels? https://linux.die.net/man/1/alsactl
 
            Bill,
I think you'll find that "alsactl store" saves the mixer parameters to a file (/var/lib/alsa/asound.state) and then you have to read them back in with "alsactl restore". I don't think it's automatic, so you'd want to add the command to one of the startup scripts.
Unfortunately I can't help much with your rc.local problem. I'd expect google has the answer if you can figure out the correct question to ask it. Might be a path problem - something that wouldn't be an issue from an interactive shell, but no good at boot time.
Graham
 
            Graham,
I believe that I have corrected the unstable audio level issue. In addition to sudo apt-get autoremove pulseaudio, I installed sudo apt-get install gnome-alsamixer, then issued gnome-alsamixer to set the level controls. This apparently caused a conflict with existing alsamixer and alsactl store files and functions?
That said, having removed gnome-alsamixer has allowed Ubuntu’s alsactl store to set and maintain consistent audio levels that remain following restarts.
Thank you for your help!
Bill, WA8WG
From: op25-dev@yahoogroups.com [mailto:op25-dev@yahoogroups.com] Sent: Tuesday, October 10, 2017 6:11 PM To: op25-dev@yahoogroups.com Subject: RE: [op25-dev] Re: OP25 on Ubuntu 14.04
Bill,
I think you'll find that "alsactl store" saves the mixer parameters to a file (/var/lib/alsa/asound.state) and then you have to read them back in with "alsactl restore". I don't think it's automatic, so you'd want to add the command to one of the startup scripts.
Unfortunately I can't help much with your rc.local problem. I'd expect google has the answer if you can figure out the correct question to ask it. Might be a path problem - something that wouldn't be an issue from an interactive shell, but no good at boot time.
Graham

