Skip to contentSkip to conversation

RFC: [PATCH] snd-pmac-gpio interface

PATCH Ben Collins 1 participant 1 message Jan 19, 2006 Sound

lore
Share & tools
lore
#0 lore raw

Attached are the patches I've come up with for a central snd-pmac-gpio interface (for toonie and tumbler). This was BenH's suggestion.

It uses platform functions, but falls back on direct gpio. I had to guess some of the tumbler/toonie consolidation for direct gpio fallback, and I can't test tumbler.

Anyway, the first patch adds the snd-pmac-gpio.[ch] to the build. The second and third patches are toonie and tumbler conversions to this interface.

BenH, these patches are against 2.6.15, and so depend on the patches I sent you previously to backport the pmac_pfunc interfaces. They should apply and work with current 2.6.16-git without those patches.

I've tested the toonie on my G4 PB 17" (PowerBook5,9). You'll need to add 0x54 to the toonie list in pmac.c for that to work (BenH, you might want to just do that one-liner by hand, but I can send an actual diff if you need). I still have an issue with toonie on this PB, in that it doesn't work initially until I cause a headphone/lineout interrupt (plug/unplug headphones). I might have fixed this in the below patch, but I haven't rebooted to see if it comes up correctly or not.

sound/ppc/Makefile +2 -1
diff -urN linux-2.6/sound/ppc/Makefile linux-source-2.6.15-2.6.15/sound/ppc/Makefile
@@ -3,7 +3,8 @@
 # Copyright (c) 2001 by Jaroslav Kysela <[email protected]>
 #
 
-snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o toonie.o keywest.o beep.o
+snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o \
+	toonie.o keywest.o beep.o snd-pmac-gpio.o
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o
sound/ppc/snd-pmac-gpio.c +248 -0

248 lines not on this page · raw message

sound/ppc/snd-pmac-gpio.h +63 -0

63 lines not on this page · raw message

sound/ppc/toonie.c +71 -157

341 lines not on this page · raw message

sound/ppc/tumbler.c +84 -254

493 lines not on this page · raw message

--
Ben Collins
Kernel Developer
Ubuntu Linux