Skip to content

Commit 8db78ac

Browse files
pujarsbroonie
authored andcommitted
ASoC: tegra: Fix kcontrol put callback in AMX
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 AMX driver. Fixes: 77f7df3 ("ASoC: tegra: Add Tegra210 based AMX driver") Signed-off-by: Sameer Pujar <[email protected]> Suggested-by: Jaroslav Kysela <[email protected]> Suggested-by: Mark Brown <[email protected]> Reviewed-by: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent b31f8fe commit 8db78ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/tegra/tegra210_amx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol,
222222
int reg = mc->reg;
223223
int value = ucontrol->value.integer.value[0];
224224

225+
if (value == bytes_map[reg])
226+
return 0;
227+
225228
if (value >= 0 && value <= 255) {
226229
/* Update byte map and enable slot */
227230
bytes_map[reg] = value;

0 commit comments

Comments
 (0)