USB audio devices on ESP32-P4 in ESPHome

The P4 adds interesting new functionality to ESPHome. USB devices!

There has already been some work getting different devices to work. The next big one would be USB audio. There are a huge number of USB DAC, USB speakers, and USB microphones that could be easily supported with this one driver.

Espressif already has a driver for it and there has been some discussion over on the ESPHome P4 Discord group.

Now we just need to get this driver into ESPHome.

Mixed with the new Sendpin code it would be a high end music player!!

Neat! I wonder what version of UAC it is. I’m a bit perplexed by the below. All 3 support both UAC 1 and 2 if I’m not mistaken. Probably some odd OS specific thing.

Cannot be compatible with both Windows and Linux simultaneously. If you need to use it on macOS, please enable the macro UAC_SUPPORT_MACOS

Regardless, this may help with the next voice assistant combined with XMOS as the PE uses the same XMOS chip many DAC’s use for USB control for both data and power input.

Support for transmitting/receiving audio from the host side, with a maximum of 8 speaker channels, 4 microphone channels, and configurable sampling rates.

this would be great for hooking up a higher end DAC to an esp32. right now i’m using a raspberry pi, but if esphome supported it that would be even nicer!

Half a year later, the ESP32 paired to an high end DAC dream has become reality. And not only one, but dual DACs (4 channels): Esparagus Audio Brick – Sonocotta

Making use of the UAC component would enable the ESP32 to be a surround sound amplifier for games, movies and music!

Hmm. Really wish my DAC had RCA inputs but probably going to order one of these and plug it directly into my preamp. In fact this is a good reason to pull my Rotel pre processor out as it does have RCA inputs. Pretty smart idea to use WiFi instead of Bluetooth and since it uses Airplay 2 adding it to music assistant shouldn’t be an issue. Even though the S3 is limited to 2 to 3MB/s that should cover any 2.0 audio sources and 4 times or more higher bandwidth than Bluetooth, I’m speculating to the audio quality won’t be great but another seller is selling them for 14 US with 6 dollar shipping so might as well give it a shot. USB for power and a 3.5mm output.