mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
ASoC: codecs: wcd934x: return correct value from mixer put
wcd934x_compander_set() 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/20211130160507.22180-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
23ba28616d
commit
d9be0ff479
@ -3256,6 +3256,9 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
|
|||||||
int value = ucontrol->value.integer.value[0];
|
int value = ucontrol->value.integer.value[0];
|
||||||
int sel;
|
int sel;
|
||||||
|
|
||||||
|
if (wcd->comp_enabled[comp] == value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
wcd->comp_enabled[comp] = value;
|
wcd->comp_enabled[comp] = value;
|
||||||
sel = value ? WCD934X_HPH_GAIN_SRC_SEL_COMPANDER :
|
sel = value ? WCD934X_HPH_GAIN_SRC_SEL_COMPANDER :
|
||||||
WCD934X_HPH_GAIN_SRC_SEL_REGISTER;
|
WCD934X_HPH_GAIN_SRC_SEL_REGISTER;
|
||||||
@ -3279,10 +3282,10 @@ static int wcd934x_compander_set(struct snd_kcontrol *kc,
|
|||||||
case COMPANDER_8:
|
case COMPANDER_8:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wcd934x_rx_hph_mode_get(struct snd_kcontrol *kc,
|
static int wcd934x_rx_hph_mode_get(struct snd_kcontrol *kc,
|
||||||
|
Loading…
Reference in New Issue
Block a user