AnsweredAssumed Answered

Can audio input and audio output be used with the same DMA audio buffer?

Question asked by J.Tobbe on Sep 26, 2016
Latest reply on Sep 28, 2016 by J.Tobbe
Hi.

I seem to be unable to post replies to threads in this forum. A proxy-error page appears and I'm not using a proxy server. Sometimes a "CAS/login" error appears.

I'd like to use the STM32F746G Discovery as a DSP effect unit and wonder if it is possible to get around the limitation that the BSP_AUDIO_IN_OUT_Init function only is compatible with the on board microphone due to shared timeframes. It should be possible to use the same DMA audio buffer to both read the line-in input and to transmit it to the headphone jack. In order to do this I guess it would be necessary to use the same IRQ timing for both input and output. This is the smart way of doing DSP.

I can only output data and at the moment I use the DMA transfer callback routine to prepare the new output buffer. In fact it is required to use the DMA half transfer complete for the other half in order not to mess up the buffer data. It took me long time to figure this out. It would've been so much easier if the examples provided would've had minimalistic examples together with the more advanced applications. An example that just passes audio from line-in to headphone jack with maybe a simple amplitude change would've been very pedagogical in this context. Another simple waveform output example would've been very nice too. If I get this to work I might provide these myself.

Outcomes