Page 2 of 2

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sat Mar 25, 2017 11:36 am
by Sciamano
The right syntax for the command should be

amixer sset 'PCM Playback Volume' 60

But if you managed to make it work without the 's maybe it works this way too (I have never tried omitting them).
Unfortunately I don't know of any other possibly useful commands, I'm sorry.

I would try to reinstall DietPi (maybe even on a different SD card), and see if the problem persists. I have never experienced the problem you are having, and can't imagine any reason why you are experiencing it other than maybe something went wrong during the first setup. Sorry.

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sat Mar 25, 2017 6:27 pm
by BobC
You have been very helpful and there is certainly no need to be sorry. Oddly the PCM volume command did not work when placed within the inverted commas!
I will have a go with another card but for the time being will live with it as it is - I am very pleased with the DietPi resilience and sound - it's not much trouble to enter alsamixer as and when when required (the Pi lives next to my bed for occasional night time headphone listening and gets turned off when done as the flashing lights are a bit bothersome).
Thanks again and I will report back if I solve this riddle
Cheers
Bob

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 12:36 am
by Sciamano
As a workaround you could write a simple bash script containing the command above to be run at boot, so that the volume would be set to that level automatically every time the machine starts.

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 11:12 am
by BobC
Sciamano wrote:As a workaround you could write a simple bash script containing the command above to be run at boot, so that the volume would be set to that level automatically every time the machine starts.
Thanks but I'm new to this Linux lark and I wouldn't know where to start!

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 12:19 pm
by Sciamano
Give this command:

Code: Select all

crontab -e
It will open a file in the text editor.
At the bottom of the file add this line:

Code: Select all

@reboot amixer sset 'PCM Playback Volume' 60
To save the file: Ctrl-X then 'Y' to confirm.

Reboot and check if it works.
If it doesn't, give the "crontab -e" command again and remove the quotation marks from the command. Save and exit (Ctrl-X, then Y) and reboot.
Check if it works and let me know.

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 12:26 pm
by BobC
Thanks once more. I'll give that a go later (I'm cooking the Mother's Day lunch).
Cheers, Bob

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 12:34 pm
by Sciamano
There's no hurry. Have a nice Mother's Day (in Italy we celebrate it in May) :)

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 8:53 pm
by BobC
Sciamano wrote:There's no hurry. Have a nice Mother's Day (in Italy we celebrate it in May) :)
Utterly brilliant! Worked like a charm through multiple reboots. It needed the removal of the quotation marks but otherwise i followed your very clear directions.
Had a nice lunch too with both of our mothers (mine is 92, my wife's Ma is 97)
Molte grazie,
Bob

Re: How to save changes made to alsamixer (Squeezelite)

Posted: Sun Mar 26, 2017 11:23 pm
by Sciamano
BobC wrote:
Sciamano wrote:There's no hurry. Have a nice Mother's Day (in Italy we celebrate it in May) :)
Utterly brilliant! Worked like a charm through multiple reboots. It needed the removal of the quotation marks but otherwise i followed your very clear directions.
Had a nice lunch too with both of our mothers (mine is 92, my wife's Ma is 97)
Molte grazie,
Bob
You're welcome! Glad it worked, although it's not really a solution, just a workaround.
Congratulations to your mother's! I hope they enjoyed their meal and the whole day.
Ciao!