diff options
author | Chen-Yu Tsai <wens@csie.org> | 2016-11-02 15:35:58 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-11-02 09:55:03 -0600 |
commit | e411b0b5eb9b65257a050eac333d181d6e00e2c6 (patch) | |
tree | 594c649787b942815021fd13a7db9802089d7619 /sound/soc/codecs/tlv320aic3x.c | |
parent | 1001354ca34179f3db924eb66672442a173147dc (diff) | |
download | lwn-e411b0b5eb9b65257a050eac333d181d6e00e2c6.tar.gz lwn-e411b0b5eb9b65257a050eac333d181d6e00e2c6.zip |
ASoC: dapm: Support second register for DAPM control updates
To support double channel shared controls split across 2 registers, one
for each channel, we must be able to update both registers together.
Add a second set of register fields to struct snd_soc_dapm_update, and
update the DAPM control writeback (put) callbacks to support this.
For codecs that use custom events which call into DAPM to do updates,
also clear struct snd_soc_dapm_update before using it, so the second
set of fields remains clean.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic3x.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic3x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index 5a8d96ec058c..8877b74b0510 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -157,7 +157,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol, unsigned int mask = (1 << fls(max)) - 1; unsigned int invert = mc->invert; unsigned short val; - struct snd_soc_dapm_update update; + struct snd_soc_dapm_update update = { 0 }; int connect, change; val = (ucontrol->value.integer.value[0] & mask); |