Subject: Re: Snapper driver does not attach with sound card on Mac Mini
To: Marco Trillo <marcotrillo@gmail.com>
From: Emmanuel Kasper <kdev@no-log.org>
List: port-macppc
Date: 11/10/2006 02:12:50
Hello !

On Thu, 9 Nov 2006 21:29:03 +0100
"Marco Trillo" <marcotrillo@gmail.com> wrote:

> Hi,
> 
> On 11/9/06, Emmanuel Kasper <kdev@no-log.org> wrote:
> > Hello
> > Using NetBSD 3.1 kernel on a Mac Mini, the snapper driver does not
> > attach to the
> > sound card. I see in my dmesg something like :
> > unconfigured device at obio0 offset 0x10000
> >
> > Doing the quick hack  of commenting some lines mentionned here
> > http://www-128.ibm.com/developerworks/power/library/pa-macmini2/
> > the driver does appears
> > snapper0 at obio0 offset 0x10000: irq 30,1,2
> >
> > Is this problem known or fixed in current ?
> 
> It appears that it's fixed since revision 1.10 of snapper.c. If you
> want to try if it works for the Mac Mini, you can replace, in the
> snapper_match() function:
> 
> 	if (strcmp(compat, "snapper") != 0)
> 		return 0;
> 
> by:
> 
> 	if (strcmp(compat, "snapper") == 0)
> 		return 1;
> 		
> 	if (OF_getprop(soundchip,"platform-tas-codec-ref",
> 	    &soundcodec, sizeof soundcodec) == sizeof soundcodec)
> 		return 1;
> 
> 	return 0;
> 
> And see if it works for you.
> 
> 
> >
> > Manu
> >
> 
> 
> -- 
> 
>      -Marco

 
Updating the snapper.c to 1.10 was a no go because it requires extra files.

../../../../arch/macppc/dev/snapper.c:52:31: macppc/dev/deqvar.h: No such file or directory
mkdep: compile failed.
*** Error code 1

However with your snippet of code the driver builds and attachs correctly to the device.

Thanks for the help

Manu