diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-03-29 16:33:28 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 09:00:33 +0200 |
commit | a2142674b958d89e0806228a5f6cd22ec379d61d (patch) | |
tree | 875f7f64f85433dd3df1c465ad1d57f04eb99f80 /sound/pci/ac97/ac97_codec.c | |
parent | [ALSA] Added identification for the Audigy ES. (diff) | |
download | linux-a2142674b958d89e0806228a5f6cd22ec379d61d.tar.xz linux-a2142674b958d89e0806228a5f6cd22ec379d61d.zip |
[ALSA] Fix the detection of resolution of ac97 controls
AC97 Codec
Fixed the detection of bit resolution of ac97 mixer controls.
This will fix the problem with TI ac97 codecs.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97/ac97_codec.c')
-rw-r--r-- | sound/pci/ac97/ac97_codec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 0b024ec1f709..7d2854de0c10 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c @@ -1072,9 +1072,9 @@ static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max unsigned short val; snd_ac97_write(ac97, reg, 0x8080 | cbit[i] | (cbit[i] << 8)); val = snd_ac97_read(ac97, reg); - if (! *lo_max && (val & cbit[i])) + if (! *lo_max && (val & 0x7f) == cbit[i]) *lo_max = max[i]; - if (! *hi_max && (val & (cbit[i] << 8))) + if (! *hi_max && ((val >> 8) & 0x7f) == cbit[i]) *hi_max = max[i]; if (*lo_max && *hi_max) break; |