mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
ASoC: codecs: wcd934x: fix return value of wcd934x_rx_hph_mode_put
wcd934x_rx_hph_mode_put currently returns zero eventhough it changes the value.
Fix this, so that change notifications are sent correctly.
Fixes: 1cde8b8223
("ASoC: wcd934x: add basic controls")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220222183212.11580-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
61163c3e74
commit
4b0bec6088
1 changed files with 4 additions and 1 deletions
|
@ -3308,13 +3308,16 @@ static int wcd934x_rx_hph_mode_put(struct snd_kcontrol *kc,
|
|||
|
||||
mode_val = ucontrol->value.enumerated.item[0];
|
||||
|
||||
if (mode_val == wcd->hph_mode)
|
||||
return 0;
|
||||
|
||||
if (mode_val == 0) {
|
||||
dev_err(wcd->dev, "Invalid HPH Mode, default to ClSH HiFi\n");
|
||||
mode_val = CLS_H_LOHIFI;
|
||||
}
|
||||
wcd->hph_mode = mode_val;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int slim_rx_mux_get(struct snd_kcontrol *kc,
|
||||
|
|
Loading…
Reference in a new issue