ASoC: sun8i-codec: Add AIF, ADC, and DAC volume controls
authorSamuel Holland <samuel@sholland.org>
Thu, 18 Nov 2021 03:36:45 +0000 (21:36 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 29 Nov 2021 12:19:47 +0000 (12:19 +0000)
commitfd03cf7f5b4726028cfc2ef76e42d0d5c66377aa
tree785b319df01a61a298b1c4983a294d77731c3464
parent335302dbc2e4d041b579614beed83124f341ff43
ASoC: sun8i-codec: Add AIF, ADC, and DAC volume controls

This allows changing the volume of each digital input/output
independently, and provides the only "master volume" for the DAC.
(The ADC also has a gain control on the analog side.)

While the hardware supports digital gain up to +72dB, the controls here
are limited to +24dB maximum, as any gain above that level makes volume
sliders difficult to use, and is extremely likely to cause clipping.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20211118033645.43524-1-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sunxi/sun8i-codec.c