diff options
author | Lu, Han <han.lu@intel.com> | 2015-03-19 01:38:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-19 01:49:11 +0100 |
commit | 5d5b275d727753372f0a390b4121738d073f3e94 (patch) | |
tree | e0e439159f52d70420d2e0d528cc4fdcbc9ad225 /sound/soc/intel/sst-haswell-pcm.c | |
parent | ASoC: Intel: Remove vague commit about slave DMA config from firmware loader (diff) | |
download | linux-5d5b275d727753372f0a390b4121738d073f3e94.tar.xz 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 '')
-rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index b40ec746bc19..6c6229ae4a02 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c @@ -399,13 +399,9 @@ static int hsw_waves_param_put(struct snd_kcontrol *kcontrol, if (ret < 0) return ret; - if (sst_hsw_is_module_loaded(hsw, id)) { - if (!sst_hsw_is_module_active(hsw, id)) - return 0; - + if (sst_hsw_is_module_active(hsw, id)) ret = sst_hsw_module_set_param(hsw, id, 0, param_id, param_size, ucontrol->value.bytes.data); - } return ret; } |