Looks like I had to just remove the extra DMA(either DMA_PlayLeft or DMA_PlayRight) that was there to make mono into stereo for this example project. Any other changes that I ought to make ?
1 of 1 people found this helpful
Hi. When you set the configuration Stereo, the PDM/PCM block will add to the FIFO two times more data (interleaved data L/R), that's why you would see audio issues. The reason we have two DMAs is that the PDM/PCM is producing mono data, but the I2S requires stereo. So we simply read the same data from the PDM/PCM FIFO and write to the I2S FIFO twice.
You are right, you can use only one DMA if both blocks work with stereo data. You might also look at the word length that both blocks are configured with. Make sure they are the same, otherwise you might need to some shifting.