Other Parts Discussed in Thread: TLV320AIC3253
I have an ESP32 paired with the TLV320AIC3253 using I2C+I2S, with the ESP32 in Master mode, driving the BCLK.The design is inspired by the Audioboost board, with the codec acquiring 2 channel audio data from IN1L and IN1R channels, using its ADCs at 16bits, 48kHz. The codec is configured over I2C and provides the PCM encoded audio data over I2S to the ESP32. The codec also has a passthrough, where the audio signal is routed from the inputs to the headphone outputs, via the PGA. Basically, IN1L->L Mic PGA ->Mixer Amp->MAL->HPL and IN1R->R Mic PGA ->Mixer Amp->MAR->HPR in the diagram below.
I got 10 PCBs assembled, out of which 6 work perfectly, i.e I get audio in the headphones and via I2S in the ESP32 which records to stereo WAV files. 4 don't work as expected. For the 4 non-working boards:
- I am receiving noise on I2S with no discernible audio content
- The audio passthrough works - I get clean audio in the headphones, which means that the analog audio path via the PGA is good and the I2C config is also good
- I disabled the audio passthrough and made a "loopback" via I2S - receive ADC data on I2S in the ESP32 and write it back via I2S to the codec DAC, which would then route it to the headphones.
- I got clean audio on the headphones on the 6 working boards - this verified that the loopback was correctly set up.
- I got noise in the headphones in the non-working boards
- Could it be a bad I2S transceiver on the ESP32 or the codec? Is there a way to route ADC to DAC directly in the codec?
What can I try next to find the root cause? I am stumped. Can it be bad codec chips? If that's the case, how can everything else except the I2S part be OK?