diff options
author | Sameer Pujar <spujar@nvidia.com> | 2021-11-18 10:07:10 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-18 22:02:43 +0300 |
commit | 3c97881b8c8a2aa8afd4d7a379b7ff03884c9e4a (patch) | |
tree | 84a9d21de28618e1775e6013d88ba72c725d15cf /sound | |
parent | 8db78ace1ba897302131422ce15c5eb04510cef8 (diff) | |
download | linux-3c97881b8c8a2aa8afd4d7a379b7ff03884c9e4a.tar.xz |
ASoC: tegra: Fix kcontrol put callback in ADX
The kcontrol put callback is expected to return 1 when there is change
in HW or when the update is acknowledged by driver. This would ensure
that change notifications are sent to subscribed applications. Filter
out duplicate updates in ADX driver.
Fixes: a99ab6f395a9 ("ASoC: tegra: Add Tegra210 based ADX driver")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-16-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/tegra/tegra210_adx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index d7c7849c2f92..933c4503fe50 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -193,6 +193,9 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;; + if (value == bytes_map[mc->reg]) + return 0; + if (value >= 0 && value <= 255) { /* update byte map and enable slot */ bytes_map[mc->reg] = value; |