summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2016-11-21 18:00:02 +0000
committerMark Brown <broonie@kernel.org>2016-11-21 18:20:53 +0000
commit87aa63746260e3e9db2fe6b6d8e97b55bdb63a2b (patch)
treef20a873a07c3239d7ab62afb91c3df102b539e74 /sound/soc/codecs/wm_adsp.c
parentb396ebca736f94a1a18bdc9a518ad0ca58fbd842 (diff)
downloadlinux-stable-87aa63746260e3e9db2fe6b6d8e97b55bdb63a2b.tar.gz
linux-stable-87aa63746260e3e9db2fe6b6d8e97b55bdb63a2b.tar.bz2
linux-stable-87aa63746260e3e9db2fe6b6d8e97b55bdb63a2b.zip
ASoC: wm_adsp: Only write shutdown controls for active firmwares
The control list may contain shutdown controls for firmwares that are not currently active, attempting to write this will at best fail. To avoid this issue we skip any control that is not active. Fixes: commit f4f0c4c60c39 ("ASoC: wm_adsp: Signal firmware shutdown through event control") Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 4fb6e2f035e0..6ccb7313a0f6 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1194,6 +1194,9 @@ static void wm_adsp_signal_event_controls(struct wm_adsp *dsp,
if (ctl->type != WMFW_CTL_TYPE_HOSTEVENT)
continue;
+ if (!ctl->enabled)
+ continue;
+
ret = wm_coeff_write_acked_control(ctl, event);
if (ret)
adsp_warn(dsp,