Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5352
b: refs/heads/master
c: c9eab12
h: refs/heads/master
v: v3
  • Loading branch information
James Courtier-Dutton authored and Jaroslav Kysela committed Jul 28, 2005
1 parent a4c19c3 commit f5466e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c1d549aa9b22365fe5405c372f840cdbc6315f5
refs/heads/master: c9eab129fcbcef364b34fb3a70cb2531847e1edf
5 changes: 5 additions & 0 deletions trunk/sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,11 @@ static void check_volume_resolution(ac97_t *ac97, int reg, unsigned char *lo_max
for (i = 0 ; i < ARRAY_SIZE(cbit); i++) {
unsigned short val;
snd_ac97_write(ac97, reg, 0x8080 | cbit[i] | (cbit[i] << 8));
/* Do the read twice due to buffers on some ac97 codecs.
* e.g. The STAC9704 returns exactly what you wrote the the register
* if you read it immediately. This causes the detect routine to fail.
*/
val = snd_ac97_read(ac97, reg);
val = snd_ac97_read(ac97, reg);
if (! *lo_max && (val & 0x7f) == cbit[i])
*lo_max = max[i];
Expand Down

0 comments on commit f5466e7

Please sign in to comment.