Hi
I am working with the kernel from the IPNC RDK kit. It is a 2.6.37 kernel. Our aim was to get the TLV320AIC3254 Codecs to build into the kernel. The drivers received earlier belonged to an older version Kernel (probably 2.6.32). So we spent some time porting the same file. Then we realized that newer files were available at lxr. These ones belonged to 2.6.39 but were easy to get into the kernel.
On successful build, we booted the kernel to figure that the ALSA detected no sound cards.
So we traced the whole path of the codec instantiation and figured that all the __init functions were executed successfully, in the mentioned order, for the following files:
1) KERNEL/arch/arm/mach-davinci/ board file
2) KERNEL/sound/soc/codecs/codec file -> aic32x4_init() this is where the i2c_add_driver() call is made
3) KERNEL/sound/soc/davinci/platform(or say card) file -> evm_init() registers card
So how it exactly works during the kernel boot is that the the codecs get registered, then the DAI and finally the card gets registered. Each of them are successful individually but happen to fail in the soc_bind_dai_link() call in the soc-core.c that the ALSA makes to identify instantiated cards.
I suspect that the order in which this happens currently may be incorrect (seeing how the core function behaves). Probably the card needs to be registered first (i.e. evm_init() )followed by (aic32x4_init() )the codec and then the DAI to register with the ALSA. The codec and DAI register calls land up calling the snd_soc_instantiate_card() but fail to do so as the card is not available till this point.
Please let me know if I am headed in the right direction. There seems no straight methods where I could have the evm_init() execute before aic32x4_init, both being __init functions.
Any immediate assistance is duly appreciated.
Please let me know if I am headed in the right direction. There seems no straight methods where I could have the evm_init() execute before aic32x4_init, both being __init functions.
Any immediate assistance is duly appreciated.