3 # Script to start the Advanced Linux Sound Architecture (ALSA)
5 # Copyright (c) 2017, 2019 Matias Fonzo, <selk@dragora.org>.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 if ! type alsactl
> /dev
/null
2>&1
22 echo "${0}: Error: alsactl(1) is not available." 1>&2
25 if ! type amixer
> /dev
/null
2>&1
27 echo "${0}: Error: amixer(1) is not available." 1>&2
31 if test -d /proc
/asound
33 if test -e /var
/lib
/alsa
/asound.state
35 echo "Restoring mixer from /var/lib/alsa/asound.state ..."
38 echo "Setting local values for the ALSA mixer ..."
39 amixer
set Master
90% unmute
> /dev
/null
2>&1
40 amixer
set Front
80% unmute
> /dev
/null
2>&1
41 amixer
set PCM
80% unmute
> /dev
/null
2>&1
42 amixer
set Side
80% unmute
> /dev
/null
2>&1
43 amixer
set CD
90% unmute
> /dev
/null
2>&1
44 amixer
set Headphone unmute
> /dev
/null
2>&1
45 amixer
set Mic
90% unmute
> /dev
/null
2>&1
46 amixer
set 'Front Mic' 90% unmute
> /dev
/null
2>&1