Respeaker lite on raspberry using I2S

Since there is an issue to run the respeaker lite on the raspberry pi zero 2W, I thought I may try I2S.
I was able to find (I guess) the correct I2S Pins and with those connected to the raspberry and trying some different overlays e.g. dtoverlay=max98357a or dtoverlay=i2s-dac I’ve got at least some distorted audio output. But I guess we need some modules and overlay to run it correctly.
Can you please provide some documentation / driver for using the respeaker on the raspberry?

Thank you.

Would you please try this driver: GitHub - AkiyukiOkayasu/RaspberryPi_I2S_Slave: General I2S slave I/O device tree overlay for Raspberry Pi.
As ReSpeaker Lite works as an I2S master and provides the clock, Raspberry Pi should work as an I2S slave, with 16KHz+2channels+32bit format

Thanks for the suggestion, I tried it but its not really working as it should.
It does record but the recording is way to “fast”. The playback does nothing except throwing an error “audio open error: Device or resource busy”.
Maybe this overlay just needs some adjustments…

I made some progress, I think I had 1 or 2 major wiring issues.

First I only had this wiring:

I2S_DIN_XIAO(In) → GPIO 21
I2S_DIN_SEC(Out) → GPIO 20
I2S_LRCLK → GPIO 19
I2S_BCLK → GPIO 18

Seeed released the pinout some months ago, and today I noticed the XU316_RST Pin, shorting it once again GND seems to “enable” the respeaker.

I can now with the overlay mentioned by @jiewei.ye (Thanks again) record and playback.

But playback is still not 100% working, its kind of slow, I got the feeling its only playback with half of normal speed.

I also connected the I2C Pins with the raspberry, its seems to work without it, but I’ve got static while Playback.

SDA → GPIO 2
SCL → GPIO 3

Update:
The slow playback is fixed now, turned out, my test files had a samplerate of 48khz, after flashing the 48khz firmware, playback is working fine now.

Also, after installing 32 Bit firmware of Raspberry OS, it seems like I don’t need to short the reset pin anymore.

Hi there,

Nice work… :+1:

Way to stay on it and figure it out, Thanks for the contribution for sure. It’s a nice device and the more info on it the better for everyone.
I2S is the truth when it comes to sound out of these Micro’s
That wiring will get you every time…LOL :ok_hand:

GL :slight_smile: PJ :v:

Post up a pic or clip, if possible.

Thanks for posting this. It’s literally the only description I’ve found of how to connect the ReSpeaker Lite to a Pi via I2S.

I followed your wiring:
I2S_DIN_XIAO(In) → GPIO 21
I2S_DIN_SEC(Out) → GPIO 20
I2S_LRCLK → GPIO 19
I2S_BCLK → GPIO 18
SDA → GPIO 2
SCL → GPIO 3

I’m powering it via USB from the Pi.

Then installed the overlay jiewei.ye pointed to.

Then powered it up and briefly shorted the XU316_RST to GND.

I’m not getting any audio. Looks like I2S isn’t running properly. Triple checked all my wiring.

Is the wiring as you described in your post what you ended up with in the end?

Today I tried to setup my second respeaker but I failed too, I looked at my working one and the pinout I wrote here was not correct. You need to swap GPIO 21 and 20:

I2S_DIN_XIAO(In) → GPIO 20
I2S_DIN_SEC(Out) → GPIO 21

This way you should be able to get sound output.

But I ran into the next issue, it only records static, I have no clue how I got my other respeaker running (it runs 24/7 since December).

Edit:
I think I may have a faulty unit or I broke something when I soldered the Gpio header on it… I flashed the USB firmware again and I noticed the same static while recording and very quiet I could here my voice with volume up.

Edit2:
I just noticed, its same error I have with another unit, if I run it with USB firmware, and I speak directly and loud into the mic, I can hear my voice…

So out 1 of 3 devices is working as expected the other two are maybe broken, I don’t know what happen…

It’s such a pitty there is no support from the Seeed team…