ASoC: tegra-alt: Fix DMIC boost gain upper limit

The Tegra DMIC 'Boost Gain' control shows an upper limit of '25600'.

nvidia@tegra-ubuntu:~$ amixer -c 1 sget "DMIC3 Boost Gain"
 Simple mixer control 'DMIC3 Boost Gain',0
 Capabilities: volume volume-joined
 Playback channels: Mono
 Capture channels: Mono
 Limits: 0 - 25600
 Mono: 0 [0%]

However, if a user attempts to set it to this the following error is
seen ...

 [  314.961362] tegra210-dmic tegra210-dmic.2: Boost Gain overflow
 [  314.970917] tegra210-dmic tegra210-dmic.2: Boost Gain overflow

Software only allows a max value of '25599' to be written to this
control and so fix this.

Bug 2069481

Change-Id: Ibdfa6f2c43e3855c72d2ec6fed6848f1395ccef8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1673437
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2018-03-12 11:46:34 +00:00
committed by Sameer Pujar
parent 9216eec344
commit 04f1ad23f1

View File

@@ -491,7 +491,7 @@ static const struct soc_enum tegra210_dmic_osr_enum =
tegra210_dmic_osr_text);
static const struct snd_kcontrol_new tegra210_dmic_controls[] = {
SOC_SINGLE_EXT("Boost Gain", 0, 0, 25600, 0,
SOC_SINGLE_EXT("Boost Gain", 0, 0, 25599, 0,
tegra210_dmic_get_control, tegra210_dmic_put_control),
SOC_ENUM_EXT("Mono Channel Select", tegra210_dmic_ch_enum,
tegra210_dmic_get_control, tegra210_dmic_put_control),