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);
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;
}
goto err;
if (val)
- rc |= 0x8000;
+ rc &= 0x1f1f;
else
- rc &= 0x7f7f;
+ rc |= 0x8000;
rc = em28xx_write_ac97(dev, kcontrol->private_value, rc);
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;
}