Get Data from Codec Via I2S

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
shRe_2888731
Level 3
Level 3
5 likes given First like received First like given

Hi,

I have modified the CE220762_PDM_I2S example project to allow for switching between streaming audio from the PDM to codec via I2S v.s. receiving data from the SDOut of the codec and inputting it back to codec via the I2S. Streaming audio from PDM to codec works fine but when I get the data out of the Codec via the I2S, I get white noise. I have attached the project and wanted to make sure that I am setting the DMAs correctly. I am using a different codec than that of the PSoC6 Kit so I have omitted my codec's code from the project

0 Likes
1 Solution

As I suspected it was an I2S setting issue. For Rx, I had to set SDI latching time to Half-clock delayed for it to work.

View solution in original post

0 Likes
8 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

If you are getting data from the I2S RX FIFO, the data is already stereo (left and right), so there is no need to use two DMAs (PlayLeft and PlayRight).

Simply stream directly from I2S RX FIFO to the SRAM (1st DMA) and from SRAM to I2S TX FIFO (2nd DMA).

0 Likes
lock attach
Attachments are accessible only for community members.

Yes I am aware of that but that does not explain the white noise I am receiving. I have updated the project to use only one DMA if I am getting the stream from RX FIFO to SRAM. Are there any issues with my initializing of DMA or I2S or any other things that I may be doing incorrectly ?

0 Likes

I still see two DMAs connected to the I2S tx_dma in your latest project.

yes but I disable one when I keep SW2 pressed. Upon release, it uses two DMA for the record path from the PDM Mic.

0 Likes

I would suggest to simplify your project. Remove the PDM/PCM from your design and make a simple loop back from I2S TX FIFO to I2S RX FIFO.

You might even try first without DMAs to confirm you are getting good data from your codec.

0 Likes

How do I test it without using DMAs ? Do you mean using the codec's internal loop back path from ADC to the DAC ?

0 Likes

Refer to the code example https://www.cypress.com/documentation/code-examples/ce218636-psoc-6-mcu-inter-ic-sound-i2s-example

No need to use ADC or DAC. Only use the I2S component to receive and send audio data.

0 Likes

As I suspected it was an I2S setting issue. For Rx, I had to set SDI latching time to Half-clock delayed for it to work.

0 Likes