Bug 52041 - [PATCH]After upgrade 3.4.9 -> 3.5.7 on iBook G4 - snd-aoa-codec-tas driver does not find i2c device
Summary: [PATCH]After upgrade 3.4.9 -> 3.5.7 on iBook G4 - snd-aoa-codec-tas driver do...
Status: CLOSED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: PPC-32 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: platform_ppc-32
URL: https://bugs.gentoo.org/show_bug.cgi?...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-27 07:18 UTC by Paul Osmialowski
Modified: 2016-01-20 23:38 UTC (History)
5 users (show)

See Also:
Kernel Version: 3.5.7
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
requested dev tree snapshot from running 3.5.7 (16.92 KB, application/x-bzip2)
2013-01-03 06:01 UTC, Paul Osmialowski
Details
requested dmesg from running 3.5.7 (36.13 KB, text/plain)
2013-01-03 06:02 UTC, Paul Osmialowski
Details
Add a layout entry for PowerMac6,5 (884 bytes, patch)
2013-01-04 03:04 UTC, Michael Ellerman
Details | Diff
Add a layout entry for PowerMac6,5 and glue (1.50 KB, patch)
2013-01-04 03:34 UTC, Michael Ellerman
Details | Diff
device tree after applying a patch (16.94 KB, application/x-bzip2)
2013-01-04 05:53 UTC, Paul Osmialowski
Details
dmesg 3.5.7 after applying a patch (36.23 KB, text/plain)
2013-01-04 05:54 UTC, Paul Osmialowski
Details

Description Paul Osmialowski 2012-12-27 07:18:42 UTC
Original message:

I've updated kernel on my iBook G4 to 3.5.7 and now the sound is gone. I'm always trying to keep the same .config file between versions so it must have something changed in the snd driver source. I booted 3.4.9 back and sound is back. Dmesg on 3.4.9 says:

[    9.172879] i2c i2c-0: PMac Keywest Audio: attach_adapter method is deprecated
[    9.179522] i2c i2c-0: Please use another way to instantiate your i2c_client
[    9.186147] i2c i2c-1: PMac Keywest Audio: attach_adapter method is deprecated
[    9.192745] i2c i2c-1: Please use another way to instantiate your i2c_client
[    9.199305] i2c i2c-2: PMac Keywest Audio: attach_adapter method is deprecated
[    9.205880] i2c i2c-2: Please use another way to instantiate your i2c_client
[    9.212573] i2c i2c-3: PMac Keywest Audio: attach_adapter method is deprecated
[    9.219141] i2c i2c-3: Please use another way to instantiate your i2c_client
[    9.225796] i2c i2c-4: PMac Keywest Audio: attach_adapter method is deprecated
[    9.232436] i2c i2c-4: Please use another way to instantiate your i2c_client
[    9.289233] input: PowerMac Beep as /devices/pci0001:10/0001:10:17.0/input/input3
[    9.297287] i2c i2c-0: aoa_codec_onyx: attach_adapter method is deprecated
[    9.304091] i2c i2c-0: Please use another way to instantiate your i2c_client
[    9.310996] i2c i2c-1: aoa_codec_onyx: attach_adapter method is deprecated
[    9.317913] i2c i2c-1: Please use another way to instantiate your i2c_client
[    9.324838] i2c i2c-2: aoa_codec_onyx: attach_adapter method is deprecated
[    9.331715] i2c i2c-2: Please use another way to instantiate your i2c_client
[    9.338683] i2c i2c-3: aoa_codec_onyx: attach_adapter method is deprecated
[    9.345643] i2c i2c-3: Please use another way to instantiate your i2c_client
[    9.352608] i2c i2c-4: aoa_codec_onyx: attach_adapter method is deprecated
[    9.359587] i2c i2c-4: Please use another way to instantiate your i2c_client
[    9.366681] i2c i2c-0: aoa_codec_tas: attach_adapter method is deprecated
[    9.373721] i2c i2c-0: Please use another way to instantiate your i2c_client
[    9.380767] i2c i2c-1: aoa_codec_tas: attach_adapter method is deprecated
[    9.387806] i2c i2c-1: Please use another way to instantiate your i2c_client
[    9.394826] i2c i2c-2: aoa_codec_tas: attach_adapter method is deprecated
[    9.401819] i2c i2c-2: Please use another way to instantiate your i2c_client
[    9.408818] snd-aoa-codec-tas: found 'deq' node
[    9.408831] i2c i2c-2: Failed to register i2c client aoa_codec_tas at 0x35 (-16)
[    9.415836] i2c i2c-3: aoa_codec_tas: attach_adapter method is deprecated
[    9.422814] i2c i2c-3: Please use another way to instantiate your i2c_client
[    9.429780] i2c i2c-4: aoa_codec_tas: attach_adapter method is deprecated
[    9.436736] i2c i2c-4: Please use another way to instantiate your i2c_client

