History

ASoC: es8328: Fix event generation for deemphasis control

Currently the put() method for the deemphasis control returns 0 when a new value is written to the control even if the value changed, meaning events are not generated. Fix this, skip the work of updating the value when it is unchanged and then return 1 after having done so.

Mark Brown committed 4 years ago

Commit 82596101 parent d1f52721 file · +4 −1Browse files

Unified · Split

sound/soc/codecs/es8328.c+4−1
@@ -161,13 +161,16 @@ static int es8328_put_deemph(struct snd_kcontrol *kcontrol, · 160 unmodified lines
161 if (deemph > 1)161 if (deemph > 1)
162 return -EINVAL;162 return -EINVAL;
163 163
164 if (es8328->deemph == deemph)
165 return 0;
166
164 ret = es8328_set_deemph(component);167 ret = es8328_set_deemph(component);
165 if (ret < 0)168 if (ret < 0)
166 return ret;169 return ret;
167 170
168 es8328->deemph = deemph;171 es8328->deemph = deemph;
169 172
170 return 0;173 return 1;
171}174}
172 175
173 176

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t