Audio delay issue during voice call on iMX6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Audio delay issue during voice call on iMX6

Jump to solution
1,263 Views
jaripeltonen
Contributor IV

Hello,

I'm working on a HW that is based on iMX6UL. The SW is built using Yocto (warrior), Kernel version is 4.14.78.

On my HW I have a Quectel PCIe modem card connected to PCIe connector, and I can set up the modem and establish a voice call by using AT commands through one of the USB endpoints. I have a Jabra speaker phone conected to a USB port. There's no audio codec, the PCM audio data from the modem is used in this case.

I use following commands to open up audio paths;

arecord -Ddefault:CARD=Android | aplay -Ddefault:CARD=USB &
arecord -Ddefault:CARD=USB | aplay -Ddefault:CARD=Android &

What I am experiencing in this setup is that

 - in the beginning of the voice call the audio is delayd < 1 second in both directions

 - the audio from mobile phone to my HW starts to cumulate during the voice call

 - after 20 minutes the delay is 4..5 seconds, after 40 minutes the delay is 8..9 seconds

 - the audio from my HW to mobile phone is not delayd (more than what it was in the beginning) after 20/40 minutes

When the call is disconnected, I see 'overrun' notifications on Kernel trace terminal;

overrun!!! (at least 0.047 ms long)
overrun!!! (at least 0.054 ms long)
overrun!!! (at least 0.051 ms long)
overrun!!! (at least 0.044 ms long)
overrun!!! (at least 0.047 ms long)

If I then establish a new voice call, the audio delay is there immediately. So, it looks as if there's some buffer getting filled in and is not getting processed fast enough.

 1) Do you have any idea on what could cause this audio delay? Is it a matter of iMX performance?

 2) Why does it only appear on audio coming from mobile phone to my HW?

 3) Could I avoid this issue by using some other way of routing the audio? What would that be? I did open another ticket with questions regarding SOX 'play' and 'rec', but haven't got any replies on that question yet ( https://community.nxp.com/t5/i-MX-Processors/How-to-route-audio-when-using-SOX-play-and-rec/m-p/151... ).

If you have any advice or hint on how to solve this issue, please let me know!

Thanks for your support!

Best regards,

Jari

Labels (2)
Tags (2)
0 Kudos
Reply
1 Solution
1,191 Views
jaripeltonen
Contributor IV

Hi Dhruvit,

Thanks for your message!

Actually, we found a way to improve the audio quality by using additional parameters on 'aplay' and 'arecord'; file type is set to raw (-t raw), sampling rate was set to 48000 (-r 48000) and sample format is set to S16_LE (-f S16_LE). These seem to improve audio performance and keep the audio delay in an acceptable level and not getting cumulating any more.

Best regards,

Jari

View solution in original post

0 Kudos
Reply
2 Replies
1,210 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @jaripeltonen,

Could you please provide me with the device tree nodes?

 

Best Regards,
Dhruvit.

0 Kudos
Reply
1,192 Views
jaripeltonen
Contributor IV

Hi Dhruvit,

Thanks for your message!

Actually, we found a way to improve the audio quality by using additional parameters on 'aplay' and 'arecord'; file type is set to raw (-t raw), sampling rate was set to 48000 (-r 48000) and sample format is set to S16_LE (-f S16_LE). These seem to improve audio performance and keep the audio delay in an acceptable level and not getting cumulating any more.

Best regards,

Jari

0 Kudos
Reply