Skip to content

v2.0.0

Choose a tag to compare

@remcom remcom released this 16 Nov 17:53
· 18 commits to develop since this release
33b430f

Satellite1 XMOS firmware v2.0.0

First stable release of the 2.0 line. These notes cover everything since v1.0.3, the last stable release. They include the v1.0.4 and v1.1.0 alphas and the 2.0.0 alpha and beta releases. The firmware is the same as v2.0.0-beta.2.

The headline changes:

  • The firmware now uses all four microphones.
  • It estimates the direction of the talker (DOA), can steer a beam at them, and can lock onto the talker when the host reports a wake word.
  • The real-time pipeline is faster and more robust.
  • USB is gone: upgrades run over SPI only.
  • The SPI device-control protocol is now 0x11.

Read Breaking changes before upgrading a host integration.

Breaking changes

  • The SPI device-control protocol moved from 0x10 to 0x11.

    • Read responses now start with CONTROL_RET_STATUS_PAYLOAD_AVAIL (23), followed by the payload.
    • Special-resource reads now return [CONTROL_SUCCESS, value].
    • One-byte reads are no longer collapsed into status-only frames.
    • Device-control readiness is reported in status-buffer index 0, so the GPIO status bytes move one byte later.
    • Complete zero headers ([00, 00, 00]) are transport NOPs.
    • A status-only frame sent after a write now carries the command's real result, no longer always CONTROL_SUCCESS.

    The current Satellite1-ESPHome firmware already speaks 0x11.

  • USB has been removed. USB DFU (dfu-util), USB audio and USB device control are gone. Upgrade with *.upgrade.bin through the DFU servicer (240) over SPI, which is what Satellite1 ESPHome does.

  • The data partition has been removed. *.factory.bin now holds only the boot partition, and xflash no longer takes --data.

  • Firmware variants have been reduced. The adec, adec_altarch and empty variants and the UA variants have been removed. Releases ship fixed_delay (default) and the experimental aec4. bypass can still be built locally.

  • The device waits for five device-control servicers at startup, because the audio (230) and stats (250) servicers were added.

  • The mic gain moved from before the AEC to after it. The default is still 20 dB, the same level as the old fixed 10x gain. The AEC now sees a lower input level, so re-check wake word and STT tuning.

  • The release zip has been renamed from satellite_firmware_apps.zip to satellite_firmware_apps-<tag>.zip.

  • The mic pin mapping has been fixed (v2.0.0-alpha.4). Each mic used to be labelled as the one opposite it. If your host added 180° to the DOA or reversed the mic masks to make up for this, remove that correction.

Four-mic front end and audio servicer (resource 230)

All four PDM mics (North, South, East, West) are now decimated. A new front end turns them into the two channels that the AEC/IC/NS/AGC pipeline processes.

Command ID Access What it does
AUDIO_SERVICER_CMD_MIC_GAIN 0 R/W Post-AEC gain, 0–30 dB (default 20)
AUDIO_SERVICER_CMD_MIC_MODE 1 R/W 0 East/West pair (default), 1 North/South pair, 2 average, 3 automatic pair facing the talker, 4 DOA-steered beam
AUDIO_SERVICER_CMD_DOA 2 R Azimuth 0–359° (0 = North mic), confidence, flags
AUDIO_SERVICER_CMD_MIC_PAIR 3 R Mic bitmask in use on channel 0 and channel 1
AUDIO_SERVICER_CMD_BEAM 4 R Beam steering azimuth, or 0xFFFF outside beam mode
AUDIO_SERVICER_CMD_CH1_TAP 5 R/W Right channel: 0 AEC+IC+NS (default), 1 before NS, 2 AEC only
AUDIO_SERVICER_CMD_IC_FAST_HOLD 6 R/W Fast IC hold on speech onset (default on)
AUDIO_SERVICER_CMD_HPF 7 R/W 100 Hz high-pass before the AEC (default on)
AUDIO_SERVICER_CMD_STEER_POLICY 8 R/W 0 follow speech (default), 1 wake word only, 2 fixed
AUDIO_SERVICER_CMD_WAKE_EVENT 9 R/W The host writes 1 after a wake word and 0 when the conversation ends

Settings are not saved, so they go back to their defaults on reset. Full details are in docs/device-control-spi-protocol.md.

Direction of arrival (DOA)

  • The direction is estimated with GCC-PHAT on the N/S and E/W mic pairs. It runs only during speech and only while no audio is playing. After playback stops, it waits about 400 ms so reverb doesn't skew the result.
  • The estimate is averaged over about 300 ms of speech. It uses the real mic geometry (7.1 cm between opposite mics) and rejects delays that this geometry cannot produce.
  • In a simulated reverberant room, the share of directions more than 30° off dropped from about 20% to about 1%.
  • The band is limited to 3 kHz, which cuts the 90th-percentile error in live rooms from 11–13° to 8–10°.

Beam mode (mic mode 4)

  • The beam is a generalized sidelobe canceller. Channel 0 is a beam aimed at the talker. Channel 1 is a blocking beam that the IC uses as its noise reference.
  • The beam re-steers once the talker has been more than 15° off for about 0.5 s of speech, at most every ~3 s, and only when the DOA results agree.
  • Beam mode is opt-in.
  • Known limits: the blocking beam is weak below ~500 Hz and has gaps at some directions above ~2.5 kHz.

