aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/codecs/wsa881x.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-12-31 13:21:39 +0000
committerMark Brown <broonie@kernel.org>2021-12-31 13:23:28 +0000
commit8b974c122bc649895bc07191ec34633d8087323e (patch)
treea33d32de99f1dd2756ad82f22d72a775a8fa9a86 /sound/soc/codecs/wsa881x.c
parentASoC: rt5682: Register wclk with its parent_hws instead of parent_data (diff)
parentASoC: mediatek: mt8195: correct default value (diff)
downloadwireguard-linux-8b974c122bc649895bc07191ec34633d8087323e.tar.xz
wireguard-linux-8b974c122bc649895bc07191ec34633d8087323e.zip
ASoC: Merge fixes
So we can send to Linus.
Diffstat (limited to 'sound/soc/codecs/wsa881x.c')
-rw-r--r--sound/soc/codecs/wsa881x.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index ffc025e01bce..0222370ff95d 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -772,7 +772,8 @@ static int wsa881x_put_pa_gain(struct snd_kcontrol *kc,
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_kcontrol *kcontrol,
(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[] = {