Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180302
b: refs/heads/master
c: 9d4c746
h: refs/heads/master
v: v3
  • Loading branch information
Jaroslav Kysela committed Feb 5, 2010
1 parent ad08319 commit ce4370b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 21956b61f594f7924d98240da74bc81c28601fa9
refs/heads/master: 9d4c7464458770d309169f7a7ce1ea6f8a4a7de5
12 changes: 7 additions & 5 deletions trunk/sound/pci/ice1712/aureon.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,13 @@ static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index, unsigned sho
{
unsigned char nvol;

if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE))
if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) {
nvol = 0;
else
} else {
nvol = ((vol % WM_VOL_CNT) * (master % WM_VOL_CNT)) /
WM_VOL_MAX;
nvol += 0x1b;
}

wm_put(ice, index, nvol);
wm_put_nocache(ice, index, 0x180 | nvol);
Expand Down Expand Up @@ -778,7 +780,7 @@ static int wm_master_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_
for (ch = 0; ch < 2; ch++) {
unsigned int vol = ucontrol->value.integer.value[ch];
if (vol > WM_VOL_MAX)
continue;
vol = WM_VOL_MAX;
vol |= spec->master[ch] & WM_VOL_MUTE;
if (vol != spec->master[ch]) {
int dac;
Expand Down Expand Up @@ -834,8 +836,8 @@ static int wm_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *
for (i = 0; i < voices; i++) {
unsigned int vol = ucontrol->value.integer.value[i];
if (vol > WM_VOL_MAX)
continue;
vol |= spec->vol[ofs+i];
vol = WM_VOL_MAX;
vol |= spec->vol[ofs+i] & WM_VOL_MUTE;
if (vol != spec->vol[ofs+i]) {
spec->vol[ofs+i] = vol;
idx = WM_DAC_ATTEN + ofs + i;
Expand Down

0 comments on commit ce4370b

Please sign in to comment.