Teensy 4 - Using the PCM1802 and the CJMCU-4344. Not sure if this is still relevant any more, or helpful to anyone but, this appears to be working fine. Good audio, though a little hissy, but that’s probably my setup!
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=401,622
AudioEffectFreeverb freeverb1; //xy=648,538
AudioEffectFreeverb freeverb2; //xy=656,665
AudioMixer4 mixer2; //xy=682,808
AudioMixer4 mixer1; //xy=839,612
AudioOutputI2S i2s2; //xy=1049,623
AudioConnection patchCord1(i2s1, 0, freeverb1, 0);
AudioConnection patchCord2(i2s1, 0, mixer1, 1);
AudioConnection patchCord3(i2s1, 1, freeverb2, 0);
AudioConnection patchCord4(i2s1, 1, mixer2, 1);
AudioConnection patchCord5(freeverb1, 0, mixer1, 0);
AudioConnection patchCord6(freeverb2, 0, mixer2, 0);
AudioConnection patchCord7(mixer2, 0, i2s2, 1);
AudioConnection patchCord8(mixer1, 0, i2s2, 0);
//AudioControlCS4272 cs4272_1; //xy=404,816
AudioControlSGTL5000 cs4272_1; //xy=404,816
// GUItool: end automatically generated code
/* PCM1802 (ADC)
Pin Signal
23 SCK
3V PDW (to 3V+)
20 LRCK
12 FSY
21 BCK
8 DOUT
Ensure that `FMT0` is soldered (bridged, underneath the board)
*/
/* CJMCU-4344 (DAC)
Pin Signal Direction
7 SDIN Output
21 SCLK Output
20 LRCLK Output
23 MCLK Output
*/
int rvb_value;
int dam_value;
const float DIV10 = (1.0 / 10.0); // 0 to 1.0
#define FSYNC 12 // has to be high on normal usage
void setup() {
// put your setup code here, to run once:
AudioMemory(60);
pinMode(FSYNC,OUTPUT);
digitalWrite(FSYNC,HIGH);
cs4272_1.enable();
cs4272_1.volume(0.9);
mixer1.gain(0, 0.9);
mixer1.gain(1, 1.0);
mixer1.gain(2, 1.0);
mixer2.gain(0, 0.9);
mixer2.gain(1, 1.0);
mixer2.gain(2, 1.0);
rvb_value = 250;
dam_value = 15;
}
void loop() {
// int rvb_value = map(analogRead(A1), 0, 1023, 1, 11);
// int dam_value = map(analogRead(A2), 0, 1023, 1, 11);
freeverb1.roomsize( (rvb_value * DIV10) );
freeverb2.roomsize( (rvb_value * DIV10) );
freeverb1.damping( (dam_value * DIV10) );
freeverb2.damping( (dam_value * DIV10) );
// Serial.println(dam_value);
}