ESP8266Audio icon indicating copy to clipboard operation
ESP8266Audio copied to clipboard

ESP32 DAC

Open ahreenah opened this issue 4 years ago • 6 comments

How do I play sound using ESP32 internal DAC? How to configure AudioOutput? Which AudioOutputClass to use? Thanks in advance

ahreenah avatar Jul 28 '21 14:07 ahreenah

It's already written in the documentation

To use the internal DAC on ESP32, instantiate this class as AudioOutputI2S(0,1), see example PlayMODFromPROGMEMToDAC and code in AudioOutputI2S.cpp for details.

s-hadinger avatar Aug 02 '21 07:08 s-hadinger

Whats missing from the docs is what pins to use, which are:

  bclkPin = 26;
  wclkPin = 25;
  doutPin = 22;

trullock avatar Aug 24 '21 13:08 trullock

@trullock Could you kindly explain where and how to define or initilise these pins

Thanks

sudarshann avatar Sep 09 '21 06:09 sudarshann

@sudarshann These are already defined (hard coded) inside this library, see here https://github.com/earlephilhower/ESP8266Audio/blob/9dd4f24056821a2591f825c743d152bab862984a/src/AudioOutputI2S.cpp#L46

trullock avatar Sep 10 '21 11:09 trullock

Thanks I managed to set something like this for M5stack Atom Echo

out = new AudioOutputI2S(); out->SetPinout(19, 33, 22);

sudarshann avatar Sep 10 '21 11:09 sudarshann

M5stack Atom Echo has an external I2S chip and does not use ESP32 internal DAC

s-hadinger avatar Jan 07 '22 15:01 s-hadinger