Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: I2S slave mode

  1. #1

    I2S slave mode

    Anyone got any documentation or can point me in the correct direction to check out the relevant I2S slave library functions. I need to connect a teensy 4 in slave mode to another device thats running in master mode (of course) . I also want to test this by connecting 2 teensy 4 devices together and pass audio between them both using I2S.

    Any leads or help much appreciated. I'm new at I2S.


  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    As with almost everything in the audio library, detailed documentation is in the design tool right-side panel.

    One difficult issue you will face is use of the slave mode input or output causes the entire audio library to run at the speed of the external LRCLK signal. So you generally can't use any of the master mode I/O, because they must run in sync with Teensy's clock. The design tool is aware of these limitation and will show little error icons when you drag 2 or more incompatible inputs/output onto the canvas.

  3. #3
    Thanks for the reply Paul.

    Is it possible to easily change to 48k and block size of 64 to halve the latency? Is it possible to get the teensy to generate an Mclock based on the BCLK ? Any detailed help would be greatly appreciated and save me a great deal of time as the learning curve is already incredibly daunting.. cheers.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    When Teensy runs in I2S slave mode, the external I2S device is in control of the sample rate.

    You can edit the block size in AudioStream.h. Most of the audio library automatically adapts, but some parts require 128 samples.

    No, there isn't any way (as far as I know) to generate a MCLK signal from the external device's BCLK. For that, you would need a phase locked loop. All of the PLLs in this chip are designed to run from the 24 MHz crystal. Even if you could somehow route BCLK to them, they're designed to lock to much higher input frequency.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts