cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

shRe_2888731
New Contributor II

Hi I have a custom hardware with two PDMs (same as the ones on TFT Display Shield Board CY8CKIT-028-TFT) and I am trying to use the stereo mode in the PDM component but when I do that the voice is not recognizable although I can hear sound. However, both seem to be individually working with recognizable human voice if I choose mono L or mono R. What settings other than the "Stereo/Mono Mode Select" needs to modified in the project assuming on the codec side I have selected the right settings for the Left and Right data to be outputted to Left and Right headphones respectively ?

0 Likes
1 Solution
RodolfoGL
Employee

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.

View solution in original post

2 Replies
shRe_2888731
New Contributor II

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 ?

0 Likes
RodolfoGL
Employee

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.

View solution in original post

Top labels