Replies: 2 comments 6 replies
-
You can do this without modifying the existing code at all. Just use two different pio_i2s objects (so each codec has its own dma buffer) and two different dma handlers. Each handler can then synchronize their processing and the combined result however they need to according to your logic. There are no hardware constraints with this that I can think of offhand, at least. The bidi slaves can share the clock pins if you intend to run them synchronously from the same clock source, only the data pin would need to be unique. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm following your suggestions to develop my project but I'm having a hard time making things work.
Therefore, I started debugging the code to find where the program execution was blocking. I ended up modifying the library, and I have a couple of questions on this:
Now, in synched mode everything works fine. However, if I use slaved mode for both pio0 and pio1, the program is still not working correctly. Indeed, if I use a codec to generate the clock and a sine wave as input, I correctly see data output from the codec regarding bitclock, LRclock and data out but I do not see anything in output from the dataout pin of the RP2040. I would really appreciate if you could give me some more clarifications and help me understand how to make things work properly. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I have in mind a project where my Raspberry Pi Pico is connected to two CODECs instead of only one. Each CODEC processes the audio signal internally, and I would like my RP2040 to perform further processing on the audio data coming from the two CODEC units. I was thinking of using/extending your nice library to implement this logic, and I wanted your opinion on the feasibility of this idea. Since the RP2040 has 2 PIO blocks, I would like to set up both as bi-directional slave and use them simultaneously.
However, I was wondering if there are any hardware constraints to manage two different I2S IN/OUT at the same time.
Given your expertise on the topic, could you give me some guidance on this?
Thanks!
Alessandra
Beta Was this translation helpful? Give feedback.
All reactions