summaryrefslogtreecommitdiffstats
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 @@
1#!/bin/sh 1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: n450 mixer setup
4# Required-Start: $syslog
5# Required-Stop: $syslog
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Initialize the n450 audio mixer
9# Description: Unmute FRONT and set volume to ~70%.
10### END INIT INFO
2 11
12# Author: Darren Hart <dvhart@linux.intel.com>
13# Based on /etc/init.d/skeleton
14
15PATH=/sbin:/usr/sbin:/bin:/usr/bin
16DESC="Audio mixer settings"
17NAME=n450-audio
3AMIXER=`which amixer` 18AMIXER=`which amixer`
19SCRIPTNAME=/etc/init.d/$NAME
20
21# Exit if amixer is not installed
22[ -x "$AMIXER" ] || exit 0
23
24do_start() {
25 # Enable the "Front" simple controls (black phones jack)
26 $AMIXER sset Front 30 on > /dev/null
27}
28
29case "$1" in
30start)
31 echo "$NAME: setting default mixer settings."
32 do_start
33 ;;
34stop)
35 ;;
36*)
37 echo "Usage: $SCRIPTNAME {start|stop}" >&2
38 exit 3
39 ;;
40esac
4 41
5if [ ! -e "$AMIXER" ]; then 42exit 0
6 if [ -e /usr/bin/amixer ]; then
7 AMIXER=/usr/bin/amixer
8 else
9 echo "amixer not found, unable to set default audio settings."
10 exit 1
11 fi
12fi
13
14# Enable the "Front" simple controls (black phones jack)
15$AMIXER sset Front 30 on