SGTL5000 audio board codec on SPI bus

Status
Not open for further replies.
Goodmorning everyone. Checking on the datasheet and on the diagram of the Audio Board, I saw that it is possible to interrupt the communication pins TX and RX to mount two audio boards on the same teensy. This is because communication takes place on the I2C BUS and the codec can only have two addresses.
Would it be theoretically possible instead to switch to codec control via SPI, where pin 31 becomes the Chip select (CS) and therefore have more codecs on SPI BUS?
Is it possible to share I2S data input and data output pins on the codec bus by selecting them with the CS?
The same for MLCK, BLCK, LRCK pins?

Thanks in advance
 
The Audio Boards would need a redesign to be able to use SPI for control I am pretty sure. only the control data is sent via I2C. audio is sent via I2S which is a common protocol for sending audio.

MLCK, BLCK, LRCK are I2S clock signals and are never interrupted even when using two I2S audio boards together. The audio is served to each audio board separately via its own pin

Is your objective to get more outputs?
 
Yes, I would like to make a multichannel system using the audio board codec, using the Teensy audio library.
cannot the audio data (TX&RX) always be sent on the same bus based on the selection of the right codec via the CS pin? Do they have to be separate for each individual codec?

Thanks
 
Someone else feel free to correct me on this if I am wrong but I am pretty sure each I2S connection needs constant data or it wont work, it doesn't work like SPI.

I have just spent a lot of time working out what the options for multi out are for my own project...

if you are on Teensy 3.X you can use the ADAT output in the audio library. See the documentation in the audio system design tool. You can also get ADAT going on Teensy 4.X but you have to replace the adat_output file as per this post.. https://forum.pjrc.com/threads/60914-ADAT-white-noise-on-Teensy-4-0?p=239846&viewfull=1#post239846

The best option is to use TDM and the CS42448 chip for 6 in 8 out as per this article... https://hackaday.io/project/2984-teensy-audio-library/log/57537-tdm-support-for-many-channel-audio-i
The drawback here is that you need to be able to solder SMD components so I haven't gone down this route.

I am currently using this solution for 4 outs per teensy and triggering multiple Teensys via serial to get the number of outputs I need... (the specs on this DAC are better than the specs on the CS42448 and much better than the audio shield)
https://forum.pjrc.com/threads/60988-Teensy-4-0-Quad-I2s-with-2x-PCM5102a-Working!

This project also looks very interesting I am waiting to hear if JayShoe has it up and running... https://forum.pjrc.com/threads/6038...hield-Stereo-Balanced-Single-Ended-DAC-Module

If you need more outputs than that, make sure that the Teensy can actually supply/generate the audio for that many channels at a speed that suits your application.
 
Status
Not open for further replies.
Back
Top