[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220714042221.281187-13-sashal@kernel.org>
Date: Thu, 14 Jul 2022 00:21:53 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Mark Brown <broonie@...nel.org>, Sasha Levin <sashal@...nel.org>,
srinivas.kandagatla@...aro.org, bgoswami@...cinc.com,
lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
alsa-devel@...a-project.org
Subject: [PATCH AUTOSEL 5.18 13/41] ASoC: wcd9335: Fix spurious event generation
From: Mark Brown <broonie@...nel.org>
[ Upstream commit a7786cbae4b2732815da98efa39df96746b5bd0d ]
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@...nel.org>
Link: https://lore.kernel.org/r/20220603124609.4024666-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/soc/codecs/wcd9335.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index 12be043ee9a3..aa685980a97b 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 */
--
2.35.1
Powered by blists - more mailing lists