Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

I2S (reserved stub)

When using a digital I2S sound HAT or dongle with Pi, the header I2S peripheral pins on BCM 18–21 are typically owned by the Linux ALSA sound stack (audio HATs). (Final does not drive I2S audio.)

Final exposes a single stub peripheral, i2s (I2sPeriph), so control programs can coexist with ALSA:

  1. Set true i2s.reserved! before GpioCtrl.inst.reset^.
  2. Reset then skips restoring BCM 18–21 (so ALSA pinmux / ownership is not yanked).
  3. Validate claims those pins as owner i2s, so Final cannot take them via gpio18–gpio21 or overlapping periphs such as spi1.
  4. i2s.reserved is not itself cleared by reset`, so it only needs to be set globaally, once in a session (but it can be set true repeatedly with no harm).s
true i2s.reserved!
GpioCtrl.inst.reset^
// … configure other pins / periphs as usual

There is no .enabled and no audio datapath on I2sPeriph. Only .reserved is exposed.

Conflicts

Reserved i2s overlaps the same BCMs as SPI1 data/CE0 (18–21). Do not enable spi1 (or those GPIO pins) while i2s is reserved.

See also Pins and Periphs and the Pin Map.