aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-05-03 12:46:56 -0400
committerTakashi Iwai <tiwai@suse.de>2008-05-05 08:12:08 -0400
commit2e75d050e42d1c61e820f9a35078a2f69e02cc3e (patch)
treeac8a76568f9a67097951d9eb466863cb4e42cfd7 /sound/pci/ac97
parent564c5bead424fa798dfbd5fe382b4e0b7ea483fb (diff)
[ALSA] ac97 - Add a workaround for broken quirk for VT1617A codec
On boards with VT1617A codec, the sound disappears suddenly. This looks like a problem with HPE-bit control that is supposed to be set in patch_vt1617a(). However, on such problematic hardwares, the bit is actually reset mysteriously. The patch adds a workaround for the wrong quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97')
-rw-r--r--sound/pci/ac97/ac97_patch.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 39198e505b12..2da89810ca10 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -3446,6 +3446,7 @@ static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] = {
3446int patch_vt1617a(struct snd_ac97 * ac97) 3446int patch_vt1617a(struct snd_ac97 * ac97)
3447{ 3447{
3448 int err = 0; 3448 int err = 0;
3449 int val;
3449 3450
3450 /* we choose to not fail out at this point, but we tell the 3451 /* we choose to not fail out at this point, but we tell the
3451 caller when we return */ 3452 caller when we return */
@@ -3456,7 +3457,13 @@ int patch_vt1617a(struct snd_ac97 * ac97)
3456 /* bring analog power consumption to normal by turning off the 3457 /* bring analog power consumption to normal by turning off the
3457 * headphone amplifier, like WinXP driver for EPIA SP 3458 * headphone amplifier, like WinXP driver for EPIA SP
3458 */ 3459 */
3459 snd_ac97_write_cache(ac97, 0x5c, 0x20); 3460 /* We need to check the bit before writing it.
3461 * On some (many?) hardwares, setting bit actually clears it!
3462 */
3463 val = snd_ac97_read(ac97, 0x5c);
3464 if (!(val & 0x20))
3465 snd_ac97_write_cache(ac97, 0x5c, 0x20);
3466
3460 ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */ 3467 ac97->ext_id |= AC97_EI_SPDIF; /* force the detection of spdif */
3461 ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; 3468 ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
3462 ac97->build_ops = &patch_vt1616_ops; 3469 ac97->build_ops = &patch_vt1616_ops;