From the picture output is top
The silkscreen refer to:
- SCK -> BCLK PIN 8
- DAT -> DACDAT PIN 10
- SDB -> ADCDAT PIN 9
- MCK -> MCLK PIN 11
- FSA -> LRC PIN 7
- SCL (Silkscreen flipped) -> SCLK PIN 16
- SDA (Silkscreen flipped) -> SDIN PIN 17
- 5V -> SPKVDD
The connections to the ESP32 Dev board should be:
- SCK -> D33
- DAT -> D26
- SDB -> D27
- MCK -> IO0 (Jumper to BOOT)
- FSA -> D25
- SCL -> D18
- SDA -> D19
- 5V -> Not connected
Software side
The steps are:
- Create a simple code like a noise generator.
- Output it, and copy and paste.
- The main looks something like
// Init audio codec
WM8978 wm8978;
wm8978.init();
wm8978.addaCfg(1,1);
wm8978.inputCfg(0,0,0);
wm8978.outputCfg(1,0);
wm8978.sampleRate(0);
wm8978.micGain(30);
wm8978.auxGain(0);
wm8978.lineinGain(0);
wm8978.spkVolSet(0);
wm8978.hpVolSet(30,30);
wm8978.i2sCfg(2,0); //format 12S, length 16bit
DSP->start();
DSP->setParamValue("Volume", 0.1);
Crashes
Most probably is because you dont have enough RAM >.<