I'm trying to connect an external PCM coder to the McBSP1 port in the expansion connector of my IGEPv2. My goal is to write the necessary modules to have the coder work in the ALSA environment, so I'm oriented to the ASoC architecture.
My understanding is that two modules are needed: one for the codec (only coder in this case), and another for the connection of the former to the machine. I took the twl4030.c codec and soc-igep0020.c as examples and wrote my pcm1803a.c (codec driver) and igep-pcm1803a.c (machine ASoC driver).
Both of them are being loaded by the kernel, but I already see a difference in the behavior of my code with respect to the twl4030.
are both loaded, if I modprobe snc-soc-igep0020 (even without probing the snd-soc-twl4030 first), I see the two being used by it (the lsmod reports their usage). I can tell my snd-soc-igep-pcm1803a.ko is almost identical to it, with the exception of the content of the snd_soc_dai_link structure, which requests for omap-mcbsp-dai.0, but when I probe it, the usage of the two base modules remains zero, and my set_hw_params doesn't get called.
Is there any other place where the dai_link is set up in the case of the twl4030 which I am not accounting for?
Accepted AnswereballetboOffline0Hi Grat,
I think that you're in the right way, but I recommend to subscribe to alsa-devel and linux-omap mailing list and ask. There is where the SoC discussion may be more beneficial to all.
You can subscribe to these mailing list at:
after a bit of initial panic, I think I came to something (almost) working now. I see that maybe the other mlists are more appropriate, but, for completeness' sake here follows what I did:
- driver for the codec (almost empty, as the codec has no external control);
- new card device (attached to pcm-sound module) witt DAI connections to omap-mcbsp-dai.0, and the codec;
- new igep expansion file to instantiate the platform device
now I can arecord a wav file from a simulated PCM1803A (I don't have the codec yet...) and everything seems good, except for an issue regarding the # of bits. I am sure of the first 16 out of the total 24 (other 8 seems to change all together....)
Thank you for the support.