From: Charles Keepax Date: Thu, 17 Dec 2015 10:05:59 +0000 (+0000) Subject: ASoC: wm_adsp: Mimic legacy behaviour of reading controls when DSP is on X-Git-Tag: MMI-PSA29.97-13-9~8628^2~24^2~6^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bc1765d6e81a70be36a7290bcc829a7714101bbb;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index b083642718f0..d1e0826c7db2 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -666,6 +666,9 @@ static int wm_coeff_get(struct snd_kcontrol *kctl, else ret = -EPERM; } else { + if (!ctl->flags && ctl->enabled) + ret = wm_coeff_read_control(ctl, ctl->cache, ctl->len); + memcpy(p, ctl->cache, ctl->len); }