ALSA: ice1724 - aureon - fix wm8770 volume offset

The volume register is from 0..0x7f and 0..0x1a range is mute.
Also, fix mute combining in wm_vol_put(). The wrong behaviour was
noticed by Peter Christensen.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>

+7 -5
+7 -5
sound/pci/ice1712/aureon.c
··· 703 703 { 704 704 unsigned char nvol; 705 705 706 - if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) 706 + if ((master & WM_VOL_MUTE) || (vol & WM_VOL_MUTE)) { 707 707 nvol = 0; 708 - else 708 + } else { 709 709 nvol = ((vol % WM_VOL_CNT) * (master % WM_VOL_CNT)) / 710 710 WM_VOL_MAX; 711 + nvol += 0x1b; 712 + } 711 713 712 714 wm_put(ice, index, nvol); 713 715 wm_put_nocache(ice, index, 0x180 | nvol); ··· 780 778 for (ch = 0; ch < 2; ch++) { 781 779 unsigned int vol = ucontrol->value.integer.value[ch]; 782 780 if (vol > WM_VOL_MAX) 783 - continue; 781 + vol = WM_VOL_MAX; 784 782 vol |= spec->master[ch] & WM_VOL_MUTE; 785 783 if (vol != spec->master[ch]) { 786 784 int dac; ··· 836 834 for (i = 0; i < voices; i++) { 837 835 unsigned int vol = ucontrol->value.integer.value[i]; 838 836 if (vol > WM_VOL_MAX) 839 - continue; 840 - vol |= spec->vol[ofs+i]; 837 + vol = WM_VOL_MAX; 838 + vol |= spec->vol[ofs+i] & WM_VOL_MUTE; 841 839 if (vol != spec->vol[ofs+i]) { 842 840 spec->vol[ofs+i] = vol; 843 841 idx = WM_DAC_ATTEN + ofs + i;