aboutsummaryrefslogtreecommitdiffstats
path: root/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
blob: c5a0044b1d33f14c892e66d4e549d70c2112ad9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
### BEGIN INIT INFO
# Provides:          n450 mixer setup
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Initialize the n450 audio mixer
# Description:       Unmute FRONT and set volume to ~70%.
### END INIT INFO

# Author: Darren Hart <dvhart@linux.intel.com>
# Based on /etc/init.d/skeleton

PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Audio mixer settings"
NAME=n450-audio
AMIXER=`which amixer`
SCRIPTNAME=/etc/init.d/$NAME

# Exit if amixer is not installed
[ -x "$AMIXER" ] || exit 0

do_start() {
	# Enable the "Front" simple controls (black phones jack)
	$AMIXER sset Front 30 on > /dev/null
}

case "$1" in
start)
	echo "$NAME: setting default mixer settings."
	do_start
	;;
stop)
	;;
*)
	echo "Usage: $SCRIPTNAME {start|stop}" >&2
	exit 3
	;;
esac

exit 0