Skip to content

Commit

Permalink
[PATCH] PowerBook 6,1: headphone not detected after suspend
Browse files Browse the repository at this point in the history
ever since suspend to disk works I had the problem that headphone
(un)plugging doesn't get detected properly anymore after the first
resume.
Reloading the module worked around this ever since, however the real
cause of the problem was that after a resume the driver only got
interrupts on "unplug" not on "plug". Reactivating the headphone status
interrupt in tumbler_resume fixes this. This shouldn't cause
any trouble with software suspend, but it would be nice if somebody
could confirm this:

Signed-off-by: Guido Guenther <agx@sigxcpu.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Guido Guenther authored and Paul Mackerras committed Nov 16, 2005
1 parent b5166cc commit c0ce5c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/ppc/tumbler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,14 @@ static void tumbler_resume(pmac_t *chip)
tumbler_set_master_volume(mix);
if (chip->update_automute)
chip->update_automute(chip, 0);
if (mix->headphone_irq >= 0)
if (mix->headphone_irq >= 0) {
unsigned char val;

enable_irq(mix->headphone_irq);
/* activate headphone status interrupts */
val = do_gpio_read(&mix->hp_detect);
do_gpio_write(&mix->hp_detect, val | 0x80);
}
if (mix->lineout_irq >= 0)
enable_irq(mix->lineout_irq);
}
Expand Down

0 comments on commit c0ce5c5

Please sign in to comment.