mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
meta-cedatrail: add recipe for setting audio mixer settings during boot
Recipe is copied from n450-audio.bb with a few parameters changed to adjust volume settings for Front mixer during boot. Signed-off-by: Rahul Saxena <rahul.saxena@.intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
This commit is contained in:
parent
7f52afc191
commit
3d9072c883
|
@ -0,0 +1,30 @@
|
|||
SUMMARY = "Provide a basic init script to enable audio"
|
||||
DESCRIPTION = "Set the volume and unmute the Front mixer setting during boot."
|
||||
SECTION = "base"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||
|
||||
PR = "r0"
|
||||
|
||||
inherit update-rc.d
|
||||
|
||||
RDEPENDS = "alsa-utils-amixer"
|
||||
|
||||
SRC_URI = "file://cedartrail-audio"
|
||||
|
||||
INITSCRIPT_NAME = "cedartrail-audio"
|
||||
INITSCRIPT_PARAMS = "defaults 90"
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir} \
|
||||
${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/cedartrail-audio ${D}${sysconfdir}/init.d
|
||||
cat ${WORKDIR}/${INITSCRIPT_NAME} | \
|
||||
sed -e 's,/etc,${sysconfdir},g' \
|
||||
-e 's,/usr/sbin,${sbindir},g' \
|
||||
-e 's,/var,${localstatedir},g' \
|
||||
-e 's,/usr/bin,${bindir},g' \
|
||||
-e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
chmod 755 ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: cedartrail mixer setup
|
||||
# Required-Start: $syslog
|
||||
# Required-Stop: $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Initialize the cedartrail audio mixer
|
||||
# Description: Unmute FRONT and set volume
|
||||
### 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=cedartrail-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 90 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
|
Loading…
Reference in New Issue
Block a user