Commit bc1765d6 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

ASoC: wm_adsp: Mimic legacy behaviour of reading controls when DSP is on

Older firmwares don't specify access flags for the controls,
unfortunately the usage of some of these firmware relies on being able
to read back values from the DSP. The current control code will only do
this for volatile controls. This patch will read the control from the
hardware if no flags are specified and the control is currently
enabled, which should cover these legacy use-cases.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 168d10e7
...@@ -666,6 +666,9 @@ static int wm_coeff_get(struct snd_kcontrol *kctl, ...@@ -666,6 +666,9 @@ static int wm_coeff_get(struct snd_kcontrol *kctl,
else else
ret = -EPERM; ret = -EPERM;
} else { } else {
if (!ctl->flags && ctl->enabled)
ret = wm_coeff_read_control(ctl, ctl->cache, ctl->len);
memcpy(p, ctl->cache, ctl->len); memcpy(p, ctl->cache, ctl->len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment