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>
diff --git a/sound/soc/intel/sst-haswell-ipc.c b/sound/soc/intel/sst-haswell-ipc.c
index 43fb5f3..20b629a 100644
--- a/sound/soc/intel/sst-haswell-ipc.c
+++ b/sound/soc/intel/sst-haswell-ipc.c
@@ -2055,6 +2055,11 @@
 {
 	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,