mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 21:09:03 +02:00
n450: revamp audio mixer init script
Fixes [YOCTO #798] n450-audiofix suffered from various problems, including not getting installed. This patch adds it via MACHINE_EXTRA_RRECOMMENDS and cleans up the various bugs in the implementation. The structure has been renamed and the comments updated for consistency. This should be considered a stop-gap measure, as something along the lines of oe's alsa-state is a far better solution. Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
parent
4bbfc4f08b
commit
d1ba49be30
|
@ -11,3 +11,5 @@ APPEND += "console=ttyS0,115200 console=tty0"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
|
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
|
||||||
|
|
||||||
|
# Ensure the bsp packages are installed
|
||||||
|
MACHINE_EXTRA_RRECOMMENDS += " n450-audio "
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
SUMMARY = "Provide a basic init script to enable audio"
|
|
||||||
DESCRIPTION = "This package provides an init script which enables the audio on startup via the amixer command. It address a problem with the development board that has the audio muted on power on."
|
|
||||||
SECTION = "base"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
|
||||||
|
|
||||||
PR = "r2"
|
|
||||||
RDEPENDS = "alsa-utils-amixer"
|
|
||||||
|
|
||||||
SRC_URI = "file://n450_audiofix"
|
|
||||||
|
|
||||||
do_install () {
|
|
||||||
install -d ${D}${sysconfdir}/init.d
|
|
||||||
install -d ${D}${sysconfdir}/rc5.d
|
|
||||||
install -m 0755 ${WORKDIR}/n450_audiofix ${D}${sysconfdir}/init.d
|
|
||||||
ln -sf ${D}${sysconfdir}/init.d/n450_audiofix ${D}/${sysconfdir}/rc5.d/S91n450_audiofix
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
AMIXER=`which amixer`
|
|
||||||
|
|
||||||
if [ ! -e $AMIXER ]; then
|
|
||||||
if [ -e /usr/bin/amixer ]; then
|
|
||||||
AMIXER=/usr/bin/amixer
|
|
||||||
else
|
|
||||||
echo "No amixer, so unable to reset Front channel ON"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
23
meta-n450/recipes-bsp/n450-audio/n450-audio.bb
Normal file
23
meta-n450/recipes-bsp/n450-audio/n450-audio.bb
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||||
|
|
||||||
|
PR = "r3"
|
||||||
|
|
||||||
|
inherit update-rc.d
|
||||||
|
|
||||||
|
RDEPENDS = "alsa-utils-amixer"
|
||||||
|
|
||||||
|
SRC_URI = "file://n450-audio"
|
||||||
|
|
||||||
|
INITSCRIPT_NAME = "n450-audio"
|
||||||
|
INITSCRIPT_PARAMS = "defaults 90"
|
||||||
|
|
||||||
|
do_install() {
|
||||||
|
install -d ${D}${sysconfdir} \
|
||||||
|
${D}${sysconfdir}/init.d
|
||||||
|
install -m 0755 ${WORKDIR}/n450-audio ${D}${sysconfdir}/init.d
|
||||||
|
}
|
||||||
|
|
15
meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
Normal file
15
meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
AMIXER=`which amixer`
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user