Wake word steering

  • The front end keeps the last ~1.5 s of DOA results. On WAKE_EVENT = 1 it steers the beam (or, in auto-pair mode, the mic pair) at the wake word within one frame.
  • Directions that idle speech, such as a TV, usually comes from are weighted down.
  • While a conversation is active, speech does not re-steer the beam. This hold lasts at most 60 s, and each new wake word restarts it.

LED ring

  • New command LED_RING_SERVICER_CMD_DOA_INDICATOR (1), off by default.
  • When enabled, it lights the LED facing the talker on top of the last WRITE_RAW frame and updates every 50 ms.

DFU and device control

  • New read commands on the DFU servicer (240):
    • GETFLASHSERIAL (90)
    • GETIMAGESTATUS (91)
    • GETVARIANT (92): 0 fixed_delay, 1 bypass, 2 aec4. Firmware older than beta.2 answers CONTROL_BAD_COMMAND, which hosts should treat as fixed_delay.
  • New stats servicer (250):
    • STAGE_TIMES (0): last and maximum processing time per audio stage
    • STACK_FREE (1): lowest free stack per stage
    • HEAP_FREE (2): current and lowest free heap per tile
  • Added the FPH QSPI flash extension.
  • Hardening:
    • Zero-length reads and payloads longer than 253 bytes are rejected with CONTROL_DATA_LENGTH_ERROR. A zero-length read used to halt the firmware.
    • Failed reads never report success, and their payload is zeroed.
    • DFU_DNLOAD rejects bad embedded lengths with SERVICER_WRONG_PAYLOAD instead of asserting.

Performance and real-time fixes

  • LED ring updates can no longer run on the RTOS-tick, mic or I2S cores. Interrupts are off for ~0.75 ms per update, down from ~1.65 ms.
  • 16↔48 kHz resampling uses proper filters instead of sample repetition, which removes images above 8 kHz. It runs on the VPU in about half the cycles.
  • Speaker playback no longer stalls when the AEC falls behind. The playback path is one task, which saves up to ~30 ms of latency.
  • I2S fixes:
    • Underruns now output silence instead of repeating the last sample.
    • The receive filter now uses the receive filter's own context.
    • Pipeline output goes to the I2S tile as plain intertile messages instead of RPC.
  • The mic buffer holds 3 frames, so a late stage no longer drops a mic frame and shifts the mics against the AEC reference.
  • The watchdog is fed only while audio frames keep flowing. FreeRTOS stack-overflow checking is enabled.
  • Less work per frame:
    • Tile-to-tile traffic dropped from 5,784 to 2,004 bytes per frame.
    • DOA FFTs run on the VPU.
    • AEC, IC, NS and AGC process frames in place.
    • The tile 0 voice libraries build with -O2.
    • Device-control servicers run below the audio pipeline's priority.
  • Free RAM: tile 1 has ~40 KB free (was ~22 KB), and tile 0 gained ~10 KB.

Experimental: aec4 variant

  • Released as satellite1_xmos_aec4[-<tag>].factory.bin.
  • It runs the AEC on all four mics against a mono (L+R)/2 speaker reference, and runs the mic front end after the AEC. As a result, switching mics or steering the beam doesn't make the AEC re-converge.
  • In xsim it reaches ~60 dB ERLE. It has not been validated on hardware.
  • With stereo music on "Left only" or "Right only" speaker modes, or on line-out, the mono reference only partly matches.

Release assets

Asset Contents
satellite1_xmos.factory.bin / .md5 and satellite1_xmos-v2.0.0.factory.bin / .md5 Default firmware (fixed_delay)
satellite1_xmos_aec4.factory.bin / .md5 and satellite1_xmos_aec4-v2.0.0.factory.bin / .md5 Experimental aec4 firmware
satellite_firmware_apps-v2.0.0.zip All build outputs (.xe, factory and upgrade images)
satellite1-xmos-firmware_2.0.0-1_all.deb Debian package with the default firmware

To pin a release or variant in ESPHome, set the xmos_fw_version substitution. See docs/versioning.md.

Build and CI

  • Releases are built when a GitHub release is published. The tag becomes the firmware version, and the build fails if the two don't match.
  • The build Python is now 3.12. Recreate local venvs with python3.12 -m venv .venv && pip install -r requirements.txt.
  • xmos-ai-tools 1.4.4. When its version changes, CMake regenerates the VNR model.
  • The firmware is also packaged as a Debian package.
  • New tools/build_local.sh for local builds on macOS and Linux.
  • New host tests cover the mic front end, DOA, beamforming, steering, wake word handling, HPF, VNR hold and versioning.

Known limitations

  • The aec4 variant and beam mode have not been validated on hardware.
  • AEC echo cancellation and double-talk with the post-AEC gain have not been measured on hardware.
  • Switching the mic mode or re-steering the beam in fixed_delay makes the AEC and IC re-adapt briefly, so you may hear a short burst of residual echo.

Full changelog: v1.0.3...v2.0.0