AnsweredAssumed Answered

Audio LOST after ~10 hrs on i.MX 6Q

Question asked by Ankit Patel on Feb 14, 2014
Latest reply on Feb 23, 2017 by Fabio Estevam
Branched to a new discussion

Hi All,

 

We are facing strange issue of loosing audio after ~10 hrs of playback.

Platform:: We have customized platform of SabreSD i.MX 6Q.

 

Audio Source connected on port-5 of AUDMUX as MASTER using I2S. Port-1 connected SSI-1. Hence, audio received from AudioSource chip -> PORT-5 -> PORT-1 -> SSI-1.

Audio Codec (playback) connected on Port-6 of AUDMUX as SLAVE using I2S. Port-2 connected SSI-2. Hence, audio playback through SSI-2 -> PORT-2 -> PORT-6 -> Audio Codec chip

 

Existing audio driver for recording path was SSI-1 -> MEMORY. Means one DMA channel setup for DMA_FROM_DEVICE.

We have introduced ASRC in between Recording path (SSI-1 -> ASRC -> MEMORY). So, we have setup two DMA channel; one for SSI-1 -> ASRC i.e. DMA_DEV_TO_DEV & second for ASRC -> MEMORY i.e. DMA_FROM_DEVICE at driver level.

We reference existing playback source code of DMA Channel setup for DMA_DEV_TO_DEV.

Bus width for above channels are DMA_SLAVE_BUSWIDTH_2_BYTES.

 

Modified clock source of  ssi1_clk, ssi2_clk & ssi3_clk to pll4_audio_main_clk in clock.c file.

Now, in our android applicatin we receive recording samples using AudioRecord object & play those sample using AudioTrack. This task done in only one thread at application side.

 

Result:

After above setup we are able to play recoreded content for approx ~10 hrs. but after that we receive error: "Unvalid SDMA MODE" & audio lost.

As per this log, it seems that DMA channel for DMA_DEV_TO_DEV (SSI-1 -> ASRC) met with an error.We try to read reg value of SDMAARM_EVTERR (Ref pg. no-4871:: 55.20.10 -DMA Request Error Register (SDMAARM_EVTERR) i.MX 6Q RM).

Which suggest that error bit set for above channel; this probably means there is an overflow of data for that channel.

But we could not identify how its possible.

 

Can anybody help me out to find where we made mistake in setup of DMA channel ? What is the probable reason for above scenario ?

 

For everybody reference, i am attaching patch here-with.

Please go through it & give comments upon it.

 

-Ankit.

Original Attachment has been moved to: asrc_V1_for_fsl_community.zip

Outcomes