Skip to content

Add I2S Slave Support For Teensy 4.0#38

Draft
bthayer3 wants to merge 2 commits intochipaudette:masterfrom
bthayer3:addI2SslaveInput
Draft

Add I2S Slave Support For Teensy 4.0#38
bthayer3 wants to merge 2 commits intochipaudette:masterfrom
bthayer3:addI2SslaveInput

Conversation

@bthayer3
Copy link

@bthayer3 bthayer3 commented Feb 15, 2026

Looks like the AudioInputI2Sslave_F32 is targeting an older teensy 3 board. Add a new logic section to support Teensy 4.0 board. I compared the logic used in the PJRC audio library and added this logic more so as an educated guess. It my testing it does work with some glitches though, I am probably testing this all wrong though as I don't have an oscilloscope.

Probably would also need the design tool with this i2sslaveinput drag and drop element. Didn't add that code yet as I think this slave code needs more work.

For reference: this is the code I was using in the Arduino sketch when I tested this. I was sending over 16 bit at 48 khz:

#include "OpenAudio_ArduinoLibrary.h"
#include "AudioStream_F32.h"
#include "USB_Audio_F32.h"
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

AudioInputI2Sslave_F32       audioInI2S1;
AudioOutputUSB_F32           audioOutUSB1;
AudioConnection_F32          patchCord1(audioInI2S1, 0, audioOutUSB1, 0);
AudioConnection_F32          patchCord2(audioInI2S1, 1, audioOutUSB1, 1);

void setup() {
  AudioMemory(30);  
  AudioMemory_F32(30);
}

void loop() {
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant