Teensy 3.6 + Audio Board USB streaming interruption

Status
Not open for further replies.

danixdj

Well-known member
Hi, i have a problem with my teensy 3.6 and audio board sgtl-5000

I'm testing the audio streaming from USB (Windows 10 64 Bit) and i have a repetitive streaming interruption...

Schermata 2017-09-17 alle 19.21.07.png


Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=98,67
AudioInputUSB            usb1;           //xy=113,121
AudioMixer4              mixer1;         //xy=360,81
AudioMixer4              mixer2;         //xy=432,194
AudioOutputI2S           i2s2;           //xy=1009,88
AudioOutputUSB           usb2;           //xy=1045,153
AudioConnection          patchCord1(i2s1, 0, mixer1, 0);
AudioConnection          patchCord2(i2s1, 1, mixer2, 0);
AudioConnection          patchCord3(usb1, 0, mixer1, 1);
AudioConnection          patchCord4(usb1, 1, mixer2, 1);
AudioConnection          patchCord5(mixer1, 0, i2s2, 0);
AudioConnection          patchCord6(mixer1, 0, usb2, 0);
AudioConnection          patchCord7(mixer2, 0, i2s2, 1);
AudioConnection          patchCord8(mixer2, 0, usb2, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=172,201
// GUItool: end automatically generated code


void setup() {
sgtl5000_1.enable();
AudioMemory(40);
sgtl5000_1.lineOutLevel(13);
sgtl5000_1.lineInLevel(0);
sgtl5000_1.adcHighPassFilterDisable();
sgtl5000_1.muteHeadphone();

}

void loop() {
}

180 Mhz, Faster ( #define F_BUS 90000000 ) interruption is every +- 5 seconds
192 Mhz, Faster ( #define F_BUS 96000000 ) interruption is every +- 7 seconds

the same configuration but 144 Mhz, fast, in T3.2 works fine...

Audio:

https://www.dropbox.com/s/6bv4er8zhvyd7i2/usb_interruprion.mp3?dl=0

I'm doing something wrong i think...
 
I'm not sure I understand what that second audio input "AudioInputUSB usb1; " is doing. Looking like you're taking audio input from the USB connection and also streaming it back out.

Can you simplify the audio blocks as a test to just stream the I2S into the USB?

Code:
// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=217,315
AudioOutputUSB           usb1;           //xy=422,311
AudioConnection          patchCord1(i2s1, 0, usb1, 0);
AudioConnection          patchCord2(i2s1, 1, usb1, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=316,369
// GUItool: end automatically generated code
 
I'm not sure I understand what that second audio input "AudioInputUSB usb1; " is doing. Looking like you're taking audio input from the USB connection and also streaming it back out.

Can you simplify the audio blocks as a test to just stream the I2S into the USB?

Code:
// GUItool: begin automatically generated code
AudioInputI2S            i2s1;           //xy=217,315
AudioOutputUSB           usb1;           //xy=422,311
AudioConnection          patchCord1(i2s1, 0, usb1, 0);
AudioConnection          patchCord2(i2s1, 1, usb1, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=316,369
// GUItool: end automatically generated code

I'm testing from USB to speaker (AudioInputUSB to AudioOutputI2S), my code was for i2s out and USB input and USB output and i2s input... but the problem is the same with this simplified code:

Code:
// GUItool: begin automatically generated code
AudioInputUSB            usb1;           //xy=113,121
AudioOutputI2S           i2s2;           //xy=1009,88
AudioConnection          patchCord1(usb1, 0, i2s2, 0);
AudioConnection          patchCord2(usb1, 1, i2s2, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=172,201
// GUItool: end automatically generated code
 
Status
Not open for further replies.
Back
Top