feedback: Apple Tumbler and Snapper audio: looking for testers
Marco Trillo
marcotrillo at gmail.com
Tue Nov 4 01:59:10 PST 2008
Hi,
On Mon, Nov 3, 2008 at 9:26 PM, Andreas Tobler <andreast-list at fgznet.ch> wrote:
> took a while, but finally I managed to test your patch on my AluBook.
>
> It seems to work. I can hear a very quite output either on built-in speaker
> or on headphones.
>
> I've done this on yesterdays src tree. Including my speed hacks.
>
> The messages from the kernel:
>
[...]
> kiic0: <Keywest I2C controller> mem 0x18000-0x18fff irq 26 on macio0
>
[...]
> Unfortunately I do not seem to be able to use the mixer correctly. mixer
> doesn't report a default device. So I can't set the volume.
Thanks a lot for testing the driver!
Hmm... it seems that it is not able to detect the codec, so the volume
cannot be changed.
I think the following patch should solve this problem -- it makes the
driver also look for a "layout-id" property and use that, if the other
match attempts have failed.
The patch is for the /usr/src/sys/dev/sound/macio/i2s.c file:
--- i2s.c.orig 2008-10-09 11:05:57.000000000 +0200
+++ i2s.c 2008-11-04 10:50:39.000000000 +0100
@@ -526,6 +526,11 @@
void (*init)(struct i2s_softc *);
int (*set_volume)(void *, int, int);
};
+enum {
+ I2S_CODEC_TUMBLER,
+ I2S_CODEC_SNAPPER,
+ I2S_CODEC_UNKNOWN
+};
static struct i2s_codec i2s_codecs[] = {
{"tumbler", NULL, 0x68, tumbler_init, tumbler_set_volume},
{"snapper", "tas", 0x6a, snapper_init, tumbler_set_volume},
@@ -569,6 +574,24 @@
return 0;
}
}
+
+ /* If still no match, try with `layout-id' property. */
+ if (OF_getprop(soundbus, "layout-id", &ref, sizeof(ref)) ==
+ sizeof(ref)) {
+
+ c = NULL;
+ switch (ref) {
+ case 41:
+ case 51:
+ c = &i2s_codecs[I2S_CODEC_SNAPPER];
+ break;
+ }
+
+ if (c != NULL) {
+ sc->codec = c;
+ return 0;
+ }
+ }
return -1;
}
Thanks!
Marco
More information about the freebsd-ppc
mailing list