Skip to content

Commit

Permalink
[ALSA] Fix the detection of resolution of ac97 controls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 29, 2005
1 parent 56f5cee commit a214267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a214267

Please sign in to comment.