Commit 02897cf1bdd022f2b6825db770cdfd2396cde796
Committed by
Greg Kroah-Hartman
1 parent
91ae122079
ASoC: dapm: Make sure to always update the DAPM graph in _put_volsw()
commit c9e065c27fe9b81e5d6e7681d77a24f7b9616675 upstream. When using auto-muted controls it may happen that the register value will not change when changing a control from enabled to disabled (since the control might be physically disabled due to the auto-muting). We have to make sure to still update the DAPM graph and disconnect the mixer input. Fixes: commit 5729507 ("ASoC: dapm: Implement mixer input auto-disable") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 10 additions and 13 deletions Side-by-side Diff
sound/soc/soc-dapm.c
... | ... | @@ -2857,22 +2857,19 @@ |
2857 | 2857 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2858 | 2858 | |
2859 | 2859 | change = dapm_kcontrol_set_value(kcontrol, val); |
2860 | - | |
2861 | - if (reg != SND_SOC_NOPM) { | |
2862 | - mask = mask << shift; | |
2863 | - val = val << shift; | |
2864 | - | |
2865 | - change = snd_soc_test_bits(codec, reg, mask, val); | |
2866 | - } | |
2867 | - | |
2868 | 2860 | if (change) { |
2869 | 2861 | if (reg != SND_SOC_NOPM) { |
2870 | - update.kcontrol = kcontrol; | |
2871 | - update.reg = reg; | |
2872 | - update.mask = mask; | |
2873 | - update.val = val; | |
2862 | + mask = mask << shift; | |
2863 | + val = val << shift; | |
2874 | 2864 | |
2875 | - card->update = &update; | |
2865 | + if (snd_soc_test_bits(codec, reg, mask, val)) { | |
2866 | + update.kcontrol = kcontrol; | |
2867 | + update.reg = reg; | |
2868 | + update.mask = mask; | |
2869 | + update.val = val; | |
2870 | + card->update = &update; | |
2871 | + } | |
2872 | + | |
2876 | 2873 | } |
2877 | 2874 | |
2878 | 2875 | ret = soc_dapm_mixer_update_power(card, kcontrol, connect); |