sonocotta/esp32-tas5805m-dac — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small ESP32 library for controlling a TAS5805M audio DAC and amplifier board. I want a simple C interface that can initialize and shut down the chip once I2C and I2S are already running, then let my firmware control volume, mute, power mode, DAC mode, EQ on or off, EQ gain, analog gain, modulation mode, mixer mode, and clipper gain for DRC and AGL testing.

Please also make it easy to read back useful status, like sample rate, BCK ratio, power state, auto mute state, level meter, and fault states, with a helper that turns fault codes into readable messages. Include preset EQ profiles for subwoofer and satellite use, and allow setting them per channel.

Add a friendly Arduino style C plus plus wrapper around the low level driver, plus a basic esp adf component style integration if practical. Include a short README with setup notes, examples for Arduino and esp idf, and mention that I2C and I2S need to be started before the DAC init.

Want more depth? Deep Reverse