using the I2S output as slave (connect to a ADAU1701 DSP) #218
-
I try to use the arduino audio tools lib in connection with an ESP32 board to stream Bluetooth to I2S and then into an Audio DSP I2S input. If I connect any DAC to the I2C output of the ESP, everything works great. Now if I connect the ESP32 to the DSP, the DSP is the master device, so it delivers a clock itself. In that case I have to feed the ESP32 with the clock signals from the DSP. I think this must be called I2S output as slave on the ESP32. I don't know, how to configure the I2S on the ESP to this slave mode, that the DSP gives the bit (or master) clock to the ESP? Has anyone connected a ESP32 with the arduino audio tools lib to any external DSP that operates in master mode? This is my setup code based on the Basic A2DP to I2S example. `void setup() { // register callback // Start Bluetooth Audio Receiver // setup output |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
if cfg.is_master = false; then the ESP32 expects that the values for pin_bck and pin_ws are provided by the external system. I have never tried but I doubt that this is also working for the pin_mck. In any case I would recommend to start your tests with a sine generator sketch and not with something as complicated as A2DP... |
Beta Was this translation helpful? Give feedback.
-
You can try to log the result length of the data which is written to i2s, just to make sure that the write is really working. To be honest I never tried this scenario - only one where an external DAC was the master and providing the data to the ESP32, but I would be really surprised if the ESP32 would not support this... ps. Do you get the same frequencies if you use the ESP32 as Master? |
Beta Was this translation helpful? Give feedback.
-
That would be the pin_mck from my second last answer - and as I have mentioned I would be surprised if that would be supported as input. Let me know about your findings |
Beta Was this translation helpful? Give feedback.
if cfg.is_master = false; then the ESP32 expects that the values for pin_bck and pin_ws are provided by the external system.
If this is not working I would suggest to look for the issue on the Audio DSP side.
I have never tried but I doubt that this is also working for the pin_mck.
In any case I would recommend to start your tests with a sine generator sketch and not with something as complicated as A2DP...