K10 I2S playback togerther with record via DMA 'click' noise

cancel
Showing results for 
Search instead for 
Did you mean: 

K10 I2S playback togerther with record via DMA 'click' noise

Jump to solution
243 Views
yangzeyong
Contributor III

Hello!

       I use K10 to playback wav file togerther with record micphone via dma to carry sound data. there is periodic ‘click’ noise,and playback speed is faster.

     K10 is i2s master, 48KHz/16bit, MCLK is 12.288MHz,BCLK=1.536MHz

      I debug the code ,and when i remove micphone record function code,only playback running,then there is not 'click' noise,and playback speed is normal.

     Playback and record  use dma channel0 and channel1, channel0 can preempt channel1, the interrupt priority of channel0 is higher than channel1.

         I use PE and the API I2S0_SendBlock & I2S0_ReceiveBlock to playback & record sound data.

    Thank you!

////////////////////////////////////////////////////////////////////////////////

p1.png

p0.png

Labels (1)
0 Kudos
1 Solution
123 Views
yangzeyong
Contributor III

I have resolved this question.

The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal

View solution in original post

0 Kudos
1 Reply
124 Views
yangzeyong
Contributor III

I have resolved this question.

The key reason is : when i use API I2S0_ReceiveBlock to record sound data,in the interrupt routine I2S0_OnBlockReceived ,i copy playback data FIFO repeatedly,so playback speed is faster twice than normal

View solution in original post

0 Kudos