How enable SGTL5000 AVC feature?

I have an Colibri IMX6 DL.
The SGTL5000 on the module has a Feature called AVC automatic volume control that
control the loudness of audio, it has some register on sgtl500 to config this feature as below
is there any solution that I can enable and configure this feature?
Is it possible by alsa or driver? Could I access directly the Register?

Hi @kavevso !

As we can see from Colibri iMX6’s datasheet, the SGTL5000 is accessible via interfaces I2C and I2s:


Also, from NXP’s Application Note AN3663 (, we have:

This section provides programming examples that show how to configure SGTL5000. The registers can be written/read by using I2C communication protocol. SGTL5000 also supports SPI communication protocol but only register write operation is supported.

Of course, there is already an I2C driver for SGTL taking over, so, using Linux, most probably won’t be as easy as just writing to SGTL5000’s registers as shown in NXP’s Application Note.

I will try to check what could be done. And get back to you.

Best regards,

Hi again, @kavevso !

This was easier than expected to find.

I searched online for sgtl5000 automatic volume control alsa and found this:

So, seems like there is some support for it already. Checking in my local clone of Linux Kernel both mainline and downstream for BSP 6 (please check Embedded Linux Release Matrix | Toradex Developer Center and Build Linux Kernel from Source Code | Toradex Developer Center for more information on specifc branches), I ran the command cd /path/to/kernel/repository && git log sound/soc/codecs/sgtl5000.c and found the following commit (both are the same):

From the commit, seems like the AVC control is already implemented. Aren’t you able to access it via e.g. alsamixer?

Best regards,

Yes, I was saw that in BSP 6. But how could I try it with alsamixer ?



Hi @kavevso !

alsamixer is a CLI (command line interface application). You just type in the terminal of the module and it should show up to you.

Then you try to use the controls from there.

Also amixer, if you want to execute direct commands from the terminal:

Best regards,