I finally found some time to work on the Loud-ESP32-Plus boards, which have been lying on the desk since January. While hardware was not a big issue, software support turned out to be a bit more complex.

Snapclient support
My first take was to use the snapclient component, which supposedly existed already. As it turned out, however, the component wasn’t even building, and long story short, I had to rewrite most of it.
The datasheet seemed really confusing at the beginning, but after going through it up and down a few times, it started to take shape in my head.
The first pitfall I had to run into – I2S MCLK signal that I was planning to feed from the ESP32 IO0 pin (as I was not sure at the moment if that is a requirement for this DAC). In the tens of MHz range, the IO0 pin is not the best choice, because of the pullups, but even when I changed to a more relaxed pin, I still got lots of artifacts, so I ended up opting out the MCLK signal and wiring it to the BCLK signal – effectively relying on a 3-wire I2S signal, which was working perfectly well for me until now. Good that I put a jumper exactly for that case.

Second pitfall – took me a while to figure out that this DAC requires a 24 or 32-bit signal in I2S mode. Wierd choice, but that is not that hard on the ESP32. After that, I got a sound from the DAC, the FAULT LED finally went quiet, and I could take some time to actually listen to the DAC.
It lacks DSP for some basic equalisation, for my taste, but if you’re using a DSP-enabled audio source (like Music Assistant), it should not be an issue. But otherwise it is a powerful and highly efficient amp, even without lab measurements, it feels like more efficient compared to TAS5825, and power figures are a fair bit higher, supporting lower ohms speakers. Flexible input (2x I2S data lines) and output config (from 1 to 4 channels) seems to be interesting, but still to be discovered how to use it properly.
ESPHome component
Next stop is to deliver a custom MA12070P component for ESPHome, so it can be used with Sendspin or a regular Media Player. After the snapclient component worked, it wasn’t that hard. Apart from the startup I2C sequence, it only needs Mute/Power switches and fault conditions monitoring.

With the component in place, I was able to create Media Player and Sendpin configs in minutes, while the snapclient Esphome component would require some changes to support 32-bit word length. Hopefully, I’ll be able to update it soon.
Squeezelite-ESP32 support
Squeezelite-ESP32 was not a problem at all. Although it doesn’t use all of the DAC features, like digital volume or fault readings, it supports DAC initial configuration and Enable/Mute pins with a few config lines:
- drive mute and enable pins:
set_GPIO,data,string,"7=ir,17=gnd,18=amp" - configure i2s/i2c dac:
dac_config,data,string,"model=I2S,bck=14,ws=15,do=16,sda=8,scl=9,i2c=32" - send dac init sequence:
dac_controlset,data,string,"{""init"":[{""reg"":53,""val"":8},{""reg"":64,""val"":24}]}"
Final words
I’m finalizing software support with a bit of cleanup and documentation work. Next, I’m planning to post a Tindie/Lectronz product for review and approval. At the moment, I only possess a test batch of 10 ESP32-S3-based boards, but I’m prepared to make classic ESP32 prototypes as well.
Might seem a little strange to use an END-OF-LIFE DAC, but weirdly, Infineon does not offer anything comparable, and since they are still possible to get through regular channels for a reasonable price, I say, why not?


Leave a Reply
You must be logged in to post a comment.