meta-digi: Add imx-audio package.

This recipe install an init script that allows to set some alsa audio
parameters without having to touch the default alsa states.

Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
Alex Gonzalez 2013-03-21 09:35:52 +01:00
parent bb4edfc2a4
commit d970f5ba57
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: imx mixer setup
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Initialize the imx audio mixer
# Description: Unmute FRONT and set volume to ~70%.
### END INIT INFO
# Based on /etc/init.d/skeleton
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Audio mixer settings"
NAME=imx-audio
AMIXER=`which amixer`
SCRIPTNAME=/etc/init.d/$NAME
# Exit if amixer is not installed
[ -x "$AMIXER" ] || exit 0
do_start() {
# Enable the Headset (Audio Out)
$AMIXER sset "Headphone Volume" 120 > /dev/null
$AMIXER sset "Speaker Function" on > /dev/null
$AMIXER sset "Playback Volume" 160 > /dev/null
$AMIXER sset "Capture Volume" 15 > /dev/null
$AMIXER sset "Jack Function" 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

View File

@ -17,5 +17,8 @@ RDEPENDS_${PN} = "\
alsa-states \
${MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
RDEPENDS_${PN}_append_mx5 = " imx-audio"
RRECOMMENDS_${PN} = "\
${MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS}"