recipes: compressors/xz: Upgraded to version 5.6.2
[dragora.git] / archive / alsa-utils / rc.alsa
blob2005360b1a8cd6a63dfe6675f2befc9bc8730080
1 #! /bin/sh -
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.
19 # Sanity checks
20 if ! type alsactl > /dev/null 2>&1
21 then
22 echo "${0}: Error: alsactl(1) is not available." 1>&2
23 exit 127;
25 if ! type amixer > /dev/null 2>&1
26 then
27 echo "${0}: Error: amixer(1) is not available." 1>&2
28 exit 127;
31 if test -d /proc/asound
32 then
33 if test -e /var/lib/alsa/asound.state
34 then
35 echo "Restoring mixer from /var/lib/alsa/asound.state ..."
36 alsactl restore
37 else
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
47 alsactl store