No mixer with Snapper
Marco Trillo
marcotrillo at gmail.com
Sun Mar 1 08:13:16 PST 2009
Hi,
On 3/1/09, Justin Hibbits <jrh29 at alumni.cwru.edu> wrote:
> On Sun, Mar 01, 2009 at 01:45:57PM +0100, Marco Trillo wrote:
>> On 2/28/09, Justin Hibbits <jrh29 at alumni.cwru.edu> wrote:
>> > After upgrading my kernel to one with the Snapper audio driver
>> > integrated,
>> > there
>> > is no longer a /dev/mixer, so mixer setting does not work. I have a DSP
>> > device,
>> > and sound does play, it's just very quiet. Output from sndstat is:
>> >
>> > FreeBSD Audio Driver (newpcm: 32bit 2007061600/powerpc)
>> > Installed devices:
>> > pcm0: <Apple I2S Audio Controller> at i2s [MPSAFE] (1p:1v/0r:0v channels
>> > default)
>> >
>> > Previously I was using Marco's AOA2 patch, which worked well, and had an
>> > adjustable mixer.
>> >
>>
>> Hmm... the version of the AOA driver in -current changed the way the
>> mixer is detected: it now attaches a real I2C device driver to the
>> mixer device node.
>>
>> It seems that in this case the device node properties are different to
>> what the driver knows, so it fails to match.
>>
>> Could you send the output of the 'i2c' OF device tree? Something like
>> the following, from FreeBSD -current:
>>
>> % ofwdump -pr mac-io/i2c
>>
>
> Attached is the output of ofwdump.
>
Thanks! The problem is that an <i2c-address> property is used, while
the OFW-I2C code only looks for <reg>.
The attached patch -- to apply in /usr/src/sys -- makes the OFW-I2C
code also look for the <i2c-address> property. With the patch, the
mixer should attach and work fine.
Regards
Marco
-------------- next part --------------
--- dev/ofw/ofw_iicbus.c.orig 2009-03-01 16:41:57.000000000 +0100
+++ dev/ofw/ofw_iicbus.c 2009-03-01 16:45:50.000000000 +0100
@@ -118,7 +118,8 @@
node = ofw_bus_get_node(dev);
for (child = OF_child(node); child != 0; child = OF_peer(child)) {
- if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1)
+ if (OF_getprop(child, "reg", &addr, sizeof(addr)) == -1 &&
+ OF_getprop(child, "i2c-address", &addr, sizeof(addr)) == -1)
continue;
/*
More information about the freebsd-ppc
mailing list