restore audio levels at boot

master
ugrnm 7 years ago
parent cf2332e203
commit 4293fa9afc

4
.gitignore vendored

@ -10,6 +10,8 @@
/etc/apt/apt.conf.d/*
!/etc/apt/apt.conf.d/90norecommend
!/etc/asound.state
!/etc/hostname
!/etc/modprobe.d/
@ -18,6 +20,8 @@
!/etc/nginx/sites-available/
!/etc/rc.local
!/floppies/
/floppies/*/

@ -0,0 +1,85 @@
state.Device {
control.1 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
comment {
access read
type INTEGER
count 2
range '0 - 36'
}
}
control.2 {
iface PCM
name 'Capture Channel Map'
value 0
comment {
access read
type INTEGER
count 1
range '0 - 36'
}
}
control.3 {
iface MIXER
name 'PCM Playback Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.4 {
iface MIXER
name 'PCM Playback Volume'
value.0 97
value.1 97
comment {
access 'read write'
type INTEGER
count 2
range '0 - 151'
dbmin -2837
dbmax -6
dbvalue.0 -1019
dbvalue.1 -1019
}
}
control.5 {
iface MIXER
name 'Mic Capture Switch'
value true
comment {
access 'read write'
type BOOLEAN
count 1
}
}
control.6 {
iface MIXER
name 'Mic Capture Volume'
value 0
comment {
access 'read write'
type INTEGER
count 1
range '0 - 16'
dbmin 0
dbmax 2381
dbvalue.0 0
}
}
control.7 {
iface MIXER
name 'Auto Gain Control'
value false
comment {
access 'read write'
type BOOLEAN
count 1
}
}
}

@ -0,0 +1,20 @@
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/bin/printf " My IP address is\033[0;31m `/sbin/ifconfig | grep "inet addr" | grep -v "127.0.0.1" | awk '{ print $2 }' | awk -F: '{ print $2 }'` \033[0m\n" > /dev/console
# Restore audio levels
alsactl --file /etc/asound.state restore
exit 0
Loading…
Cancel
Save