diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-09 22:59:03 +0200 |
commit | 972dcfcdbfe75dcfeb777150c136576cf1a71e99 (patch) | |
tree | 97a61cd7e293d7ae9d56ef7ed0f81253365bb026 /meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | |
download | poky-972dcfcdbfe75dcfeb777150c136576cf1a71e99.tar.gz |
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init')
-rwxr-xr-x | meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init new file mode 100755 index 0000000000..eee59cb321 --- /dev/null +++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | |||
@@ -0,0 +1,39 @@ | |||
1 | #! /bin/sh | ||
2 | # | ||
3 | # Copyright Matthias Hentges <devel@hentges.net> (c) 2007 | ||
4 | # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) | ||
5 | # | ||
6 | # Filename: alsa-state | ||
7 | # Date: 20070308 (YMD) | ||
8 | |||
9 | # source function library | ||
10 | . /etc/init.d/functions | ||
11 | |||
12 | asound_restore(){ | ||
13 | echo "ALSA: Restoring mixer settings..." | ||
14 | if test -x /usr/sbin/alsactl -a -e #STATEDIR#/asound.state | ||
15 | then | ||
16 | /usr/sbin/alsactl -f #STATEDIR#/asound.state restore & | ||
17 | fi | ||
18 | } | ||
19 | |||
20 | asound_store(){ | ||
21 | echo "ALSA: Storing mixer settings..." | ||
22 | if test -x /usr/sbin/alsactl | ||
23 | then | ||
24 | /usr/sbin/alsactl -f #STATEDIR#/asound.state store | ||
25 | fi | ||
26 | } | ||
27 | |||
28 | case "$1" in | ||
29 | start) asound_restore ;; | ||
30 | stop) asound_store ;; | ||
31 | status) | ||
32 | status /usr/sbin/alsactl; | ||
33 | exit $? | ||
34 | ;; | ||
35 | *) | ||
36 | echo "Usage: /etc/init.d/alsa-state {start|stop|status}" | ||
37 | exit 1 | ||
38 | ;; | ||
39 | esac | ||