Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261316
b: refs/heads/master
c: 71d7d83
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jul 27, 2011
1 parent 6fe1013 commit 50a5621
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 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: 43131a2ca6afbd8dcc940d5ad4b4b1c3d89a658b
refs/heads/master: 71d7d83edc5129509a2cba1cf9848579cf9619e5
16 changes: 8 additions & 8 deletions trunk/drivers/media/video/em28xx/em28xx-audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ static int em28xx_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{
struct em28xx *dev = snd_kcontrol_chip(kcontrol);
u16 val = (value->value.integer.value[0] & 0x1f) |
(value->value.integer.value[1] & 0x1f) << 8;
u16 val = (0x1f - (value->value.integer.value[0] & 0x1f)) |
(0x1f - (value->value.integer.value[1] & 0x1f)) << 8;
int rc;

mutex_lock(&dev->lock);
Expand Down Expand Up @@ -482,8 +482,8 @@ static int em28xx_vol_get(struct snd_kcontrol *kcontrol,
if (val < 0)
return val;

value->value.integer.value[0] = val & 0x1f;
value->value.integer.value[1] = (val << 8) & 0x1f;
value->value.integer.value[0] = 0x1f - (val & 0x1f);
value->value.integer.value[1] = 0x1f - ((val << 8) & 0x1f);

return 0;
}
Expand All @@ -501,9 +501,9 @@ static int em28xx_vol_put_mute(struct snd_kcontrol *kcontrol,
goto err;

if (val)
rc |= 0x8000;
rc &= 0x1f1f;
else
rc &= 0x7f7f;
rc |= 0x8000;

rc = em28xx_write_ac97(dev, kcontrol->private_value, rc);

Expand All @@ -525,9 +525,9 @@ static int em28xx_vol_get_mute(struct snd_kcontrol *kcontrol,
return val;

if (val & 0x8000)
value->value.integer.value[0] = 1;
else
value->value.integer.value[0] = 0;
else
value->value.integer.value[0] = 1;

return 0;
}
Expand Down

0 comments on commit 50a5621

Please sign in to comment.