Skip to content

v2.0.0-alpha.5

Pre-release
Pre-release

Choose a tag to compare

@remcom remcom released this 25 Oct 18:22
· 35 commits to develop since this release
97486c2

New: DOA-steered beam mic mode

Mic mode 4 (MIC_MODE_BEAM) uses all four microphones. Before, every mode picked or averaged two of them. The mode turns the AEC/IC stages into a generalized sidelobe canceller:

  • Channel 0 is a beam aimed at the talker: all four mics time-aligned towards the DOA and summed, so the talker passes through undistorted.
  • Channel 1 is a blocking beam that cancels the talker and hears the rest of the room. The IC uses it as its noise reference, so it removes noise without a copy of the talker's speech to cancel.

How the beams steer:

  • When you enter the mode, the beams point at the last valid DOA straight away.
  • After that, they re-steer to the mean DOA once the talker has been more than 15° off them for ~0.5 s of speech, at most every ~3 s.
  • They re-steer only if those DOA results agree. Two talkers taking turns leave the beams where they are.
  • Each re-steer makes the AEC and IC re-adapt briefly, as a pair switch does.

Known limits: the blocking beam is weak below ~500 Hz and has gaps at some directions above ~2.5 kHz.

The default mic mode is unchanged (0, East/West pair). Beam mode is opt-in.

SPI protocol additions

All additions are additive. Existing commands behave as before.

Command ID Access Payload
AUDIO_SERVICER_CMD_MIC_MODE 1 Read/write Now also accepts 4 (beam)
AUDIO_SERVICER_CMD_BEAM (new) 4 Read 2 bytes: steering azimuth as little-endian uint16 (0..359, same convention as DOA), or 0xFFFF when the mic mode is not 4

In beam mode, MIC_PAIR reports 0x0F for both channels. Writes to BEAM are rejected with CONTROL_BAD_COMMAND.

Fixes

  • I2S transmit underrun: on an underrun, the output repeated the last sample. It now outputs silence.
  • I2S receive path: the receive filter was called with the send filter's context. The receive buffer also advanced by the number of input samples instead of the number of words the filter wrote.
  • Mic frame drops: the mic buffer holds 3 frames instead of 2. Before, a stage 0 that ran late dropped a whole mic frame, which shifted the mics against the AEC reference.

Performance

  • 16↔48 kHz resampling on the VPU: speaker output upsampling and reference downsampling use the same 72-tap lib_src voice filter (same response and delay) in about half the cycles. Output matches lib_src to within ~20 LSB.
  • Beamformer: fractional-delay filtering uses the VPU (vect_s32_dot).
  • In-place processing: AEC, IC, NS and AGC process their frames in place. The reference energy is computed once and reused.
  • -O2 for the tile 0 voice libraries: IC/VNR, NS and AGC are 1.5–2.2% faster each, ~115 µs per frame in all (measured in xsim). SATELLITE1_VOICE_LIBS_O2 now defaults to ON and no longer covers the AEC, which gained only 0.1% and runs on tile 1, where RAM is short.
  • No I2S RPC: pipeline output reaches the I2S tile as plain intertile messages. The RPC allocated the ~5.8 KB frame on the heap of both tiles for every frame and sent a response message.
  • Device control priority: the device control servicers now run below the audio pipeline. A burst of SPI commands or a DFU write can no longer take a core from a pipeline stage.

Other changes

  • The periodic heap usage log line is gone. Read heap usage with the stats servicer (STATS_SERVICER_CMD_HEAP_FREE).
  • New tools/build_local.sh builds firmware variants and flash images locally on macOS and Linux. It sets up XTC and a virtualenv, and lets you choose the output directory.
  • New host tests cover beam response, steering, mode transitions, crossfades, blocking-beam frequency response and the reference energy helper.

Upgrading

Host integrations need no changes. Settings are still not persisted. Mic mode returns to 0 on reset.

How to check

  1. Write 4 to AUDIO_SERVICER_CMD_MIC_MODE.
  2. Read AUDIO_SERVICER_CMD_BEAM. It should show your direction, matching the DOA reading.
  3. Move about 90° around the device and keep talking. After ~0.5 s of speech, BEAM should follow. It changes at most every ~3 s.
  4. Set the mode back to 0. BEAM should read 0xFFFF.