Hardware
The SGTL5000 uses a virtual ground for the audio outputs. This likely makes it unsuitable for use in smartphone headsets in which the ground of the microphone is shared with the audio output. To be tested.
Generating I2S
The annoying thing about the Adafruit audio adapter is that it's not fully open source. These are the supply voltages:
- VDDD = 1.8V
- VDDIO = 3.3V (powers line out)
- VDDA = 3.3V (powers the headphone)
On the SGTL5000 datasheet, this is the one bit delay on I2S format with respect to the left-justified format on Figure 10. I2S Port Supported Formats. This seems to be normal I2S behavior.
The delay could be removed by setting the i2s_comm_format_t in the ESP32 to 0, but I'll just leave it to the standard setting.
The SGTL5000 considers the 16bit data as signed format. It's analog output is inverted, which actually doesn't matter much for audio. Voutmax corresponds to 0x8000 = -32768, while Voutmin corresponds to 0x7FFF = 32767).
The sample code to generate a 200Hz sine wave on the left channel of line-out and headphone can be found here.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.