PowerMac7,3 sound (was: PowerBook5,4 -- no sound?)

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu May 18 13:13:42 EST 2006


On Wed, 2006-05-17 at 12:34 +0200, Johannes Berg wrote:
> > > request_mem_region(80000000 - 80000fff, i2sbus control)
> > > 
> > >       80000000-8007ffff : 0.80000000:mac-io
> > >         8000002c-8000002f : 0.0000004c:fans
> > >         80000030-80000033 : 0.0000004c:fans
> > >         80000034-80000037 : 0.0000004c:fans
> > >         8000004c-8000004f : 0.0000004c:fans
> > >         80000050-8000008a : 0.00000050:gpio
> 
> > Look like the bugs in the device-tree I told you about ...
> 
> Ben, is it safe to just hardcode 0x80010000-0x80010fff? Or hardcode
> 0x10000-0x10fff and have it do the translation depending on the
> device-tree node, iow assume that the 'reg' property is bogus and
> essentially replace it with one that contains the values
>   0x00010000 0x00001000 (buggy one seems to be 0x00000000 0x00001000)
>   0x00008000 0x00000100
>   0x00008100 0x00000100
> and then go from there? Even then though, I have no idea how to do the
> ranges translation for the node. Maybe we should just fix up the reg
> property in the device-tree for the affected machine(s)?

I'd rather avoid hard-coding in fact. I'm trying to figure out a better
way.

> Btw, it doesn't look like snd-powermac handles this correctly, it only
> ever handles the rx/tx specially and also takes the control io area
> straight from the device tree.
> 
> Andreas, you'll probably be able to get a bit further by inserting the
> following code in front of the loop in i2sbus-core.c line 162, and
> removing the of_address_to_resource call inside the loop.
> 
>   dev->resources[0].start = 0x80010000;
>   dev->resources[0].end   = 0x80010fff;
>   dev->resources[1].start = 0x80008000;
>   dev->resources[1].end   = 0x800080ff;
>   dev->resources[2].start = 0x80008100;
>   dev->resources[2].end   = 0x800081ff;
> 
> But I'm not sure that is correct on all machines (in fact, I'm not
> perfectly sure it is correct on your machine).
> 
> After that, you'll probably still not have usable sound though because I
> know nothing about the layout-id of your machine. If I have support for
> your codec already, that should be easy though.
> 
> johannes




More information about the Linuxppc-dev mailing list