aboutsummaryrefslogtreecommitdiffstats
path: root/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
diff options
context:
space:
mode:
Diffstat (limited to 'meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio')
-rw-r--r--meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio49
1 files changed, 38 insertions, 11 deletions
diff --git a/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio b/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
index ad1b0bd4..c5a0044b 100644
--- a/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
+++ b/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
@@ -1,15 +1,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
-if [ ! -e "$AMIXER" ]; then
- if [ -e /usr/bin/amixer ]; then
- AMIXER=/usr/bin/amixer
- else
- echo "amixer not found, unable to set default audio settings."
- exit 1
- fi
-fi
-
-# Enable the "Front" simple controls (black phones jack)
-$AMIXER sset Front 30 on
+exit 0