Sound Effect Delay - SGTL5000

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

Sound Effect Delay - SGTL5000

1,806 Views
danielmartins2
Contributor I

Hello Sirs,

We're developing an application using C++ for backend and QML for frontend. In this application we'll play some audios which format is WAV and length from 1 to 5 secs.

The problem is that when an audio will be played after no audio was played before under ~6 seconds, it is delayed about ~2 seconds before starting playing. So If the audio is played constantly, it has no delay.

For hardware we're using a Toradex SOM, with a iMX6DL and a codec SGTL5000. For software, we're using Linux, Yocto distribuiton and Qt for framework.

One important detail that we've tested. We put the oscilloscope on the pin module - pin15 - output for headphone left (output from SGTL5000). This pin Toradex recommend to use for audio system. At stand-by mode, this pin have the level 0 (0V). When I play one sound, this pin goes to level 1 (3.3V). After 5 seconds, this pin return to 0V. If you play a sound before this 5 seconds, the module maintain this pin in 3.3V - and the delay doesn't occur. But, the delay every occurs when this pin is 0V. So, I think maybe have one configuration about this (delay time to pin go to 0)

Are there any important configuration for this .. or for SGTL500??

Other important point, can you see the attach, with our screen. This is the log of our test. When we play any sound, and we cat dapm_widget value, we can see the paremeter 'PM State:' When we play any sound, this parameter goes to On - and any sound play with NO delay. After 5 seconds, this parameter goes to 'Standby', like in the picture. So, the next sound will be with the delay. We need to fid one way to configure this parameter to stay forever in ON

Are there any important configuration for this .. or for SGTL500??

We already tried to put a value (-1 and 1e6) to the field 'pmdown_time', but this doesn't work too.

Kindly,

Labels (3)
0 Kudos
Reply
4 Replies

1,458 Views
tprins
Contributor I

danielmartins‌ did you ever get this fixed???  If so, what was your solution?  I'm having an almost identical problem w/ my implementation.  When I try to play any audio out of the driver & device (aplay, custom apps, pjsip), I always get a 2 second delay.

0 Kudos
Reply

1,458 Views
danielmartins2
Contributor I

Hello Taylor,

Our problem was not solved. I tried a lot of things, but the HW like turn off if we don't play some sound between  5 seconds. Like the SGTL goes to a Standby mode.

This is the poit that we can't resolve yet in our project.

Sorry for don't help you.

0 Kudos
Reply

1,458 Views
esevo
Contributor III

danielmartins‌ we had been struggling with the same issue but on a different codec. After considerable amount of time looking through DAPM and many other posts regarding the similar issues, it turned out that our driver had msleep(250) that was hit every time we played sound. This delay was much worse (nearly double!!) after 5 seconds. I'm not sure if this is indeed your issue but I would take a look at the driver for the SGTL5000 to see if there are any hidden sleeps through out it.

0 Kudos
Reply

1,458 Views
igorpadykov
NXP Employee
NXP Employee

Hi Daniel

one can test with baremetal SDK tests to narrow down issue, if this could be caused

by Linux operating system delays:

Github SDK
https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK 

As for Linux one can try not use lower power modes (with "enable_wait_mode=off"

kernel boot paramter) or disable busfreq driver using Chapter 24 attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------