Skip to content

Commit 7f103af

Browse files
charleskeepaxbroonie
authored andcommitted
ASoC: cs47l15: Fix event generation for low power mux control
cs47l15_in1_adc_put always returns zero regardless of if the control value was updated. This results in missing notifications to user-space of the control change. Update the handling to return 1 when the value is changed. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 46b0d05 commit 7f103af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sound/soc/codecs/cs47l15.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol,
122122
snd_soc_kcontrol_component(kcontrol);
123123
struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component);
124124

125+
if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode)
126+
return 0;
127+
125128
switch (ucontrol->value.integer.value[0]) {
126129
case 0:
127130
/* Set IN1 to normal mode */
@@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol,
150153
break;
151154
}
152155

153-
return 0;
156+
return 1;
154157
}
155158

156159
static const struct snd_kcontrol_new cs47l15_snd_controls[] = {

0 commit comments

Comments
 (0)