提交 cc815c4b 编写于 作者: C Charles Keepax 提交者: Mark Brown

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: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 c7dae7c4
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册