AnsweredAssumed Answered

Dual adau1772 codec driver

Question asked by Ulrikk on Sep 26, 2012
Latest reply on Nov 20, 2012 by milosoftware



I am building a system with two ADAU1772 codecs hooked up to a Beaglebone (which uses the arm Cortex A8 OMAP system). In this way I will be able to get 8 channels of analog sound through my system.


I have already made a similar system with a single 1772 running fine by writing a rudimentary codec device driver for the 1772 (the codec driver is attached, in case anyone is interested).


My basic question is now: How do I get the ALSA/ASoC system to configure two 1772's with separate I2C addresses?


I would prefer somehow to write a similar codec-driver that controls both codecs at the same time,- but looking at the codec drivers available they all seem to be restricted to communicate with a single i2c address.

I looked at changing snd_soc_dai_link in the platform part of the SoC driver to name multiple dai links - is this the right way forward?



Here is how I plan to connect the codecs:


Both codecs need almost the same config, very little difference (one is master, other is slave).

One 1772 is clock master, the other is slave. BCLK and LRCLK/FSX are connected between the 1772's and to the corresponding McASP lines (McASP is the serial port unit on the OMAP).

I am using a single McASP, which has BCLK, FSX and four serial ports, so each 1772 serial TX and RX are connected  to the four ports.


Each 1772 is, as I mentioned, configured to have separate I2C address.

I am using TDM4 DSP_B format on each of the four serial lines, allowing 4 channels audio to and from each codec.


Configuring the McASP and the OMAP pinmux is pretty straightforward inside the arch/arm/mach-omap2/board-evm3358.c file.