summaryrefslogtreecommitdiffstats
path: root/releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch
diff options
context:
space:
mode:
Diffstat (limited to 'releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch')
-rw-r--r--releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch b/releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch
new file mode 100644
index 0000000..b8b6bb6
--- /dev/null
+++ b/releases/2.6.34.11/ALSA-powermac-Reverse-HP-detection-on-G4-DA.patch
@@ -0,0 +1,46 @@
+From c0c3cf14eb5ef8dcee1475ce222f50ed5a542516 Mon Sep 17 00:00:00 2001
+From: Risto Suominen <Risto.Suominen@gmail.com>
+Date: Sun, 4 Apr 2010 07:59:30 +0300
+Subject: [PATCH] ALSA: powermac - Reverse HP detection on G4 DA
+
+commit 819ef70b135ba66cd1659c913255686bf931e3d4 upstream.
+
+Reverse headphone detection bit on PowerMac G4 Digital Audio (Tumbler).
+
+Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
+
+diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
+index 789f44f..3b7471c 100644
+--- a/sound/ppc/tumbler.c
++++ b/sound/ppc/tumbler.c
+@@ -30,6 +30,7 @@
+ #include <linux/kmod.h>
+ #include <linux/slab.h>
+ #include <linux/interrupt.h>
++#include <linux/string.h>
+ #include <sound/core.h>
+ #include <asm/io.h>
+ #include <asm/irq.h>
+@@ -46,6 +47,8 @@
+ #define DBG(fmt...)
+ #endif
+
++#define IS_G4DA (machine_is_compatible("PowerMac3,4"))
++
+ /* i2c address for tumbler */
+ #define TAS_I2C_ADDR 0x34
+
+@@ -1134,7 +1137,7 @@ static long tumbler_find_device(const char *device, const char *platform,
+ gp->inactive_val = (*base) ? 0x4 : 0x5;
+ } else {
+ const u32 *prop = NULL;
+- gp->active_state = 0;
++ gp->active_state = IS_G4DA && !strcmp(device, "keywest-gpio15");
+ gp->active_val = 0x4;
+ gp->inactive_val = 0x5;
+ /* Here are some crude hacks to extract the GPIO polarity and
+--
+1.7.7
+