Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96004
b: refs/heads/master
c: 2e75d05
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed May 5, 2008
1 parent fe72467 commit 3387797
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 564c5bead424fa798dfbd5fe382b4e0b7ea483fb
refs/heads/master: 2e75d050e42d1c61e820f9a35078a2f69e02cc3e
9 changes: 8 additions & 1 deletion trunk/sound/pci/ac97/ac97_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -3446,6 +3446,7 @@ static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] = {
int patch_vt1617a(struct snd_ac97 * ac97)
{
int err = 0;
int val;

/* we choose to not fail out at this point, but we tell the
caller when we return */
Expand All @@ -3456,7 +3457,13 @@ int patch_vt1617a(struct snd_ac97 * ac97)
/* bring analog power consumption to normal by turning off the
* headphone amplifier, like WinXP driver for EPIA SP
*/
snd_ac97_write_cache(ac97, 0x5c, 0x20);
/* We need to check the bit before writing it.
* On some (many?) hardwares, setting bit actually clears it!
*/
val = snd_ac97_read(ac97, 0x5c);
if (!(val & 0x20))
snd_ac97_write_cache(ac97, 0x5c, 0x20);

ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */
ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
ac97->build_ops = &patch_vt1616_ops;
Expand Down

0 comments on commit 3387797

Please sign in to comment.