[alsa-devel] bug in spi and i2c dual buses codecs
Hi Mark/Liam, I think there is really a bug in spi and i2c dual buses codecs drivers, for example, for any codec with two buses, if you config kernel like this:
SPI MASTER built-in I2C module Codec built-in
You will get a link error like this: sound/built-in.o: In function `i2c_add_driver': include/linux/i2c.h:423: undefined reference to `i2c_register_driver' sound/built-in.o: In function `ad193x_modexit': sound/soc/codecs/ad193x.c:537: undefined reference to `i2c_del_driver' make: *** [.tmp_vmlinux1] Error 1
I remember that is also one reason why we have splitted this kind of driver into three parts(codec core, i2c bus, spi bus).
In fact, if any bus is compiled as module and code is built-in, link error will be reported. Thanks Barry
On Mon, Mar 29, 2010 at 02:24:28PM +0800, Barry Song wrote:
In fact, if any bus is compiled as module and code is built-in, link error will be reported.
Yes, this is expected behaviour. It's not been a practical problem - the combination of audio built in and one of the buses modular is far from common.
On Mon, Mar 29, 2010 at 5:49 PM, Mark Brown broonie@opensource.wolfsonmicro.com wrote:
On Mon, Mar 29, 2010 at 02:24:28PM +0800, Barry Song wrote:
In fact, if any bus is compiled as module and code is built-in, link error will be reported.
Yes, this is expected behaviour. It's not been a practical problem - the combination of audio built in and one of the buses modular is far from common.
Ok. if so, practically, people should either built-in all, or keep codec driver as module if anyone of i2c and spi is module.
On Mon, Mar 29, 2010 at 05:49, Mark Brown wrote:
On Mon, Mar 29, 2010 at 02:24:28PM +0800, Barry Song wrote:
In fact, if any bus is compiled as module and code is built-in, link error will be reported.
Yes, this is expected behaviour. It's not been a practical problem - the combination of audio built in and one of the buses modular is far from common.
knowingly breaking randconfig is viewed as a bad thing by people on lkml -mike
On Mon, Mar 29, 2010 at 02:25:02PM -0400, Mike Frysinger wrote:
On Mon, Mar 29, 2010 at 05:49, Mark Brown wrote:
Yes, this is expected behaviour. ??It's not been a practical problem - the combination of audio built in and one of the buses modular is far from common.
knowingly breaking randconfig is viewed as a bad thing by people on lkml
Right, the machine drivers need to take care of this when they select the CODEC drivers like SND_SOC_ALL_CODECS does (at least with drivers for the platforms where people care about that, anyway - I'm not going to insist on it for random machines that hardly ever get built).
This isn't exactly something that's been introduced just recently, we've been doing this for some considerable time - well over a year.
participants (3)
-
Barry Song
-
Mark Brown
-
Mike Frysinger