AnsweredAssumed Answered

Adjusting ALSA ASoC driver for Beaglebone hooked w ADAU1373

Question asked by Ulrikk on Apr 29, 2012
Latest reply on May 1, 2012 by larsc

I am hooking up an ADAU1373 with a Beaglebone board to use as audio codec. The codec is on an eval board, and I connect the I2C and I2S lines from the Beaglebone pinrow connecters manually (later we will be making a custom cape with the codec).

I am using a kernel compiled from the package linux-04.06.00.03.tar.gz inside the latest AM335X-LINUX-PSP-04.06.00.03 package from TI.

uname -a gives "Linux am335x-evm 3.1.0 #16 Sun Apr 29 18:41:48 CEST 2012 armv7l unknown"

 

My problem now is that I can't get ALSA to register a sound card. By inserting printk's in soc_bind_dai_link in sound/soc/soc-core.c I can see that the codec is not getting registered (codec_list is apparantly empty) preventing the sound card to register (the platform and cpu_dai  'davinci-mcasp.0' are found). Since there are no codecs natively on the Beaglebone this is not too surprising.

 

I also do understand that I need to setup pinmuxing on the Beaglebone; I have adjusted the pinmux settings in the file arch/arm/mach-omap2/board-am335xevm.c, but this is not the issue here I think (for details see e.g. a thread here: http://e2e.ti.com/support/embedded/linux/f/354/p/158851/621986.aspx#621986)

I also need to configure the snd_soc_dai_link struct called am335x_evm_dai in sound/soc/davinci/davinci-evm.c to use my codec. Most people using sound on the Beaglebone have used an AIC3X codec (codec_dai_name = "tlv320aic3x-hifi") on a DVI-D cape for the Beaglebone board, but if I specify this codec in davinci-evm.c no codec registers (I suppose linux somehow knows the codec is not present although I dont understand how).

 

What I would like to be able to is to have a bunch of different codec drivers as kernel modules, and load the one I need (i.e. connect a codec manually, and insmod something, then have sound playing with alsa) - the 1373 is not the only codec I want to be able to connect to this board, its just the one I'd like to use as a starting point and hopefully from this discussion here learn enough to adjust this driver for other codecs.

 

To begin with I can configure the codec using the sigma studio software running on a pc, so I suspect all that would be required as a starting point is some extremely simple codec driver that merely registers itself without actually doing much else. 

So I am basically asking: how do I go about creating a codec driver for the 1373, so that the codec driver gets to show up in the codec_list (in soc-core) so that my platform will be able to register a sound card? Does what I am trying to do make sense?

 

Thanks a lot for any help!

Outcomes