diff options
author | Mark Brown <broonie@kernel.org> | 2022-06-03 15:46:09 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-13 15:27:56 +0300 |
commit | 6bda28a2f7113b1c49eb05155ace02b75bccae7b (patch) | |
tree | 68219bb33537220b241060d64555b6b152535227 /sound/soc/codecs/wcd9335.c | |
parent | 7263fc6c71c3a88c17a1ce3565b7b6f378d13878 (diff) | |
download | linux-6bda28a2f7113b1c49eb05155ace02b75bccae7b.tar.xz |
ASoC: wcd9335: Fix spurious event generation
The slimbus mux put operation unconditionally reports a change in value
which means that spurious events are generated. Fix this by exiting early
in that case.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220603124609.4024666-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wcd9335.c')
-rw-r--r-- | sound/soc/codecs/wcd9335.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index 597420679505..d9f135200688 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -1287,6 +1287,9 @@ static int slim_rx_mux_put(struct snd_kcontrol *kc, struct snd_soc_dapm_update *update = NULL; u32 port_id = w->shift; + if (wcd->rx_port_value[port_id] == ucontrol->value.enumerated.item[0]) + return 0; + wcd->rx_port_value[port_id] = ucontrol->value.enumerated.item[0]; /* Remove channel from any list it's in before adding it to a new one */ |