Linux kernel 4.19, and audio codec

Hello,

I permit myself to contact you about a particular behaviour with Linux kernel 4.19.
Since I use this kernel, My sound card seems to be in a “power saving mode” after playing a sound in my linux embedded system.
So after using aplay command on a file “sound.wav”, there is a 5 second timing, and a “poc” sound can be eared.

After investigation, it’s seems the problem has a link with this sysfs file:
/sys/devices/soc0/sound/mycodec/pmdown_time

This pmdown_time is the delay between the end of playing wav sound and the “poc energy saving” sound. This poc is not only present on my codec, but in many alsa audio codecs I’ve tested. After investigation, the driver impacting this behaviour seems to be the folowing driver:

linux/sound/soc/soc-pcm.c, line 737 on kernel 4.19.

But I don’t find the real cause of the poc sound. I mean, doing the following command works to disable this poc sound, but it is a workaround, and not a “real” solution:

echo -1 > /sys/devices/soc0/sound/mycodec/pmdown_time

So putting “-1” value seems to disable the poc, but after reading the driver code: pcm.c, I think it just make disapear the poc sound by putting an unreachable delay, so poc sound can’t be done.

This subject was published in this URL:

Currently, I don’t find the origin about which of these drivers/ALSA stack/other is doing a “power saving mode” after a aplay.

Does anyone knows a correct way to disable properly this behaviour whithout using the previous workaround?

Thanks for all and best reguards: Anthony.