aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux
diff options
context:
space:
mode:
authorKlaus Kurzmann <mok@fluxnetz.de>2010-06-30 23:39:48 +0200
committerKlaus Kurzmann <mok@fluxnetz.de>2010-06-30 23:40:12 +0200
commit6918af957604fdee625a256a99146f237175d162 (patch)
tree32066a920499ce42ba348a527fbfe0f9bce654cf /recipes/linux
parent6e70d7daf15d9fb172b0faaa096a8d241f1dcfe3 (diff)
downloadopenembedded-6918af957604fdee625a256a99146f237175d162.tar.gz
linux-openmoko-2.6.32_git.bb: add a patch to make jack input events work
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
Diffstat (limited to 'recipes/linux')
-rw-r--r--recipes/linux/linux-openmoko-2.6.32/hs-jack.patch85
-rw-r--r--recipes/linux/linux-openmoko-2.6.32_git.bb4
2 files changed, 88 insertions, 1 deletions
diff --git a/recipes/linux/linux-openmoko-2.6.32/hs-jack.patch b/recipes/linux/linux-openmoko-2.6.32/hs-jack.patch
new file mode 100644
index 0000000000..c92c3f6481
--- /dev/null
+++ b/recipes/linux/linux-openmoko-2.6.32/hs-jack.patch
@@ -0,0 +1,85 @@
+diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c
+index 5cc1ef2..643dae3 100644
+--- a/sound/soc/s3c24xx/neo1973_wm8753.c
++++ b/sound/soc/s3c24xx/neo1973_wm8753.c
+@@ -23,6 +23,7 @@
+ #include <sound/pcm.h>
+ #include <sound/soc.h>
+ #include <sound/soc-dapm.h>
++#include <sound/jack.h>
+ #include <sound/tlv.h>
+
+ #include <asm/mach-types.h>
+@@ -38,6 +39,9 @@
+ #include "lm4857.h"
+ #include <linux/i2c.h>
+
++static struct snd_soc_card neo1973;
++static struct snd_soc_jack hs_jack;
++
+ #ifdef CONFIG_MACH_NEO1973_GTA01
+
+ static struct lm4857 {
+@@ -495,6 +499,29 @@ static const struct snd_kcontrol_new wm8753_neo1973_gta02_controls[] = {};
+ static const struct snd_soc_dapm_widget wm8753_dapm_widgets_gta02[] = {};
+ #endif
+
++static struct snd_soc_jack_pin hs_jack_pins[] = {
++ {
++ .pin = "Headset Mic",
++ .mask = SND_JACK_MICROPHONE,
++ },
++ {
++ .pin = "Stereo Out",
++ .mask = SND_JACK_HEADPHONE,
++ .invert = 1,
++ },
++};
++
++static struct snd_soc_jack_gpio hs_jack_gpios[] = {
++ {
++ .gpio = GTA02_GPIO_JACK_INSERT,
++ .name = "headset-gpio",
++ .report = SND_JACK_HEADSET,
++ .debounce_time = 100,
++ },
++};
++
++
++
+ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
+ {
+ int err;
+@@ -566,6 +593,24 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec)
+
+ snd_soc_dapm_sync(codec);
+
++ err = snd_soc_jack_new(&neo1973, "Headset Jack", SND_JACK_HEADSET, &hs_jack);
++ if (err) {
++ dev_err(codec->card->dev, "failed to alloc headset jack\n");
++ return err;
++ }
++
++ err = snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins), hs_jack_pins);
++ if (err) {
++ dev_err(codec->card->dev, "failed to add headset jack pins\n");
++ return err;
++ }
++
++ err = snd_soc_jack_add_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios), hs_jack_gpios);
++ if (err) {
++ dev_err(codec->card->dev, "failed to add headset jack gpios\n");
++ return err;
++ }
++
+ return 0;
+ }
+
+@@ -740,6 +785,7 @@ static inline void neo1973_gta02_exit(void) {}
+ static void __exit neo1973_exit(void)
+ {
+ snd_soc_unregister_dai(&bt_dai);
++ snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios), hs_jack_gpios);
+ platform_device_unregister(neo1973_snd_device);
+
+ if (machine_is_neo1973_gta01())
diff --git a/recipes/linux/linux-openmoko-2.6.32_git.bb b/recipes/linux/linux-openmoko-2.6.32_git.bb
index 56e8698bf4..a44a715496 100644
--- a/recipes/linux/linux-openmoko-2.6.32_git.bb
+++ b/recipes/linux/linux-openmoko-2.6.32_git.bb
@@ -4,7 +4,7 @@ require linux-openmoko.inc
KERNEL_RELEASE="2.6.32.13"
SRCREV = "a9254be10ac2294ea20165a87c09ea6afcf66d94"
-OEV = "oe3.1"
+OEV = "oe3.2"
PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCPV}"
SRC_URI = "\
@@ -36,6 +36,8 @@ SRC_URI = "\
file://touchscreen_ignoreunexpectedintr29.patch \
# fix WS
file://0001-glamo-core-initialize-engine-states-as-disabled.patch \
+# fix HS Jack
+ file://hs-jack.patch \
"
SRC_URI[stablepatch.md5sum] = "ba6abb1ffee513a1d4f831599ddae490"