Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270785
b: refs/heads/master
c: db382da
h: refs/heads/master
i:
  270783: ef23f65
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 5, 2011
1 parent f145b69 commit b3353ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 974815ba4f88f3f12f6f01384e822b23be058323
refs/heads/master: db382da5ff286b406c4819cc9ebd96bbb680884c
11 changes: 2 additions & 9 deletions trunk/sound/soc/codecs/twl6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,19 +746,17 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol,
struct twl6040_output *out = NULL;
struct soc_mixer_control *mc =
(struct soc_mixer_control *)kcontrol->private_value;
int ret, type_2r;
int ret;

/* For HS and HF we shadow the values and only actually write
* them out when active in order to ensure the amplifier comes on
* as quietly as possible. */
switch (mc->reg) {
case TWL6040_REG_HSGAIN:
out = &twl6040_priv->headset;
type_2r = 0;
break;
case TWL6040_REG_HFLGAIN:
out = &twl6040_priv->handsfree;
type_2r = 1;
break;
default:
return -EINVAL;
Expand All @@ -769,12 +767,7 @@ static int twl6040_put_volsw(struct snd_kcontrol *kcontrol,
if (!out->active)
return 1;

/* call the appropriate handler depending on the rreg */
if (type_2r)
ret = snd_soc_put_volsw_2r(kcontrol, ucontrol);
else
ret = snd_soc_put_volsw(kcontrol, ucontrol);

ret = snd_soc_put_volsw(kcontrol, ucontrol);
if (ret < 0)
return ret;

Expand Down

0 comments on commit b3353ff

Please sign in to comment.