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
161161 if (deemph > 1)
162162 return -EINVAL;
163163
164+ if (es8328->deemph == deemph)
165+ return 0;
166+
164167 ret = es8328_set_deemph(component);
165168 if (ret < 0)
166169 return ret;
167170
168171 es8328->deemph = deemph;
169172
170− return 0;
173+ return 1;
171174 }
172175
173176

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