[alsa-devel] [PATCH 8/8] ASoC: Ux500: Add machine-driver
ola.o.lilja at stericsson.com
Wed May 2 10:27:52 CEST 2012
On 05/02/2012 10:17 AM, Mark Brown wrote:
> On Wed, May 02, 2012 at 10:10:31AM +0200, Ola Lilja wrote:
>> On 04/30/2012 12:04 PM, Mark Brown wrote:
>> > The code I'm referring to is this:
>> > which is definitely compile time. It's not the factoring stuff out,
>> > it's the way it's been done. Library code like Tegra uses isn't a
>> > problem but this sort of arrangement does cause problems.
>> OK, the thought with this was to be able to activate/deactivate the individual
>> codec-drivers since we have several separate codecs on our Ux500-platform (Note
>> that in this patch-set there is not patches for the other two codec-drivers).
>> Since we already knows at compile-time if any of these three codecs are present
>> we did it this ways, being able to add them separately in menuconfig.
> This really isn't the idiom mainline is looking for, you should be able
> to build a kernel which will boot on multiple boards. There's a reason
> why you don't see this sort of ifdef in other code...
I'm actually no fan of ifdefs, but let's say that the HDMI-driver is not
activated in menuconfig. This would lead to the point where the ASoC-driver
cannot be activated at all, although there is two codecs in the driver which
could have been used fine.
If this is the way forwards then I'll rewrite it this way.
>> How could we solve this? All three codec-drivers has dependancies to other stuff
>> being activated in menuconfig.
> Like I say, library style code like Tegra has is totally fine if there's
> stuff that can usefully be shared.
More information about the Alsa-devel