diff options
author | Lu, Han <han.lu@intel.com> | 2015-03-19 08:38:00 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-19 00:49:11 +0000 |
commit | 5d5b275d727753372f0a390b4121738d073f3e94 (patch) | |
tree | e0e439159f52d70420d2e0d528cc4fdcbc9ad225 /sound/soc/intel/sst-haswell-ipc.c | |
parent | 91b0d9aa933a2335f6f11983b19eaf9ebe3c2033 (diff) | |
download | blackbird-op-linux-5d5b275d727753372f0a390b4121738d073f3e94.tar.gz blackbird-op-linux-5d5b275d727753372f0a390b4121738d073f3e94.zip |
Intel: ASoC: Add condition check before set param to waves
Check waves state before set parameter through ipc to prevent unexpected
operation. Also remove redundant check.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/sst-haswell-ipc.c')
-rw-r--r-- | sound/soc/intel/sst-haswell-ipc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c index 43fb5f339168..20b629a011de 100644 --- a/sound/soc/intel/sst-haswell-ipc.c +++ b/sound/soc/intel/sst-haswell-ipc.c @@ -2055,6 +2055,11 @@ int sst_hsw_launch_param_buf(struct sst_hsw *hsw) { int ret, idx; + if (!sst_hsw_is_module_active(hsw, SST_HSW_MODULE_WAVES)) { + dev_dbg(hsw->dev, "module waves is not active\n"); + return 0; + } + /* put all param lines to DSP through ipc */ for (idx = 0; idx < hsw->param_idx_w; idx++) { ret = sst_hsw_module_set_param(hsw, |