ΣSigmaStudio Ask AI Русский Log in

ADAU1401 I2S Input and Output Trouble

SigmaDSP & SigmaStudio Montalbon Mar 11, 2023 00:00 2 replies Original on forum ↗
Subscribe
Montalbon Question
Mar 11, 2023 00:00

Hello,

I am trying to build a Bluetooth speaker using an ESP32-PICO utilizing the A2DP library as my source. The end goal is to send the audio signal from the ESP32 > ADAU1401 DSP > I2S Digital Amp, all using I2S until the final output by the amplifier.

After studying a lot of post on this forum, ADAU1401 documentation, and general Googling, I have come up with this setup for testing:

I am able to successfully communicate with the ADAU1401, as I am able to turn the LED on and off with the switch I added to my design, but I'm not getting any audio out to my DAC with my current configuration.

To test my ESP32 I2S output, I removed the ADAU1401from the chain and connected the ESP32 I2S output straight to the PCM1502 DAC. With this setup I am getting good sound out to a set of headphones, so I don't think it is a problem getting good I2S data to the ADAU1401. Maybe it is my hardware or software configuration in SigmaStudio?

Any ideas or help is appreciated.

Thanks!

pcm1502

Audio Signal Processors

hardware

adau1401

4.7

cy7c68013a

esp32

SigmaDSP Audio Processors

Show More

i2s-DSP-Test-Circuit.png
i2s-DSP-Test-Circuit.png
i2s-Schematic.JPG
i2s-Schematic.JPG
i2s-Hardware-Config.JPG
i2s-Hardware-Config.JPG
i2s-Registers.JPG
i2s-Registers.JPG
DaveThib Reply
Mar 13, 2023 00:00

Hello Montalbon,

This is where the age of this processor shows up. The clocking for the core and the ADCs and DACs are not very flexible. If you apply clocks to the serial port and you do not have a master clock that is synchronous to this clock, then the converters will mute. Your use case is slightly different in that you are only using the serial port and none of the converters correct?

You are using two different asynchronous clock rates driving the serial port. This is a use case that I have not experimented with. We always tie the LRCLK output connection to the LRCLK input pins. I do not think the core can see two different clock rates on the serial port.

Your documentation does not show what is a clock output and what is not. So who are the clock masters?

What you may have to do is make the Bluetooth be the master for LRCLK clock and Bit Clock and also Master clock. Is there an MCLK output of the Bluetooth board? Then use those clocks to drive the DSP serial ports and the DAC serial port. Then everything will be on the same clock.

The problem is that you will have to modify this board to not use the clock oscillator that is on the board. It would be an external master clock. You will have to make sure the frequency of the clock matches the PLL pin settings. Usually the MCLK is 256x fs but the PLL pins can be set for other rates.

FYI for you and others who might read this. This is much easier to do with some of our newer parts. The ADAU1452 has sample rate converters so you can bring in the Bluetooth using the ASRC and then keep the amplifier clocks steady at the core rate. Then the DSP core can be on its own clock domain.

Dave T

Montalbon Reply
Mar 26, 2023 00:00

Hi Dave,

I took some time to work through your response.

I found some information about creating a mater clock using the ESP32's PLL_D2 and APLL clocks using the Arduino IDE that I have been programming my ESP32 with (www.esp32.com/viewtopic.php I was able to see a MCLK output from my cheap USB oscilloscope, but it looked more sinusoidal than square. I also have limited experience with scopes, so could have been a user error, but I'm learning.

After removing the oscillator and C28 from the board, I connected the MCLKclock from my ESP32 to the ADAU1401 MCLKclock input pin. In the end, I wasn't able to get it to work with my limited experience with clocks at this point in my journey, so I have shelved using the ADAU1401 for reasons that you stated earlier; it is hard to get the clock to work with the older ADAU1401.

In the meantime, I have ordered a ADAU1701 and an ADAU1452 to play with.

I really appreciate your response. I learned a lot working through it.

I will post a new thread if I run into problems with the new boards I am waiting on.

Thanks again, Dave!