How to save changes made to alsamixer (Squeezelite)

Having issues with your DietPi installation, or, found a bug? Post it here.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

How to save changes made to alsamixer (Squeezelite)

Post by BobC »

After successfully running a RPi3/DietPi/DragonFly Red combo in Roon, I am trying to set up the same configuration with Squeezelite. I have the thing running OK but the sound output is very low. I have worked out how to set the required PCM level using ssh alsamixer but the setting reverts when the Pi is rebooted/switched off and on. How do I save the changes I make in alsamixer? Id be grateful for any assistance. Thanks, 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 »

This shouldn't happen.
On my OrangePi PC, alsamixer does not lose the settings when I reboot.
tkr001
Posts: 11
Joined: Sun Jan 22, 2017 11:25 pm

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

Post by tkr001 »

alsactl store
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post by BobC »

tkr001 wrote:alsactl store
Thanks, I gave that a go but it did not work...
On opening alsamixer PCM is 0 [dB gain: -64.00], this results in a very faint sound on my system through the DragonFly Red with the volume at 100%. I change the PCM to 84 [dB gain -4.00] which gives excellent sound quality and full range on the volume controls. Alas, even when using the alsactl store command after entering the change, the PCM setting reverts to 0 following a reboot or shutdown/power up.
Is there anything else I can try?
With thanks, Bob
den_hr
Posts: 13
Joined: Tue Jan 31, 2017 7:47 pm

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

Post by den_hr »

Strange... Could it be permissions? Are you issuing commands as root or as "ordinary" user? You could try prefixing alsamixer invocation with "sudo", perhaps, just to be sure (if you are not root).... Also check user and group permissions.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post by BobC »

Thanks, strange indeed! Changes made in root (i think) see screen shot below...
I am not all that savvy with command lines - how would I check user and group permissions and what should I be looking for?

Created by : Daniel Knight
Web : http://DietPi.com
Twitter : http://twitter.com/dietpi_
Donate : http://goo.gl/pzISt9
DietPi's web hosting is powered by: MyVirtualServer.com

dietpi-launcher = All the DietPi programs in one place.
dietpi-config = Feature rich configuration tool for your device.
dietpi-software = Select optimized software for installation.
htop = Resource monitor.
cpu = Shows CPU information and stats.

root@DietPi:~# alsamixer
root@DietPi:~# alsactl store
root@DietPi:~#
den_hr
Posts: 13
Joined: Tue Jan 31, 2017 7:47 pm

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

Post by den_hr »

BobC wrote:Thanks, strange indeed! Changes made in root (i think) see screen shot below...
I am not all that savvy with command lines - how would I check user and group permissions and what should I be looking for?
Yes, you are issuing those commands as root - thought that perhaps you created another "ordinary" user, so that would make sense.
This way, I really am stumped as to what is going on :(
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post by BobC »

Im still stumped. In desperation I installed piCorePlayer on a spare card. PCM level in Alsa was 100% and volume was fine. However, in comparison with DietPi, it was less stable over WiFi. Are there any tweaks I can make in the DietPi-config menu that will force higher PCM levels on startup?
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 »

Have you tried using 'amixer' (the command line mixer) instead of the graphical alsamixer?
It's definitely less intuitive, but I would give it a try.

Give the following command:

Code: Select all

amixer contents
You'll get an output similar to the following (this is just an example: your output will be different!):

Code: Select all

numid=6,iface=MIXER,name='Lineout volume control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=31,step=0
  : values=31
numid=7,iface=MIXER,name='ADC input gain ctrl'
  ; type=INTEGER,access=rw------,values=1,min=0,max=7,step=0
  : values=7
numid=10,iface=MIXER,name='Audio adda drc'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
Identify the name of the control you need to tweak (it's the string after name=), and check the maximum value in the following line.
Then give the command:

Code: Select all

amixer sset 'name of the control' X
where 'name of the control' is the string after name= you had identified earlier and X is the value you want to set to it.
In the example above, if you wanted to set the 'Lineout volume control' to its maximum value of 31 you would give the following command:

Code: Select all

amixer sset 'Lineout volume control' 31
Adjust as needed and please report back.
Hope this helps.
BobC
Posts: 10
Joined: Mon Mar 20, 2017 2:27 pm

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

Post by BobC »

Thank you for your assistance - If I could trouble you for a bit more guidance.

I worked through your clear and helpful instructions and found that the following command set the required level...

root@DietPi:~# amixer sset PCM Playback Volume 60
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 64
Mono: Playback 60 [94%] [-4.00dB] [on]
root@DietPi:~#

Alas, the setting did not survive a reboot and PCM reverted to '0'. Is there another save/store command that I could try?
Post Reply