I’m trying to get the remote_mic_rx_raw project modified such that I can output audio over PCM (I have the audio shield board with the Wolfson h/w codec on it) instead of the OD. The main issue I am running into is that the audio stream from the ASRC is mono and the PCM peripheral requires stereo (or at least 2 channel mono) data. I am able to get the boot audible test signal to work (by duplicating the data values in BufferOut so that there is a L and R data sample for each point of the sine wave), so I believe I basically have the hardware configured properly.
I’ve tried various hacks to get this to work, like changing the ASRC output DMA config to have the memory dest be 16 bit word size (assuming that then BufferOut would have the 16-bit audio spaced out every other 16-bits in memory). However nothing I have tried quite gets things to work correctly.
I am assuming that I need to take BufferOut and duplicate audio samples into another buffer and have the PCM DMA channel read from this “2-channel mono” buffer, unless there is some way to configure the ASRC and PCM DMA channels such that I can get a consistent L or R output channel in BufferOut.
Assuming that I do need to manually create the “2-channel mono” buffer, I am not sure where that should take place. I don’t see how the ASRC out DMA channel and the PCM DMA channel are synchronized. It seems like DSP0_IRQHandler might be a likely candidate for getting this done, but again I don’t quite see how the buffering and timing is working.
Any help here would be greatly appreciated. Thanks!