I2S Full-duplex: Record and Play. Possible with the Pico? #12473
-
Hi, I'm working on a project with an AK4619 I2S DAC/ADC chip. (It's really great!) It's capable of doing 4 channels in and out simultaneously, as TDM streams or as multiple stereo in/out I2S streams, but I'm so far unable to make the Pi Pico do it in Micropython. (The first challenge was implementing a master clock, but the PIOs made quick work of that!) The fundamental problem in the Micropython implmentation seems to be that you can instantiate two I2S objects, but they're not synchronized, so the clocks fight. I see two solutions:
Anyone who knows the codebase: Which if these approaches should be easier or more valuable? (I need to get this working in the next month or so, but I'm willing to hack on the Micropython codebase afterwards if it'll be useful to other folks.) Thanks! Elliot. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I recommend modifying the I2S class to make it full duplex. I think that will be easier than trying to synchronize the DMA channels between independent I2S instances. Here are some implementation ideas:
For the master clock you might also consider using the PWM machine class. That might be easier than using a PIO? note: I'm the author of the MicroPython I2S C code. |
Beta Was this translation helpful? Give feedback.
-
Hi Elliott If you read through the whole thread, you'll see that I thought I could get away with half-duplex, but I discovered that there are many limitations, including that you cannot use products like AK4619. Full Duplex is a very important feature for Micropython I2S support, and will allow the community to leverage many advanced audio codec products. BTW, what can you do with a Pico and I2S? An ESP32S3 or Teensy are more capable for DSP processing. Or is it just a controller, and you use a specialized DSP as companion to AK4619? Regards |
Beta Was this translation helpful? Give feedback.
I recommend modifying the I2S class to make it full duplex. I think that will be easier than trying to synchronize the DMA channels between independent I2S instances. Here are some implementation ideas:
For the master clock you might al…