I've been searching the forum as well as the web to determine how to specify Alsamixer values from a configuration file.
Most tutorials, including the below forum post indicate to use 'aslactrl' commands to set the values, however alsactrl does not seem to be installed on the 4.7 iso.
they also refer to the config file being in /var/lib/alsa/asound.state or /etc/asound.state, neither of which exist which I assume is due to the lack of asactrl.
Is there any way of specifying these values from another config file or possibly using the run_command?
thanks,
Chardho
Specify Alsamixer values
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Specify Alsamixer values
Hello chardho,
Please explain why you cant use official 'volume_level=' parameter.
Please explain why you cant use official 'volume_level=' parameter.
Please add [Solved] to your thread title if the solution was found.
Specify Alsamixer values
Because I want to be able to control not only the master volume but also the Mic volume and Mic Boost parameters as well as PCM which seems to be maxed out when the system boots.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Specify Alsamixer values
In this case you could host 'alsactl' and previously generated asound.state file on some web storage and use 'run_command=' parameter to download them during system boot and restore your preferred values.
This way you'll be able to avoid remastering the ISO.
sample:
did not test but you should get the idea.
This way you'll be able to avoid remastering the ISO.
sample:
Code: Select all
run_command=wget https://domain.com/files/alsactl; wget https://domain.com/files/asound.state; chmod +x alsactl; /root/alsactl -f /root/asound.state restore
Please add [Solved] to your thread title if the solution was found.
Specify Alsamixer values
fanthom,
thanks for the quick reply. This seems like a better solution than dealing with trying to create a module for alsa-utils as handling the dependencies has become a bit of a problem.
couple of questions.
Is alsactl not part of alsa-utils which has dependencies? I was not aware that it was simply a file I could load on demand.
Is asound.state a file that is built when alsa-utils are installed or is it a file that is created by the user simply for saving alsa state?
chardho
thanks for the quick reply. This seems like a better solution than dealing with trying to create a module for alsa-utils as handling the dependencies has become a bit of a problem.
couple of questions.
Is alsactl not part of alsa-utils which has dependencies? I was not aware that it was simply a file I could load on demand.
Is asound.state a file that is built when alsa-utils are installed or is it a file that is created by the user simply for saving alsa state?
chardho
Specify Alsamixer values
I think I found a better answer that is more simple and utilizes a tool already included in PK.
amixer allows you to change the volume settings on the fly from the command line and can therefore be implemented easily using the run_command
https://unix.stackexchange.com/question ... m-terminal
running 'amixer' without argument will list all cards and associated controls recognized by alsa. Below is my output.
Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 75 [86%] [-9.00dB] [off]
Front Right: Playback 75 [86%] [-9.00dB] [off]
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 10 [32%] [-19.50dB] [off]
Front Right: Playback 10 [32%] [-19.50dB] [off]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 2 [67%] [20.00dB]
Front Right: 2 [67%] [20.00dB]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
Now I can run simple commands to change the values on the fly
'amixer -M set 'Master' 70%
'amixer -M set 'Mic' 30%
'amixer -M set 'Mic Boost' 30%
now these can be placed into a run command easily and run at boot time.
amixer -h gives alternate options for selecting specific cards etc...
amixer allows you to change the volume settings on the fly from the command line and can therefore be implemented easily using the run_command
https://unix.stackexchange.com/question ... m-terminal
running 'amixer' without argument will list all cards and associated controls recognized by alsa. Below is my output.
Simple mixer control 'Master',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 87
Mono:
Front Left: Playback 75 [86%] [-9.00dB] [off]
Front Right: Playback 75 [86%] [-9.00dB] [off]
Simple mixer control 'Mic',0
Capabilities: pvolume pswitch
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono:
Front Left: Playback 10 [32%] [-19.50dB] [off]
Front Right: Playback 10 [32%] [-19.50dB] [off]
Simple mixer control 'Mic Boost',0
Capabilities: volume
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: 0 - 3
Front Left: 2 [67%] [20.00dB]
Front Right: 2 [67%] [20.00dB]
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch
Capture channels: Front Left - Front Right
Limits: Capture 0 - 63
Front Left: Capture 0 [0%] [-17.25dB] [off]
Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Loopback Mixing',0
Capabilities: enum
Items: 'Disabled' 'Enabled'
Item0: 'Disabled'
Now I can run simple commands to change the values on the fly
'amixer -M set 'Master' 70%
'amixer -M set 'Mic' 30%
'amixer -M set 'Mic Boost' 30%
now these can be placed into a run command easily and run at boot time.
amixer -h gives alternate options for selecting specific cards etc...
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Specify Alsamixer values
Yes - we use amixer in our /etc/rc.d/rc.sound script.
Glad you found the solution.
Glad you found the solution.
Please add [Solved] to your thread title if the solution was found.