diff options
-rw-r--r-- | sound/soc/soc-dapm.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index c2206bc835da..967066873aad 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -2515,19 +2515,13 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, | |||
2515 | int wi; | 2515 | int wi; |
2516 | 2516 | ||
2517 | val = (ucontrol->value.integer.value[0] & mask); | 2517 | val = (ucontrol->value.integer.value[0] & mask); |
2518 | connect = !!val; | ||
2518 | 2519 | ||
2519 | if (invert) | 2520 | if (invert) |
2520 | val = max - val; | 2521 | val = max - val; |
2521 | mask = mask << shift; | 2522 | mask = mask << shift; |
2522 | val = val << shift; | 2523 | val = val << shift; |
2523 | 2524 | ||
2524 | if (val) | ||
2525 | /* new connection */ | ||
2526 | connect = invert ? 0 : 1; | ||
2527 | else | ||
2528 | /* old connection must be powered down */ | ||
2529 | connect = invert ? 1 : 0; | ||
2530 | |||
2531 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); | 2525 | mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2532 | 2526 | ||
2533 | change = snd_soc_test_bits(widget->codec, reg, mask, val); | 2527 | change = snd_soc_test_bits(widget->codec, reg, mask, val); |