diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2016-02-19 14:44:42 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-02-21 03:08:19 +0900 |
commit | cc815c4b86d14630a7d4ca4f4c7d2c2acb88cb52 (patch) | |
tree | 2f86851125f368c278f28c3a47200b24db3f51ec /sound/soc/codecs/wm_adsp.c | |
parent | c7dae7c4c60693286298e300b3d140c8cff46daa (diff) | |
download | lwn-cc815c4b86d14630a7d4ca4f4c7d2c2acb88cb52.tar.gz lwn-cc815c4b86d14630a7d4ca4f4c7d2c2acb88cb52.zip |
ASoC: wm_adsp: Explicitly set the control access flags in all cases
In the case where the firmware does not tell us the access flags for the
control, we let ALSA select a default (READWRITE). But really we should
be applying the volatile flag in this case, as we will read the control
from the DSP if it is on in this case. This patch explicitly sets the
access flags in all cases.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r-- | sound/soc/codecs/wm_adsp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index cb49a632462a..ff0ce6ba1b69 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -857,6 +857,9 @@ static int wmfw_add_ctl(struct wm_adsp *dsp, struct wm_coeff_ctl *ctl) kcontrol->access |= SNDRV_CTL_ELEM_ACCESS_READ; if (ctl->flags & WMFW_CTL_FLAG_VOLATILE) kcontrol->access |= SNDRV_CTL_ELEM_ACCESS_VOLATILE; + } else { + kcontrol->access = SNDRV_CTL_ELEM_ACCESS_READWRITE; + kcontrol->access |= SNDRV_CTL_ELEM_ACCESS_VOLATILE; } ret = snd_soc_add_card_controls(dsp->card, |