Lecture 3: Overview of Embedded
Systems for Low-Latency Audio DSP


Music 250a -- CCRMA, Stanford University

Linux-Based Embedded Platforms

The Raspberry Pi

The Beagle Bone

Linux-Based Embedded Platforms

  • Small computers based on a CPU (Central Processing Unit)
  • Complex architecture with a BIOS, a boot sequence, etc.
  • Large computing power, RAM and ROM
  • Based on an Operating System (OS): Linux
  • Ease of use because of the OS
  • There exists special Linux distribution for this type of board towards audio applications (e.g., Satellite CCRMA, etc.)
  • Operating system introduces audio latency
  • A full OS is ran to carry out tasks that are often fairly simple

Microcontrollers

Microcontrollers Features

  • Little computing power (typically <200MHz)
  • Little RAM (typically <1M)
  • Simple processor architecture
  • No BIOS
  • Analog inputs
  • Many GPIOs
  • Very low power
  • Run a firmware directly from built-in ROM
  • Programmable via USB

The example of the Teensy 3.6

A solid alternative to the Cortex M4:
the ESP32

ESP32-Audio-Kit Wifi + Bluetooth Module

ESP32 TTGO T-Audio

and more recently...

The Teensy 4.0

Embedded CPU-Based Computers for
Bare-Metal Audio Applications

Embedded CPU-Based Computers

  • Large computing power (typically >1GHz)
  • Large RAM (typically >512M)
  • Advanced processor architecture
  • BIOS
  • No analog inputs
  • Few GPIOs
  • Higher power consumption than microcontrollers
  • Run a kernel from external ROM (SD card)
  • Not natively programmable via USB

Study case: the Raspberry Pi

  • Their exists C++ bare-metal environments for the RPI such as Circle
  • Allows for furthers C++ optimizations with Faust generating C++ code targeting specific processor architectures
  • To write a kernel to the SD card, it must be taken off of the PI or accessed through a programmer connected to the board's GPIOs (not convenient)
  • The PI doesn't have any analog input because it is based on a CPU
  • The PI doesn't have an audio codec (only a PWM DAC)

A middle ground: the Bela

Another middle ground: the Elk

*An Elk workshop will be hosted at CCRMA on Feb. 8, 2020.

Digital Signal Processors (DSP)

  • Microprocessor optimized for the operational needs of digital signal processing
  • Most commonly used solution for professional audio applications
  • Programmable in C++ and more and more DSPs are floating-point compatible
  • Analog Devices is a leader on the market with SHARC Processors

Analog Devices SHARC Audio Module

Faust and the SHARC Audio Module

GPUs: Graphics Processing Unit --
An Interesting Option

Travis Skare, and Jonathan Abel. GPU-Accelerated Modal Processors and Digital Waveguides.
In Proceedings of the 2019 Linux Audio Conference, Stanford, USA, 2019.

Field Programmable Gate Array (FPGAs)

  • Extremely low level
  • Idea is to create a custom electronic circuit adapted to a specific computational task
  • High level of parallelization
  • Computational power is not limited by the clock of the chip but by its physical size: what we can fit in it
  • Programming paradigm is completely different from other chips
  • We're working on a Faust solution for the Zybo Z7 (Xilinx 7-series FPGA)

Digilent Zybo Z7

The DadaMachines Doppler: an Open Source FPGA solution

Low-Level Audio System

  • i2c is used to configure the audio codec
  • i2s is used to transmit audio information

Inter-Integrated Circuit (I2C)

  • Used for low-speed serial communication between peripherals
  • System of address (each peripheral has one)
  • Used to configure audio codecs using a system of register/value (see the source code of SGTL5000 in the Teensy Audio Library)

Inter-IC Sound (I2S)

  • Serial bus interface standard used for connecting digital audio devices together
  • Separates clock and serial data signals: simpler than i2c
  • Audio data are interlaced and coded on signed integers (supports any bit depth and sampling rate)
  • Separate line for word select (audio channel)
  • AudioStream.cpp of the Teensy Audio Library is a good example of how i2s works