summaryrefslogtreecommitdiffstats
path: root/meta-n450
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-03-11 23:53:11 (GMT)
committerDarren Hart <dvhart@linux.intel.com>2011-03-12 08:46:41 (GMT)
commitd1ba49be3052aada2ca8fe8f12787b4fce8a6383 (patch)
tree1691ddc0be4a8df8352b59258856978af1378ab6 /meta-n450
parent4bbfc4f08b0e906ba4182f0ad2baad77a5938db9 (diff)
downloadmeta-intel-d1ba49be3052aada2ca8fe8f12787b4fce8a6383.tar.gz
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>
Diffstat (limited to 'meta-n450')
-rw-r--r--meta-n450/conf/machine/n450.conf2
-rw-r--r--meta-n450/recipes-bsp/audiofix/audiofix.bb17
-rw-r--r--meta-n450/recipes-bsp/audiofix/files/n450_audiofix13
-rw-r--r--meta-n450/recipes-bsp/n450-audio/n450-audio.bb23
-rw-r--r--meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio15
5 files changed, 40 insertions, 30 deletions
diff --git a/meta-n450/conf/machine/n450.conf b/meta-n450/conf/machine/n450.conf
index eda91d9..c06cb6c 100644
--- a/meta-n450/conf/machine/n450.conf
+++ b/meta-n450/conf/machine/n450.conf
@@ -11,3 +11,5 @@ APPEND += "console=ttyS0,115200 console=tty0"
11 11
12PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable" 12PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-stable"
13 13
14# Ensure the bsp packages are installed
15MACHINE_EXTRA_RRECOMMENDS += " n450-audio "
diff --git a/meta-n450/recipes-bsp/audiofix/audiofix.bb b/meta-n450/recipes-bsp/audiofix/audiofix.bb
deleted file mode 100644
index 3b1d272..0000000
--- a/meta-n450/recipes-bsp/audiofix/audiofix.bb
+++ /dev/null
@@ -1,17 +0,0 @@
1SUMMARY = "Provide a basic init script to enable audio"
2DESCRIPTION = "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."
3SECTION = "base"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
6
7PR = "r2"
8RDEPENDS = "alsa-utils-amixer"
9
10SRC_URI = "file://n450_audiofix"
11
12do_install () {
13 install -d ${D}${sysconfdir}/init.d
14 install -d ${D}${sysconfdir}/rc5.d
15 install -m 0755 ${WORKDIR}/n450_audiofix ${D}${sysconfdir}/init.d
16 ln -sf ${D}${sysconfdir}/init.d/n450_audiofix ${D}/${sysconfdir}/rc5.d/S91n450_audiofix
17}
diff --git a/meta-n450/recipes-bsp/audiofix/files/n450_audiofix b/meta-n450/recipes-bsp/audiofix/files/n450_audiofix
deleted file mode 100644
index 9ec0448..0000000
--- a/meta-n450/recipes-bsp/audiofix/files/n450_audiofix
+++ /dev/null
@@ -1,13 +0,0 @@
1#!/bin/sh
2
3AMIXER=`which amixer`
4
5if [ ! -e $AMIXER ]; then
6 if [ -e /usr/bin/amixer ]; then
7 AMIXER=/usr/bin/amixer
8 else
9 echo "No amixer, so unable to reset Front channel ON"
10 fi
11fi
12
13
diff --git a/meta-n450/recipes-bsp/n450-audio/n450-audio.bb b/meta-n450/recipes-bsp/n450-audio/n450-audio.bb
new file mode 100644
index 0000000..20e3a9a
--- /dev/null
+++ b/meta-n450/recipes-bsp/n450-audio/n450-audio.bb
@@ -0,0 +1,23 @@
1SUMMARY = "Provide a basic init script to enable audio"
2DESCRIPTION = "Set the volume and unmute the Front mixer setting during boot."
3SECTION = "base"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
6
7PR = "r3"
8
9inherit update-rc.d
10
11RDEPENDS = "alsa-utils-amixer"
12
13SRC_URI = "file://n450-audio"
14
15INITSCRIPT_NAME = "n450-audio"
16INITSCRIPT_PARAMS = "defaults 90"
17
18do_install() {
19 install -d ${D}${sysconfdir} \
20 ${D}${sysconfdir}/init.d
21 install -m 0755 ${WORKDIR}/n450-audio ${D}${sysconfdir}/init.d
22}
23
diff --git a/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio b/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
new file mode 100644
index 0000000..ad1b0bd
--- /dev/null
+++ b/meta-n450/recipes-bsp/n450-audio/n450-audio/n450-audio
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3AMIXER=`which amixer`
4
5if [ ! -e "$AMIXER" ]; then
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