summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRisto Suominen <Risto.Suominen@gmail.com>2010-04-04 08:00:00 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-09 15:55:18 -0700
commitacf75a8aa32686e8d37253ca70ae2cd1158560f3 (patch)
tree79c3ba65996b7860b0ee7f9de89a6b78f1eac0fc /sound
parent0d387be93a90e4943a1023caf65468cb4939afd5 (diff)
downloadlwn-acf75a8aa32686e8d37253ca70ae2cd1158560f3.tar.gz
lwn-acf75a8aa32686e8d37253ca70ae2cd1158560f3.zip
ALSA: powermac - Lineout detection on G4 DA
commit b6d7335001f331f2d295ff15d67e385615ceff81 upstream. Lineout (Pro Speaker) detection 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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/ppc/tumbler.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index d2502e79341c..578c9f2af7d3 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1137,7 +1137,8 @@ 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 = IS_G4DA && !strcmp(device, "keywest-gpio15");
+ gp->active_state = IS_G4DA
+ && !strncmp(device, "keywest-gpio1", 13);
gp->active_val = 0x4;
gp->inactive_val = 0x5;
/* Here are some crude hacks to extract the GPIO polarity and
@@ -1315,6 +1316,9 @@ static int __devinit tumbler_init(struct snd_pmac *chip)
if (irq <= NO_IRQ)
irq = tumbler_find_device("line-output-detect",
NULL, &mix->line_detect, 1);
+ if (IS_G4DA && irq <= NO_IRQ)
+ irq = tumbler_find_device("keywest-gpio16",
+ NULL, &mix->line_detect, 1);
mix->lineout_irq = irq;
tumbler_reset_audio(chip);