use any I2S board in place of the Audio Adaptor Board?

Status
Not open for further replies.
Hello,

I'm trying to use different I2S sound cards with the examples but nothing seems to work... I also tried connecting the Audio Adaptor Board to another board (STM32) but it isnt working either.

I'm doing this for educational purposes, I wonder if this should be at all possible (exchanging sound cards using the same protocol) and have everything work seamlessly, I have the intuition that this should be possible but maybe certain aspects (like that resistor connected to the master clock) make it complicated to do so?

PS: I tried using a stereo Pmod I2S2 card.

Thanks!
 
Last edited:
I2S is not I2s.
There are several variants with different details when which bits (and how many) get set.
Then, the audio-shield for exampe needs an initialization which happens through another bus, I2C.

A good example is the PT8211 shield for Teensy, which uses the "japanese" protocol. On single Bit (if I remember correctly) has a different handling than on SGTL500. Because of this, it has its own Audio Library driver.

You need to read the datasheets carefully and perhaps write some software for other I2S devices.
 
ok, thanks! I didnt know about the subtleties of I2S and I2s (I know I2S is not I2C).

Probably the fact that the audio-shield is initialised via I2C explains the compatibility issues I might have.

than you, just wanted to get an idea if this should be as simple as I thought or not.
 
The PMod I2S2 uses a Cirrus chip, which easily can be connected to Teensy I2S.
At least if you are willing to create your own audio module.
Chances are good that you can use Pmod I2S2 with minimal changes with existing audio objects.
Unfortunately I have no Pmod I2S2, so I cannot test.
 
Thats great news, I wanted to attempt to understand the protocol to the point I can swap devices so it might be a good exercise to look into!

/cheers
 
you can also use separate ADC/DAC for audio. I use the ADC PCM1808 and the DAC PCM5102a (quite cheap modules of both are available on the internet), which seem to use the same I2S protocol as the Teensy audio shield and can be used as a drop-in replacement in most cases. You would have to care about correcting gain settings, however, because the Teensy audio shield has different gain.
 
I wanted to attempt to understand the protocol to the point I can swap devices...

The most important concept is I2S master vs I2S slave. It's about the direction of the clocks, not data. The I2S master creates the clock signals, BCLK & LRCLK (and maybe also MCLK). Those signals are outputs from the master. The I2S slave receives the clock signals.

Normally Teensy is used in I2S master mode, and normal ADC, DAC, Codec chips are used in I2S slave mode.

If you have any two I2S devices, whether you can get them to talk to each other depends on have one side be the master which creates the clocks, and the other side be the slave which listens for the clocks.

Teensy can also run in I2S slave mode. But when in slave mode, Teensy is no longer in control of the audio sample rate. So if you try to use more than one audio interface simultaneously, usually it runs poorly because the audio library doesn't resample the data. It's designed around all inputs and outputs having the same clock. So normally Teensy I2S is used in master mode, and you can use I2S and other interfaces simultaneously.
 
Thanks everyone for your answers!

the question's goal was rather to fact check wether it was supposed to be as simple as I imagined or if I was being naif, so I guess I was being naif.

I will look deeper in the datasheets and use your tips as references/guidelines.

Thanks again :eek:
 
FWIW, I have used this board with the Teensy 4.0 and at least one of the Teensy 3.x's:

I think I have used this as well, but I don't remember if I have actually used it:

Note, the Makerhawk board is mono, and it includes an amplifier to attach a small speaker. By default, it uses 1/2 of the left channel and 1/2 of the right channel. The HiLetGo board is stereo, and like the Teensy Sound adapter, it does not provide amplification.
 
I'd be careful of the products explicitly targeted to Raspberry. This one looked really good for my application: https://www.hifiberry.com/shop/boards/hifiberry-amp2/
But it requires their Linux drivers to configure the board. While, in theory, it could be done by a bare-metal processors, the company provides no support for doing so.

On the other hand, this one works quite nicely with Teensy: https://www.infineon.com/cms/en/product/evaluation-boards/ref_audio_d_ma12070p/. You only need to set a few registers over I2C to get the proper I2S mode and set desired volume level.
 
Status
Not open for further replies.
Back
Top