Soon: I2SCodec, a new firmware mode for additional audio I/O

Very nice! I/O working stable so far, after a small firmware adjustment.

  • After having the physical prototype in front of me, I was able to figure out a better layout which leaves the unused header pins accessible so the board can be placed on top of the Core

  • Next will be experiments chaining two of these shields for 6in/6out!

  • Current prototype seems to invert the phase on its outputs, the codec seems to handle differential/pseudo-differential differently (huh?) so I’ll factor this in for the next revision.

1 Like

Noticing some interference with the audio jacks I am using for abuse-testing. Inserting a cable can cause nasty electromagnetic spikes from SGND reflecting onto the I2S data lines which can throw off the shield’s codec sync. Not good enough! The Axoloti/Ksoloti Core has been immune to such spikes (even with the shield connected).

3.072 Mhz BCLK - *shudder*

Upgrading to a 4-layer board instead of 2 seems like a good idea, and while we’re here, we tuck in the I2S lines on an inner layer (stripline!). The design must simply be more robust, especially for haphazard DIY wiring situations. As always, if anyone has some suggestions or insights feel free to share.

(I’ve never been very clear on the SGND circuits in the Axoloti (and now Ksoloti) schematics - I was under the impression that the 33 ohm resistors and schottky diodes are meant to protect the codec/amp pins from the above surges - but it seems this resistance/potential discrepancy between SGND and GND causes the above problems on the I2S lines?)

Ksoloti Core schematic

I2Scodec shield Changelog v0.2:

  • add cutouts so Ksoloti Core header pins remain accessible if this shield is placed on top

Changelog v0.3:

  • add cutout for Core’s headphone header (forgot in 0.2)

  • correct output phase by not inverting output pin polarity (xOUT+, xOUT-)

  • add 33 ohm termination resistors R20-R23 to I2S signals

  • add 10nF capacitors C18, C19 across SGND to GND to catch spikes from jack insertion

2 Likes

We’ll find out soon if this cutout design is even solid

Just curious which IC you’re using? I’ve been using generic PCM5102 would like to build something with inputs…

The codec I am using is a TAC5142, a newer codec by TI. The reason other common codecs do not work well here are:

  • Most expect a MCLK of (in our case) 12.288 MHz to clock their input sampling parts.
  • The ones that can live without a 12.288 MHz clock, or can create their own from a different frequency clock (like the ADAU1961 does from 8 MHz MCO for Axoloti/Ksoloti), require an I2C connection to setup the registers on startup.
  • The Axoloti/Ksoloti 12.288 MHz MCLK (not 8 MHz MCO) generated by the ADAU1961 cannot be output or forwarded to other devices.
  • If we decide to pass I2C to the breakout board, Axolotis and older Ksolotis only have the common I2C1 on PB8 and PB9 available and broken out (While I2C2 on PB10 and PB11 is internal and dedicated for setting up the ADAU1961 codec. Its pins are only broken out on newest revision Ksolotis.
  • The TAC5142 is a ‘dumb’ codec that can be set up by setting hardware pins low or high. You can choose between controller and target (“master” and “slave”) and format (I2S, TDM) etc.

In short, it is a tricky decision between dumb codec with ‘plug and play’, or a smart codec that requires either a newest revision Core, or dedicating PB8 and PB9 to I2C, and some code to set up its registers.

1 Like

Thanks for the explanation! I’d been a bit lost in a sea of alternatives :wink:

Hey everybody, hey @Ksoloti ,

hows the custom board coming along :smiley:

I have finally approached this and ordered two UDA1334A, cause I need only two extra Outs for now. I’m trying it on an Axoloti Core v1.2. Will try it on Ksoloti after, it’s a bit built into something atm :sweat_smile:.

I tried to follow your help patch on I2S and I think I connected all the correct contacts, but I don’t get a tone, only sometimes a crackling of sorts. I also read something about having to connect to pins from x4, but that didn’t work either and it doesn’t say anything about that in the patch, so it might be totally wrong. I’d like to show you the way I connected everything and hope you can help me fix whatever obvious mistake I have made :slight_smile:

I connected as following:

X3 Pin1 (GND) - UDA Pin3 (GND)
X3 Pin3 (5V) - UDA Pin1 (VIN)
X3 Pin4 (PD6/DOUT) - UDA Pin5 (DIN)
X3 Pin5 (PB3/BLCK) - UDA Pin6 (BLCK)
X3 Pin6 (PA15/WS) - UDA Pin4 (WSEL)

I get 3V on UDA Pin2, so thats good. I’m guessing it’s something with the clock? Does WS maybe go to SCLK on UDA, or does BLCK go to SCLK on UDA? Added some pictures, used different colors to distinguish :slight_smile:

If I got this, OMG, this is gonna be so epic in two different projects now, so excited!!

Your pinout looks correct so far but is missing the X4 header’s BCLK. It has to connect “internally” on the Core to PB3, and also to BCLK (or SCLK) on the breakout board.

Without going into detail, for the second I2S stream to be tight with the main I2S, the Core needs to “listen to its own BCLK” back into PB3.

Add a wire from X4 Pin3 (BCLK) to X3 Pin5 (PB3/SCLK) on the Core. I am not sure where X4 is located on Axoloti but I seem to remember it is labelled. Pin3 is conveniently located as the middle pin so you don’t have to figure out the header’s polarity.

For future reference:

  • BCLK (bit clock) and SCLK (serial clock) usually mean the same in this context.
  • WS, WSEL (word select) and FS, FSYNC (frame sync) usually mean the same in this context.

I believe that’s it, let us know if this works!

Heyyy,

thanks so much for the in depth explaination! I now connected x3-5 with x4-3 (could find out which way x4 ist, in hearing a connection with multimeter between x4-5 and x3-2 which should be the same, its from up to down, if you read x4 the right way round, which is located left under Outputjack).

It still didn’t work. I tried to hook up BCLK with UDA SCLK or with both together, each time restart, so clock reads at startup.
Discoveries:

  • I notice little distorted correct signal, if I put DIN into UDA Lout, so shortcut to output backwards, so it does come out at least.
  • Also right now I have GND buzzing, from computer, normal, but it stays, when I detach from UDA VIN, so from what I understand, it shouldn’t have power, but maybe that’s just the ground connection. It just doesn’t do any sound, when removing and attaching, which leads me to believe, the UDA is not actually turned on, which would explain everything.

I measured UDA VIN has 5V and UDA 3V0 has 4,1V, nothing attached to it, so probably higher due lack of a consumer. Also checked connection from x4-3 to UDA BCLK, it’s connected.

Also, is it all the same on Ksoloti, is the x4-3 to x3-5 connection necessary?

Hope you’re having a lovely day! All the best