Hello,
I have a Teensy 4.1 with the corresponding audio shield. I also have a TFT display but I don't even have to plug it in to demonstrate the behavior -- this happens with or without successfully connecting the display. Steps to reproduce:
1. Mount audio shield to Teensy 4.1.
2. Connect headphones to audio shield.
3. Connect a mono line to the line in (left) connections on the Audio Shield (in my case a 1/4" jack with a guitar plugged in).
4. Run the code below. I can hear the audio signal passing through the Teensy fine in the headphones.
5. Uncomment the initR line (line 34).
6. Now I can no longer hear the audio signal from line in left. The audio in signal suddenly disappears.
Line out still works -- I tested that using different code and it is fine when outputting audio from a synth build in conjunction with the display running. I can output audio to the headphone jack fine but there is no audio coming in. I also tried changing the pin numbers for DC and CS and it was the same. Again, it happens whether or not the display is even connected.
Any thoughts/help/suggestions would be greatly appreciated!
I have a Teensy 4.1 with the corresponding audio shield. I also have a TFT display but I don't even have to plug it in to demonstrate the behavior -- this happens with or without successfully connecting the display. Steps to reproduce:
1. Mount audio shield to Teensy 4.1.
2. Connect headphones to audio shield.
3. Connect a mono line to the line in (left) connections on the Audio Shield (in my case a 1/4" jack with a guitar plugged in).
4. Run the code below. I can hear the audio signal passing through the Teensy fine in the headphones.
5. Uncomment the initR line (line 34).
6. Now I can no longer hear the audio signal from line in left. The audio in signal suddenly disappears.
Line out still works -- I tested that using different code and it is fine when outputting audio from a synth build in conjunction with the display running. I can output audio to the headphone jack fine but there is no audio coming in. I also tried changing the pin numbers for DC and CS and it was the same. Again, it happens whether or not the display is even connected.
Any thoughts/help/suggestions would be greatly appreciated!
Code:
#include <ST7735_t3.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=215,105
AudioOutputI2S i2s2; //xy=975,107
AudioConnection patchCord1(i2s1, 0, i2s2, 0);
AudioConnection patchCord2(i2s1, 1, i2s2, 1);
AudioControlSGTL5000 sgtl5000_1; //xy=609,180
// GUItool: end automatically generated code
const int PIN_DISPLAY_CLK = 13;
const int PIN_DISPLAY_MOSI = 11;
const int PIN_DISPLAY_DC = 9;
const int PIN_DISPLAY_RST = 8;
const int PIN_DISPLAY_CS = 10;
void setup() {
AudioMemory(256);
sgtl5000_1.enable();
sgtl5000_1.volume(0.80);
sgtl5000_1.inputSelect(AUDIO_INPUT_LINEIN);
ST7735_t3 tft = ST7735_t3(PIN_DISPLAY_CS, PIN_DISPLAY_DC, PIN_DISPLAY_MOSI, PIN_DISPLAY_CLK, PIN_DISPLAY_RST);
// tft.initR(INITR_BLACKTAB);
}
void loop() {
}