This is a note to let you know that I've just added the patch titled ASoC: codecs: wsa881x: fix return values from kcontrol put to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-codecs-wsa881x-fix-return-values-from-kcontrol-put.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 3fc27e9a1f619b50700f020e6cd270c1b74755f0 Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> Date: Tue, 30 Nov 2021 16:05:07 +0000 Subject: ASoC: codecs: wsa881x: fix return values from kcontrol put From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> commit 3fc27e9a1f619b50700f020e6cd270c1b74755f0 upstream. wsa881x_set_port() and wsa881x_put_pa_gain() currently returns zero eventhough it changes the value. Fix this, so that change notifications are sent correctly. Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> Link: https://lore.kernel.org/r/20211130160507.22180-5-srinivas.kandagatla@xxxxxxxxxx Signed-off-by: Mark Brown <broonie@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/soc/codecs/wsa881x.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) --- a/sound/soc/codecs/wsa881x.c +++ b/sound/soc/codecs/wsa881x.c @@ -772,7 +772,8 @@ static int wsa881x_put_pa_gain(struct sn usleep_range(1000, 1010); } - return 0; + + return 1; } static int wsa881x_get_port(struct snd_kcontrol *kcontrol, @@ -816,15 +817,22 @@ static int wsa881x_set_port(struct snd_k (struct soc_mixer_control *)kcontrol->private_value; int portidx = mixer->reg; - if (ucontrol->value.integer.value[0]) + if (ucontrol->value.integer.value[0]) { + if (data->port_enable[portidx]) + return 0; + data->port_enable[portidx] = true; - else + } else { + if (!data->port_enable[portidx]) + return 0; + data->port_enable[portidx] = false; + } if (portidx == WSA881X_PORT_BOOST) /* Boost Switch */ wsa881x_boost_ctrl(comp, data->port_enable[portidx]); - return 0; + return 1; } static const char * const smart_boost_lvl_text[] = { Patches currently in stable-queue which might be from srinivas.kandagatla@xxxxxxxxxx are queue-5.10/asoc-codecs-wcd934x-handle-channel-mappping-list-correctly.patch queue-5.10/asoc-codecs-wcd934x-return-correct-value-from-mixer-put.patch queue-5.10/asoc-qdsp6-q6routing-fix-return-value-from-msm_routing_put_audio_mixer.patch queue-5.10/asoc-codecs-wsa881x-fix-return-values-from-kcontrol-put.patch