You might also try adding a wire for MCLK to the SCLK pin on the UDA1334 DAC. Internally the UDA1334 needs to use a PLL because it doesn't get a system clock. That is exactly the purpose of MCLK. Maybe the PLL has trouble and connecting MCLK will help?
// UDA1334 bd Teensy 4.x
// VCC Vin 5V
// GND GND
// WSEL 20 LRCK 44.1 kHz
// DIN 7
// BCK 21 2.8224 MHz = 64.LRCK
// -- 23 MCLK 11.29 MHz
#include <Audio.h>
AudioSynthWaveformSine sine1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(sine1, 0, i2s1, 0);
AudioConnection patchCord2(sine1, 0, i2s1, 1);
void setup(){
AudioMemory(2);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
sine1.frequency(1000);
sine1.amplitude(1.0);
}
void loop(){
}
So the original issue ["I2S DAC not working unless touched"] is not an issue anymore?Well, I did some changes and it "works" now