alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp: Only write shutdown controls for active firmwares
@ 2016-11-21 18:00 Charles Keepax
  2016-11-21 19:20 ` Applied "ASoC: wm_adsp: Only write shutdown controls for active firmwares" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2016-11-21 18:00 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, patches, lgirdwood

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>
---
 sound/soc/codecs/wm_adsp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 4fb6e2f..6ccb731 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,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-21 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 18:00 [PATCH] ASoC: wm_adsp: Only write shutdown controls for active firmwares Charles Keepax
2016-11-21 19:20 ` Applied "ASoC: wm_adsp: Only write shutdown controls for active firmwares" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).