Commit 819ef70b authored by Risto Suominen's avatar Risto Suominen Committed by Takashi Iwai

ALSA: powermac - Reverse HP detection on G4 DA

Reverse headphone detection bit on PowerMac G4 Digital Audio (Tumbler).
Signed-off-by: default avatarRisto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ec2755a9
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/kmod.h> #include <linux/kmod.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/string.h>
#include <sound/core.h> #include <sound/core.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -46,6 +47,8 @@ ...@@ -46,6 +47,8 @@
#define DBG(fmt...) #define DBG(fmt...)
#endif #endif
#define IS_G4DA (machine_is_compatible("PowerMac3,4"))
/* i2c address for tumbler */ /* i2c address for tumbler */
#define TAS_I2C_ADDR 0x34 #define TAS_I2C_ADDR 0x34
...@@ -1134,7 +1137,7 @@ static long tumbler_find_device(const char *device, const char *platform, ...@@ -1134,7 +1137,7 @@ static long tumbler_find_device(const char *device, const char *platform,
gp->inactive_val = (*base) ? 0x4 : 0x5; gp->inactive_val = (*base) ? 0x4 : 0x5;
} else { } else {
const u32 *prop = NULL; const u32 *prop = NULL;
gp->active_state = 0; gp->active_state = IS_G4DA && !strcmp(device, "keywest-gpio15");
gp->active_val = 0x4; gp->active_val = 0x4;
gp->inactive_val = 0x5; gp->inactive_val = 0x5;
/* Here are some crude hacks to extract the GPIO polarity and /* Here are some crude hacks to extract the GPIO polarity and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment