How to save changes made to alsamixer (Squeezelite)

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

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

Post 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.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post 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
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

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

Post 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.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post 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!
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

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

Post 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.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post by BobC »

Thanks once more. I'll give that a go later (I'm cooking the Mother's Day lunch).
Cheers, Bob
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

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

Post by Sciamano »

There's no hurry. Have a nice Mother's Day (in Italy we celebrate it in May) :)
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post 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
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

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

Post 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!
Post Reply