Skip to content

Commit

Permalink
ASoC: codecs: wcd938x: fix return value of mixer put function
Browse files Browse the repository at this point in the history
wcd938x_ear_pa_put_gain, wcd938x_set_swr_port and  wcd938x_set_compander
currently returns zero eventhough it changes the value.
Fix this, so that change notifications are sent correctly.

Fixes: e8ba1e0 ("ASoC: codecs: wcd938x: add basic controls")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220126113549.8853-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Srinivas Kandagatla authored and Mark Brown committed Jan 26, 2022
1 parent fca041a commit bd2347f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/soc/codecs/wcd938x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@ static int wcd938x_ear_pa_put_gain(struct snd_kcontrol *kcontrol,
WCD938X_EAR_GAIN_MASK,
ucontrol->value.integer.value[0]);

return 0;
return 1;
}

static int wcd938x_get_compander(struct snd_kcontrol *kcontrol,
Expand Down Expand Up @@ -2610,7 +2610,7 @@ static int wcd938x_set_compander(struct snd_kcontrol *kcontrol,
else
wcd938x_connect_port(wcd, portidx, mc->reg, false);

return 0;
return 1;
}

static int wcd938x_ldoh_get(struct snd_kcontrol *kcontrol,
Expand Down Expand Up @@ -2917,7 +2917,7 @@ static int wcd938x_set_swr_port(struct snd_kcontrol *kcontrol,

wcd938x_connect_port(wcd, portidx, ch_idx, enable);

return 0;
return 1;

}

Expand Down

0 comments on commit bd2347f

Please sign in to comment.