Use an ESP32-WROOM or ESP32-C3 as a media player (will be used over Home Assistant for streaming musinc)
Output of the ESP32 should be refirected to SPDIF ( I dont need optical toslink just RCA copper is enough in order to hook it up on my Pioneer amplifier)
This is my biggest struggle how can i output SPDIF compatible stream (PCM) to my amplifier.
On top of that since the amplifier has a 3.5 jack IR Input i would use the IR module of esphome where instead of hooking it up to an IR Led i will connect the 3.5 jack that will drive with IR commands my amplifier.
If this cannot be done with esphome can someone provide with code that i can compile myself ?
I’m happily using Music Assistant + I2S Media Player with a UDA1334A DAC but I think it’d be way more awesome to use SPDIF optical to connect to my fancy discrete DAC so I’m starting to look into this too.
Looks like ESP8266Audio has support for SPDIF that looks pretty simple.
It’s just using (abusing?) the I2S peripheral to blast out SPDIF data. Looks like it’s pretty slim on external dependencies. Might not be too hard to make an external component out of it.
There’s some major media player refactoring happening for the core ESPHome in GitHub - esphome/home-assistant-voice-pe: Home Assistant Voice PE but once that stabilizes a bit I’ll look at adding SPDIF support there. Right now all the baked-in media_player stuff in ESPHome is hardcoded to use I2S so it’s not so easy to hook up SPDIF without a medium-sized refactor.