]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - sound/soc/codecs/sgtl5000.c
ASoC: sgtl5000: add avc support
authorRichard Leitner <richard.leitner@skidata.com>
Wed, 14 Jun 2017 08:36:12 +0000 (10:36 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jun 2017 09:33:26 +0000 (10:33 +0100)
commita729526720059ae019803acc953f07d9c17ae234
tree9d79ba4908e750b13f5335a26d9c796d99c3dbe3
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6
ASoC: sgtl5000: add avc support

The sgtl5000 features an automatic volume control block (AVC), which
reduces loud signals and amplifies low level signals for easier
listening. This patch adds support for this AVC block to the driver.

Apart from the "AVC Switch" control which enables the block following
controls for the configuration of AVC are added:
+ AVC Threshold Volume: threshold where audio is compressed when
the measured level is above or expanded when below
+ AVC Max Gain Volume: maximum gain which can be applied when
the measured audio level is below threshold
+ AVC Hard Limiter Switch: when enabled the signal is limited to
the programmed threshold.
+ AVC Integrator Response: response time of the integrator

The AVC block is enabled and configured using the DAP_AVC_CTRL and
DAP_AVC_THRESHOLD registers.

Following 2 checkpatch.pl strict checks are ignored because the
indentation style is different for the struct snd_kcontrol_new
definition:
patch:147: CHECK: Alignment should match open parenthesis
patch:150: CHECK: Alignment should match open parenthesis

Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/sgtl5000.c