I2s playback and recording

hi guys, i have a question about the i2s via gpio.

i have successfully connected my i2s amp by adafruit.
and then connected my tdm mic array to the i2s.

my question is can i connect them both at the same time?
is it ok if i connect them to the same bclk and lrclk?
and is there a way to playback and record at the same time without getting a device is busy error?


I tried something like the following and was able to run both at the same time …

$ arecord -D hw:tegrasndt210ref,0 -c 2 -f S16_LE -r 48000 -d 30 cap.wav &
$ speaker-test -D hw:tegrasndt210ref,0 -c 2 -F S16_LE -r 48000 -t sine -f 500

You will need to ensure that the sample rate and sample size are the same for both playback and capture because the clock and fsync is common between both. Otherwise there is a 2nd I2S interface available, but it is on the M.2 connector on the underside of the module which is not to easy to access.


Can I play audio through gpio without an audio codec chip?

Can I have a look of your hardware connection?


You can configure some of the pins on the 40-pin header as I2S pins and then use the I2S interface to drive an audio codec. However, you need to have some sort of audio codec to convert digital to analog.


1 Like