On 3.5.7 it looks pretty much like this above, except that whole aoa_codec_onyx deprecation warnings are gone (!) and tas found message looks different:
snd-aoa-codec-tas: tas found, addr ... (I don't have original log now, this is produced by printk(KERN_DEBUG "snd-aoa-codec-tas: tas found, addr 0x%02x on %s\n", addr ... line in /linux/sound/aoa/codecs/snd-aoa-codec-tas.c), theres no "'deq' node" piece in 3.5.7 dmesg.

When there's no sound, udev does not create mixer and audio output devices, alsamixer, aumix nor mplayer -ao oss does not work - all these thing complain they can't find devices in /dev tree.

This bug does not affect my other G4 machine (PowerBook alluminium), I upgraded it to 3.5.7 some time ago and sound is working fine, alsamixer starts without single complain, dmesg for 3.5.7 says much less than on iBook:

[   13.835230] snd-powermac no longer handles any machines with a layout-id property in the device-tree, use snd-aoa.
[   13.838870] snd-aoa-fabric-layout: Using direct GPIOs
[   13.839437] snd-aoa-fabric-layout: can use this codec
[   13.908550] snd-aoa-codec-tas: tas found, addr 0x35 on /pci@f2000000/mac-io@17/i2c@18000/deq@6a


Comment from gentoo.org:

See http://lists.lm-sensors.org/pipermail/lm-sensors/2011-April/032320.html which reveals in an short explanation that

> attach_adapter is scheduled to be removed in September 2011. The message
> above is a help call from the ... driver, asking for someone to rewrite it to
> match the current API.

The audio driver and codec have been calling a method that was removed from the kernel over time, the warning produced warns the audio developer of that. So, when the method was finally removed between 3.4.9 and 3.5.7 you no longer have audio since the method is gone. In order to get your audio back, you will need the developer to rewrite the broken part of the audio driver or find an alternative driver if one exists.

So, I would suggest you to report this at the kernel bugzilla to at least make the developer(s) aware; make sure to search first, to see if a bug exist already. When you do that, please link this bug to that upstream bug such that the bugs cat track each other.

Good luck!
Comment 1 Alan 2013-01-02 14:50:42 UTC
To be brutally honest I think this is going to be a "send patches" case. Nobody bothered despite it being obsoleted so if you want it to continue to be supported you'll need to supply the fixes
Comment 2 Michael Ellerman 2013-01-03 03:33:12 UTC
Can you attach the actual dmesg from 3.5.7, and a tarball of /proc/device-tree?
Have you tried 3.6?
Comment 3 Paul Osmialowski 2013-01-03 06:01:32 UTC
Created attachment 90251 [details]
requested dev tree snapshot from running 3.5.7
Comment 4 Paul Osmialowski 2013-01-03 06:02:05 UTC
Created attachment 90261 [details]
requested dmesg from running 3.5.7
Comment 5 Paul Osmialowski 2013-01-03 06:05:44 UTC
I attached requested files. I may try to run 3.6.11 during the weekend, I doubt it will help - iBook G4 with Linux is rather unusual so I doubt anyone noticed that something stopped to work after some method was removed.
Comment 6 Michael Ellerman 2013-01-04 03:02:30 UTC
A full dmesg for 3.4 (the working version) would be helpful too, I can't quite work out what is going on from the bits you pasted.
Comment 7 Michael Ellerman 2013-01-04 03:04:30 UTC
Created attachment 90341 [details]
Add a layout entry for PowerMac6,5

This patch /might/ help, it adds an entry to the newer driver to detect your machine type.
Comment 8 Michael Ellerman 2013-01-04 03:34:34 UTC
Created attachment 90351 [details]
Add a layout entry for PowerMac6,5 and glue

Sorry, try this one instead. There's a bit more too it. This probably won't work, but hopefully it will get us closer to something that does.
Comment 9 Paul Osmialowski 2013-01-04 05:53:40 UTC
Created attachment 90361 [details]
device tree after applying a patch
Comment 10 Paul Osmialowski 2013-01-04 05:54:23 UTC
Created attachment 90371 [details]
dmesg 3.5.7 after applying a patch
Comment 11 Paul Osmialowski 2013-01-04 05:56:53 UTC
Seems like your patch worked. At least alsamixer now started and found a mixer. I'm off to work now, I'll test it thoroughly today evening and let you know if it really works.
Comment 12 Paul Osmialowski 2013-01-04 19:50:02 UTC
I can confirm, it works. No additional dmesg messages were thrown during audio play.
Comment 13 Wolfram Sang 2015-05-08 19:05:23 UTC
Can be closed, patch went upstream as 088578617d2aaab05ea96b529f16c9a2f1cfbbee.

Note You need to log in before you can comment on or make changes to this bug.