summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorStuart Henderson <stuarth@opensource.cirrus.com>2019-10-02 09:42:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-10 11:27:15 +0100
commit513474f59001d8d84b33b159d2b17ecc398ad356 (patch)
treed6fd7cd4707b70b671a4f5ea99e3ba11ffee3af3 /sound
parentbab5c14b5c8909d80a7e322613405451b25b11aa (diff)
downloadlinux-stable-513474f59001d8d84b33b159d2b17ecc398ad356.tar.gz
linux-stable-513474f59001d8d84b33b159d2b17ecc398ad356.tar.bz2
linux-stable-513474f59001d8d84b33b159d2b17ecc398ad356.zip
ASoC: wm_adsp: Don't generate kcontrols without READ flags
[ Upstream commit 3ae7359c0e39f42a96284d6798fc669acff38140 ] User space always expects to be able to read ALSA controls, so ensure no kcontrols are generated without an appropriate READ flag. In the case of a read of such a control zeros will be returned. Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20191002084240.21589-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm_adsp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index ee85056a8577..b114fc7b2a95 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1147,8 +1147,7 @@ static unsigned int wmfw_convert_flags(unsigned int in, unsigned int len)
}
if (in) {
- if (in & WMFW_CTL_FLAG_READABLE)
- out |= rd;
+ out |= rd;
if (in & WMFW_CTL_FLAG_WRITEABLE)
out |= wr;
if (in & WMFW_CTL_FLAG_VOLATILE)