Hi all.

I've got a MAME emulator project running using a Teensy 4.1 hooked up to a ST7789 oled and a MAX98357A for sound. I'm using DMA to drive both of them and they work great individually but I want to make them work at the same time. As part of the solution I've set the oled DMA channel to triggerAtHardwareEvent(DMAMUX_SOURCE_LPSPI4_TX) and then disableOnCompletion(), then i enable it periodically with a 60hz timer. This works well, freeing up the DMA for a period of time between each frame for me to send audio data. The problem, of course, is the MAX98357A needs to be driven constantly or the audio sounds choppy. Driving either the audio or video with the CPU isn't really an option because I need all the cycles I can get. So my question is, does anyone know of an alternative to the MAX98357A that has a small memory buffer I can feed rapidly with DMA and it takes care of driving the speaker at the correct frequency? (preferably something as tiny as the 98357) Or can you offer a different solution entirely?

Many thanks in advance