]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-ranges
authorHerve Codina <herve.codina@bootlin.com>
Wed, 13 May 2026 08:16:58 +0000 (10:16 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 18 May 2026 16:44:13 +0000 (17:44 +0100)
commitd25e00ecd5c5be3b24cc2637b3e2403da3e1aaa1
tree1fa4b167eabd9e1d7d5c03c63b5636c4eb9c9244
parent5796026b8e9096158075d2a94667bfbb664d1f89
ASoC: simple-amplifier: gpio-audio-amp: Add support for gain-ranges

The mapping between physical gain values and gpio values can be
expressed using ranges described in the gain-ranges property.

This gain-ranges property is an array of ranges.

Each range in the array is defined by the first point and last point in
the range. Those points are a pair of values, the gpios value and the
related gain (dB) value.

With that, a given range defines N possible items (from the first point
gpios value to the last point gpios value) in order to set a gain from
the first point gain value to the last point gain value.

Handle this description and the related kcontrol.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Link: https://patch.msgid.link/20260513081702.317117-15-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/simple-amplifier.c