Last week we rolled out Core™ Firmware v1.2.0. It’s easy to gloss over changelogs like this:
- Added LED Mode: OFF
- Reimplemented the OLED DSP Menu, including Gain/Freq/Q for all 10 bands
- Added XMOS based decoding of S/PDIF (optical) input, with full 10-band EQ support
- Added ability to toggle between S/PDIF input modes from the OLED menu or Core Device Settings:
- ESS: 44.1-192 kHz, no DSP
- XMOS: 44.1- 96 kHz, full DSP support
What’s not clear from these brief notes is the incredible amount of thought and development that went into S/PIDF-to-I2S decoding. Implementation began years ago. If you had asked me in 2022, I would have told you we’d wasted months on software development—we abandoned the project after AKM’s factory fire. There was no reason to build an S/PDIF converter when ESS gives one away for “free” with every chip.
As Element IV took shape, the archived S/PDIF-to-I2S project suddenly made perfect sense. We could decode S/PDIF on Element IV, unlocking the ability to run its 10-band EQ in both USB and Optical modes.
In this post, we’ll walk through the high level architecture and performance considerations when using Element IV’s new S/PDIF modes.
Element IV’s Optical Modes
Element IV’s incoming optical signal is fed directly to its ESS DAC, as well as to a GPIO pin of its XMOS processor. As of firmware v1.2.0, you can now choose between the following modes from Core’s Device Settings or the OLED menu:
- XMOS S/PDIF Mode [default]: Optical decoding at up to 96 kHz with full DSP support
- ESS S/PDIF Mode: Optical decoding at up to 192 kHz (no DSP)
If you have no need for equalization, choose ESS mode. ESS’s patented algorithm decodes S/PDIF remarkably well—arguably the best in the industry.
Element IV’s XMOS S/PDIF mode is tuned in firmware to balance performance and computational resources. Keep in mind that Core firmware running on Element IV currently consumes 60-80% of available resources to run its 10-band EQ and general functionality.
Three of 16 XMOS cores are now dedicated to S/PDIF decoding. Under the current computational budget, jitter sidebands are slightly higher and THD is elevated by 1 dB when decoding optical in XMOS mode vs. ESS mode. These minor differences are imperceptible, and obviously more than compensated for by the ability to run the 10-band EQ in optical mode!
![](https://blog.jdslabs.com/wp-content/uploads/2025/02/element-iv-xmos-spdif-decoding-apx555-1024x560.png)
System Architecture: S/PDIF Reception to I2S Output
The S/PDIF-to-I2S engine uses a custom Asynchronous Sample Rate Converter (ASRC) implementation and a lock-protected ring buffer to hold I2S audio stream data at a nominal 50% fill level, protecting against underruns or overruns.
Precision & Buffer Management
- Mathematical Precision: Fixed-point arithmetic is used throughout
- Q4.28 format for sample rate ratios
- Q8.24 format for ASRC processing
- 32-bit integer sample representation
- Polyphase FIR Filters: The ASRC leverages a polyphase FIR filter bank, maintaining linear-phase response.
- Circular FIFO: A simple FIFO with hysteresis keeps audio latency consistent, while also filtering out minor timing variations.
Please keep in mind that v1.2.0 is our initial release of XMOS S/PDIF mode! While it’s been tediously tuned and auditions well, S/PDIF signals from some consumer devices can be unpredictable. Let us know if you encounter anything unexpected.
What’s Next
With DSP-over-optical complete, our devs are now hard at work on your feature requests! I’m pushing for on-device profile storage next (yes, it’s possible). One of our lead developers is optimizing the DSP stage this week, so stay tuned for spring Core firmware updates.
Amazing work! Congrats on the team for shipping this feature, and thank you for the technical explanation, this is much appreciated. I must also say that the update procedure was as painless and fast as you could hope, really impressive!
I have one feature request, if it isn’t already hidden somewhere, a mode to auto shut down Element IV after a set inactivity time (similar to the option to turn of the LED). I think it could prevent unnecessary power consumption and device heat if it is forgotten during the night, or during a week-end not home. What do you think?
Thanks, Thomas! I’m not sure that we have provisions for auto shutdown, as power state is managed by the boot processor, but I will pass this thought along.