[alsa-devel] [PATCH 2/4] ASoC: wm_adsp: Explicitly set the control access flags in all cases
Charles Keepax
ckeepax at opensource.wolfsonmicro.com
Fri Feb 19 15:44:42 CET 2016
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 at opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm_adsp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 00a7d68..c97b3a1 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -877,6 +877,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,
--
2.1.4
More information about the Alsa-devel
mailing list