diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-12-06 19:25:10 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-12-06 19:25:10 +0300 |
commit | 38ddfb2699d524b85929aa7da93bfc3a7f2c9275 (patch) | |
tree | 8c03696cd79f4a0c7f7e494dbf2be6313e248c7a /sound/soc/codecs/wsa881x.c | |
parent | fb1af5bea4670c835e42fc0c14c49d3499468774 (diff) | |
parent | 3fc27e9a1f619b50700f020e6cd270c1b74755f0 (diff) | |
download | linux-38ddfb2699d524b85929aa7da93bfc3a7f2c9275.tar.xz |
Merge tag 'asoc-fix-v5.16-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v5.16
A relatively large collection of updates, the size is increased quite a
bit by there being some repetitive changes for similar issues that occur
multiple times with both notifying control value changes and runtime PM.
The Rockchip update looks at first glance like a cleanup but fixes
instantiation of the hardware on some systems.
Diffstat (limited to 'sound/soc/codecs/wsa881x.c')
-rw-r--r-- | sound/soc/codecs/wsa881x.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c index 2da4a5fa7a18..564b78f3cdd0 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[] = { |