diff options
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index d151224ffcca..6313b3da967b 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c | |||
@@ -899,7 +899,10 @@ static int wm_coeff_put(struct snd_kcontrol *kctl, | |||
899 | 899 | ||
900 | mutex_lock(&ctl->dsp->pwr_lock); | 900 | mutex_lock(&ctl->dsp->pwr_lock); |
901 | 901 | ||
902 | memcpy(ctl->cache, p, ctl->len); | 902 | if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) |
903 | ret = -EPERM; | ||
904 | else | ||
905 | memcpy(ctl->cache, p, ctl->len); | ||
903 | 906 | ||
904 | ctl->set = 1; | 907 | ctl->set = 1; |
905 | if (ctl->enabled && ctl->dsp->running) | 908 | if (ctl->enabled && ctl->dsp->running) |
@@ -926,6 +929,8 @@ static int wm_coeff_tlv_put(struct snd_kcontrol *kctl, | |||
926 | ctl->set = 1; | 929 | ctl->set = 1; |
927 | if (ctl->enabled && ctl->dsp->running) | 930 | if (ctl->enabled && ctl->dsp->running) |
928 | ret = wm_coeff_write_control(ctl, ctl->cache, size); | 931 | ret = wm_coeff_write_control(ctl, ctl->cache, size); |
932 | else if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) | ||
933 | ret = -EPERM; | ||
929 | } | 934 | } |
930 | 935 | ||
931 | mutex_unlock(&ctl->dsp->pwr_lock); | 936 | mutex_unlock(&ctl->dsp->pwr_lock); |