earlephilhower / ESP8266Audio

Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
GNU General Public License v3.0
2.02k stars 432 forks source link

Calls to AudioOutputI2SNoDAC() kill other pins #689

Open KDMcMullan opened 3 months ago

KDMcMullan commented 3 months ago

When I call

out = new AudioOutputI2SNoDAC();

it appears to do something to pin D8 (GPIO15). It doesn't seem to function well as an input after this call.

KDMcMullan commented 3 months ago

This is believed to be a feature of the WRITE_PERI_REG(PERIPHS_IO_MUX_MTDO_U, orig_bck); call in AudioOutputI2SNoDAC.cpp I don't fully understand the low level registers, but it is believed this tells GPIO15 to be the SPI chip select. The workaround is to call pinMode(15, INPUT); // DTMF decoder pins after the call to the above.