diff options
author | Risto Suominen <Risto.Suominen@gmail.com> | 2010-04-04 00:59:30 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-04-04 06:25:02 -0400 |
commit | 819ef70b135ba66cd1659c913255686bf931e3d4 (patch) | |
tree | c3bdfba03cf0369b347b335d479a58e06fc98d9a /sound/ppc | |
parent | ec2755a93d5df044cb52558d2c778780272e0980 (diff) |
ALSA: powermac - Reverse HP detection on G4 DA
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>
Diffstat (limited to 'sound/ppc')
-rw-r--r-- | sound/ppc/tumbler.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c index 789f44f4ac78..3b7471c344b4 100644 --- a/sound/ppc/tumbler.c +++ b/sound/ppc/tumbler.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/kmod.h> | 30 | #include <linux/kmod.h> |
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/string.h> | ||
33 | #include <sound/core.h> | 34 | #include <sound/core.h> |
34 | #include <asm/io.h> | 35 | #include <asm/io.h> |
35 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
@@ -46,6 +47,8 @@ | |||
46 | #define DBG(fmt...) | 47 | #define DBG(fmt...) |
47 | #endif | 48 | #endif |
48 | 49 | ||
50 | #define IS_G4DA (machine_is_compatible("PowerMac3,4")) | ||
51 | |||
49 | /* i2c address for tumbler */ | 52 | /* i2c address for tumbler */ |
50 | #define TAS_I2C_ADDR 0x34 | 53 | #define TAS_I2C_ADDR 0x34 |
51 | 54 | ||
@@ -1134,7 +1137,7 @@ static long tumbler_find_device(const char *device, const char *platform, | |||
1134 | gp->inactive_val = (*base) ? 0x4 : 0x5; | 1137 | gp->inactive_val = (*base) ? 0x4 : 0x5; |
1135 | } else { | 1138 | } else { |
1136 | const u32 *prop = NULL; | 1139 | const u32 *prop = NULL; |
1137 | gp->active_state = 0; | 1140 | gp->active_state = IS_G4DA && !strcmp(device, "keywest-gpio15"); |
1138 | gp->active_val = 0x4; | 1141 | gp->active_val = 0x4; |
1139 | gp->inactive_val = 0x5; | 1142 | gp->inactive_val = 0x5; |
1140 | /* Here are some crude hacks to extract the GPIO polarity and | 1143 | /* Here are some crude hacks to extract the GPIO polarity and |