Skip to content

Commit 3c97881

Browse files
pujarsbroonie
authored andcommitted
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: a99ab6f ("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>
1 parent 8db78ac commit 3c97881

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sound/soc/tegra/tegra210_adx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol,
193193
struct soc_mixer_control *mc =
194194
(struct soc_mixer_control *)kcontrol->private_value;;
195195

196+
if (value == bytes_map[mc->reg])
197+
return 0;
198+
196199
if (value >= 0 && value <= 255) {
197200
/* update byte map and enable slot */
198201
bytes_map[mc->reg] = value;

0 commit comments

Comments
 (0)