未验证 提交 3c97881b 编写于 作者: S Sameer Pujar 提交者: Mark Brown

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: a99ab6f3 ("ASoC: tegra: Add Tegra210 based ADX driver")
Signed-off-by: NSameer Pujar <spujar@nvidia.com>
Suggested-by: NJaroslav Kysela <perex@perex.cz>
Suggested-by: NMark Brown <broonie@kernel.org>
Reviewed-by: NTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/1637219231-406-16-git-send-email-spujar@nvidia.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 8db78ace
...@@ -193,6 +193,9 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, ...@@ -193,6 +193,9 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol,
struct soc_mixer_control *mc = struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;; (struct soc_mixer_control *)kcontrol->private_value;;
if (value == bytes_map[mc->reg])
return 0;
if (value >= 0 && value <= 255) { if (value >= 0 && value <= 255) {
/* update byte map and enable slot */ /* update byte map and enable slot */
bytes_map[mc->reg] = value; bytes_map[mc->reg] = value;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册