Commit bb18c678 authored by Hans de Goede's avatar Hans de Goede Committed by Mark Brown

ASoC: es8316: Simplify adc_pga_gain_tlv table

Most steps in this table are steps of 3dB (300 centi-dB), so we can
simplify the table.

This not only reduces the amount of space it takes inside the kernel,
this also makes alsa-lib's mixer code actually accept the table, where
as before this change alsa-lib saw the "ADC PGA Gain" control as a
control without a dB scale.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210228160441.241110-1-hdegoede@redhat.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent f86f58e3
...@@ -63,13 +63,8 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(adc_pga_gain_tlv, ...@@ -63,13 +63,8 @@ static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(adc_pga_gain_tlv,
1, 1, TLV_DB_SCALE_ITEM(0, 0, 0), 1, 1, TLV_DB_SCALE_ITEM(0, 0, 0),
2, 2, TLV_DB_SCALE_ITEM(250, 0, 0), 2, 2, TLV_DB_SCALE_ITEM(250, 0, 0),
3, 3, TLV_DB_SCALE_ITEM(450, 0, 0), 3, 3, TLV_DB_SCALE_ITEM(450, 0, 0),
4, 4, TLV_DB_SCALE_ITEM(700, 0, 0), 4, 7, TLV_DB_SCALE_ITEM(700, 300, 0),
5, 5, TLV_DB_SCALE_ITEM(1000, 0, 0), 8, 10, TLV_DB_SCALE_ITEM(1800, 300, 0),
6, 6, TLV_DB_SCALE_ITEM(1300, 0, 0),
7, 7, TLV_DB_SCALE_ITEM(1600, 0, 0),
8, 8, TLV_DB_SCALE_ITEM(1800, 0, 0),
9, 9, TLV_DB_SCALE_ITEM(2100, 0, 0),
10, 10, TLV_DB_SCALE_ITEM(2400, 0, 0),
); );
static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpout_vol_tlv, static const SNDRV_CTL_TLVD_DECLARE_DB_RANGE(hpout_vol_tlv,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment