aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/twl6040.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index d040905cfa9b..8c740c1aa32f 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -759,15 +759,13 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol,
759 out = &twl6040_priv->handsfree; 759 out = &twl6040_priv->handsfree;
760 break; 760 break;
761 default: 761 default:
762 break; 762 return -EINVAL;
763 } 763 }
764 764
765 if (out) { 765 out->left_vol = ucontrol->value.integer.value[0];
766 out->left_vol = ucontrol->value.integer.value[0]; 766 out->right_vol = ucontrol->value.integer.value[1];
767 out->right_vol = ucontrol->value.integer.value[1]; 767 if (!out->active)
768 if (!out->active) 768 return 1;
769 return 1;
770 }
771 769
772 /* call the appropriate handler depending on the rreg */ 770 /* call the appropriate handler depending on the rreg */
773 if (mc->rreg) 771 if (mc->rreg)