Sound recording using I2S

jab
 
Posts: 8
Joined: Fri Sep 30, 2016 3:52 pm

Sound recording using I2S

Fri Sep 30, 2016 4:18 pm

Hello,

The problem regards to this platform:
VoCore1 + dock2.0. OpenWRT 15.05 (14.07 can't boot when compiled on my own, but there isn't significant difference between 14.07 and 15.05 so far I know)

I'm trying to record sound through I2S lines. I can see on oscilloscope and logic analyzer, that clocks and data signals are correct. I can even play data recorded by logic analyzer and the sound is good. But when it goes through I2S controller and DMA, the sound is corrupted. There is periodic clacking noise in whole record (and in the beginning there are some data drop-outs, but this isn't problem for me).
So far I tried to modify both Ralink GDMA and I2S drivers, change burst size, add write memory barrier (wmb() ) when writing to registers, set 'coherent' bit in DMA controller, tried to change clock frequency, ... but nothing helped. In order to determine whether problem is caused by DMA I also tried periodic reading data directly from I2S Read FIFO register with DMA disabled (I wrote my driver for this purpose)... but nothing solved the problem :(

Did someone encountered the same or similar problem?

Thanks

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: Sound recording using I2S

Mon Oct 03, 2016 2:02 am

Please check the attachment, mt7628 i2s driver, also my github https://github.com/Vonger/openwrt-chaoscalmer.
I find similar issue and solved them, the patch is for mt7628, you might need to change some registers.
And also please share your code so I will know what is wrong.
Attachments
patch.zip
(8.75 KiB) Downloaded 574 times

jab
 
Posts: 8
Joined: Fri Sep 30, 2016 3:52 pm

Re: Sound recording using I2S

Tue Oct 04, 2016 10:49 am

Thank you for reply. Did you test the I2S sound record works on VoCore 2 with your drivers?

I'll try to adjust your drivers for VoCore 1 and let you know whether I was success or not. For the present I couldn't figure out what's wrong in driver code that causes the data corruption...

Vonger
 
Posts: 896
Joined: Sun Oct 19, 2014 6:00 am

Re: Sound recording using I2S

Thu Oct 06, 2016 12:41 pm

Ye, but I suggest you do not use DMA at first, just make everything work, then add DMA, step by step will make it easier.

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: No registered users and 37 guests