Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-21 Thread Takashi Iwai
At Mon, 20 Apr 2009 22:54:25 +0200, Jean Delvare wrote: The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Tested-by: Johannes Berg johan...@sipsolutions.net Tested-by: Andreas

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-21 Thread Johannes Berg
Hi, Have you taken care of snd-powermac similarly? Yes I did, see my patch keywest: Convert to new-style i2c driver to the alsa-devel and linuxppc-dev mailing lists: http://ozlabs.org/pipermail/linuxppc-dev/2009-April/070884.html Would you be able to test this patch? This would be very

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-21 Thread Jean Delvare
Hi Johannes, On Mon, 20 Apr 2009 23:04:52 +0200, Johannes Berg wrote: On Mon, 2009-04-20 at 22:54 +0200, Jean Delvare wrote: The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare

[PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-20 Thread Jean Delvare
The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Tested-by: Johannes Berg johan...@sipsolutions.net Tested-by: Andreas Schwab sch...@linux-m68k.org Cc: Benjamin Herrenschmidt

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-20 Thread Johannes Berg
On Mon, 2009-04-20 at 22:54 +0200, Jean Delvare wrote: The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Tested-by: Johannes Berg johan...@sipsolutions.net Tested-by: Andreas

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-16 Thread Jean Delvare
On Tue, 14 Apr 2009 16:45:38 +0200, Takashi Iwai wrote: Johannes, please let me know if the patch works. Then I'll merge them. Note if it matters: the new I2C binding model my patch uses is only available since kernel 2.6.26. -- Jean Delvare ___

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-16 Thread Takashi Iwai
At Thu, 16 Apr 2009 09:53:39 +0200, Jean Delvare wrote: On Tue, 14 Apr 2009 16:45:38 +0200, Takashi Iwai wrote: Johannes, please let me know if the patch works. Then I'll merge them. Note if it matters: the new I2C binding model my patch uses is only available since kernel 2.6.26. Yep,

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-15 Thread Jean Delvare
On Wed, 15 Apr 2009 00:48:08 +0200, Andreas Schwab wrote: Jean Delvare kh...@linux-fr.org writes: Hi Johannes, On Tue, 14 Apr 2009 19:41:55 +0200, Johannes Berg wrote: Alright, with the patch Andreas pointed out it loads, but segfaults, as below. Works fine without your patch.

[PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers (v3)

2009-04-15 Thread Jean Delvare
The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Cc: Johannes Berg johan...@sipsolutions.net Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Tested-by: Andreas Schwab

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-15 Thread Johannes Berg
Hi, Because the device-tree is broken -- there are two nodes for the same device, and only one of them can be used. Then the fabric rejects the first instantiation from the broken node. Here's how it looks normally: ... [ 10.398296] snd-aoa-codec-onyx: found pcm3052 [

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers (v3)

2009-04-15 Thread Johannes Berg
On Wed, 2009-04-15 at 14:22 +0200, Jean Delvare wrote: The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Cc: Johannes Berg johan...@sipsolutions.net Cc: Benjamin Herrenschmidt

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-15 Thread Jean Delvare
On Wed, 15 Apr 2009 14:52:14 +0200, Johannes Berg wrote: OK, I understand better what is going on now. I do not understand the crash at the end though, but I suspect it isn't a bug in my code but simply a faulty error path which had never been taken before. That would be weird -- the

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-15 Thread Johannes Berg
On Wed, 2009-04-15 at 15:06 +0200, Jean Delvare wrote: That would be weird -- the error path _has_ to be taken always in onyx. Unless you're talking about something in the i2c core or whatever? Yes, i2c core or even driver core. I'll see if I can reproduce it. Alright. (...) Well,

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-15 Thread Jean Delvare
On Wed, 15 Apr 2009 15:18:10 +0200, Johannes Berg wrote: On Wed, 2009-04-15 at 15:06 +0200, Jean Delvare wrote: Yes, i2c core or even driver core. I'll see if I can reproduce it. Alright. Hmm, couldn't reproduce it. Maybe it is fixed in rc2. I don't have too much time to spend on this, so

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers (v3)

2009-04-15 Thread Jean Delvare
On Wed, 15 Apr 2009 15:00:44 +0200, Johannes Berg wrote: On Wed, 2009-04-15 at 14:22 +0200, Jean Delvare wrote: The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. Signed-off-by: Jean Delvare kh...@linux-fr.org Cc:

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Jean Delvare
On Fri, 10 Apr 2009 17:02:38 +0200, Jean Delvare wrote: On Thu, 9 Apr 2009 14:19:45 +0200, Jean Delvare wrote: From: Jean Delvare kh...@linux-fr.org Subject: AOA: Convert onyx and tas codecs to new-style i2c drivers The legacy i2c binding model is going away soon, so convert the AOA

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Takashi Iwai
At Tue, 14 Apr 2009 16:37:41 +0200, Jean Delvare wrote: On Fri, 10 Apr 2009 17:02:38 +0200, Jean Delvare wrote: On Thu, 9 Apr 2009 14:19:45 +0200, Jean Delvare wrote: From: Jean Delvare kh...@linux-fr.org Subject: AOA: Convert onyx and tas codecs to new-style i2c drivers The

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Johannes Berg
On Thu, 2009-04-09 at 14:19 +0200, Jean Delvare wrote: From: Jean Delvare kh...@linux-fr.org Subject: AOA: Convert onyx and tas codecs to new-style i2c drivers The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break. So I went to

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Johannes Berg
On Tue, 2009-04-14 at 17:40 +0200, Johannes Berg wrote: So I went to test this, but for some reason aoa doesn't work for me at all, neither with nor without this patch. The reason seems to be that aoa_fabric_layout_probe() is never called, but my driver model fu is weak so I can't tell why

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Andreas Schwab
Johannes Berg johan...@sipsolutions.net writes: So I went to test this, but for some reason aoa doesn't work for me at all, neither with nor without this patch. That is already fixed by

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Jean Delvare
Hi Johannes, On Tue, 14 Apr 2009 17:50:27 +0200, Johannes Berg wrote: On Tue, 2009-04-14 at 17:40 +0200, Johannes Berg wrote: So I went to test this, but for some reason aoa doesn't work for me at all, neither with nor without this patch. The reason seems to be that

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Johannes Berg
On Tue, 2009-04-14 at 18:48 +0200, Andreas Schwab wrote: Johannes Berg johan...@sipsolutions.net writes: So I went to test this, but for some reason aoa doesn't work for me at all, neither with nor without this patch. That is already fixed by

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Johannes Berg
On Tue, 2009-04-14 at 17:51 +0200, Johannes Berg wrote: On Tue, 2009-04-14 at 17:40 +0200, Johannes Berg wrote: So I went to test this, but for some reason aoa doesn't work for me at all, neither with nor without this patch. The reason seems to be that aoa_fabric_layout_probe() is

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Jean Delvare
Hi Johannes, On Tue, 14 Apr 2009 19:41:55 +0200, Johannes Berg wrote: Alright, with the patch Andreas pointed out it loads, but segfaults, as below. Works fine without your patch. Thanks for the quick test and sorry that it didn't work. I'll take a look at the trace below and try to figure out

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Johannes Berg
Hi Jean, Thanks for the quick test and sorry that it didn't work. I'll take a look at the trace below and try to figure out what went wrong. No worries, seems some error path is going wrong but I can't see what it is right now. Did you remove the 2 MODULE_DEVICE_TABLE from my patch? If you

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-14 Thread Andreas Schwab
Jean Delvare kh...@linux-fr.org writes: Hi Johannes, On Tue, 14 Apr 2009 19:41:55 +0200, Johannes Berg wrote: Alright, with the patch Andreas pointed out it loads, but segfaults, as below. Works fine without your patch. Thanks for the quick test and sorry that it didn't work. I'll take a

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-10 Thread Jean Delvare
On Thu, 9 Apr 2009 14:19:45 +0200, Jean Delvare wrote: From: Jean Delvare kh...@linux-fr.org Subject: AOA: Convert onyx and tas codecs to new-style i2c drivers The legacy i2c binding model is going away soon, so convert the AOA codec drivers to the new model or they'll break.

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-09 Thread Johannes Berg
Hi Jean! Yes, probing would be duplicated if we had to support more than one bus. But as far as I can see, the onyx and tas devices can only be found on i2c-powermac buses, so this shouldn't be an issue. And there isn't really any probing going on, it's really only a matter of walking a

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-09 Thread Jean Delvare
Hi Johannes, On Thu, 09 Apr 2009 09:44:49 +0200, Johannes Berg wrote: Can you please point me to the layout fabric / aoa fabric? I'd like to understand how it works. Then I may be able to rewrite my patch completely differently. That's in sound/aoa/fabric/layout.c OK, I understand how

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-09 Thread Johannes Berg
Hi Jean, OK, I understand how it works now, thanks for pointing me to the relevant piece of code. It's easier to modify the code when you understand the current logic ;) :) The idea is to assign fixed i2c bus numbers to the relevant i2c buses, and declare the i2c devices connected to each

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-09 Thread Jean Delvare
Hi Johannes, On Thu, 09 Apr 2009 14:34:44 +0200, Johannes Berg wrote: My new approach doesn't auto-load anything. Here we go, what you think? This time there is no logic change, I'm really only turning legacy code into new-style i2c code (basically calling i2c_new_device() instead of

[PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-08 Thread Jean Delvare
Hi all, The legacy i2c model is going away soon, the remaining drivers that still use it need to be converted very quickly. There are 3 sound drivers remaining: sound/aoa/codecs/onyx.c sound/aoa/codecs/tas.c sound/ppc/keywest.c I've given a try to the former two, patch below. I could only

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-08 Thread Johannes Berg
Hi! Basically the idea is to move the I2C device instantiation from the codec drivers (onyx, tas) to the I2C adapter driver (i2c-powermac.) This follows the Linux device driver model, requires slightly less code, runs faster and and lets the required chip drivers be loaded by udev or similar

Re: [PATCH] AOA: Convert onyx and tas codecs to new-style i2c drivers

2009-04-08 Thread Jean Delvare
Hi Johannes, Thanks for the fast answer. On Wed, 08 Apr 2009 17:51:39 +0200, Johannes Berg wrote: Basically the idea is to move the I2C device instantiation from the codec drivers (onyx, tas) to the I2C adapter driver (i2c-powermac.) This follows the Linux device driver model, requires